Bug 1438611: Remove unused mDirty property from nsToolkitProfileService. r?florian draft
authorDave Townsend <dtownsend@oxymoronical.com>
Wed, 08 Nov 2017 09:15:50 -0800
changeset 755723 fc2ec3f6e6f7c2b45b69ace71fab160f41979051
parent 755722 4a5043e1601a2496386cb0f09000eedb8bd8febb
push id99258
push userdtownsend@mozilla.com
push dateThu, 15 Feb 2018 18:52:48 +0000
reviewersflorian
bugs1438611
milestone60.0a1
Bug 1438611: Remove unused mDirty property from nsToolkitProfileService. r?florian MozReview-Commit-ID: 4bTVuO49FaC
toolkit/profile/nsToolkitProfileService.cpp
--- a/toolkit/profile/nsToolkitProfileService.cpp
+++ b/toolkit/profile/nsToolkitProfileService.cpp
@@ -116,17 +116,16 @@ public:
     NS_DECL_NSITOOLKITPROFILESERVICE
 
 private:
     friend class nsToolkitProfile;
     friend class nsToolkitProfileFactory;
     friend nsresult NS_NewToolkitProfileService(nsIToolkitProfileService**);
 
     nsToolkitProfileService() :
-        mDirty(false),
         mStartWithLast(true),
         mStartOffline(false)
     {
         gService = this;
     }
     ~nsToolkitProfileService()
     {
         gService = nullptr;
@@ -145,17 +144,16 @@ private:
                                    nsIToolkitProfile** aResult);
 
     RefPtr<nsToolkitProfile>  mFirst;
     nsCOMPtr<nsIToolkitProfile> mChosen;
     nsCOMPtr<nsIToolkitProfile> mDefault;
     nsCOMPtr<nsIFile>           mAppData;
     nsCOMPtr<nsIFile>           mTempData;
     nsCOMPtr<nsIFile>           mListFile;
-    bool mDirty;
     bool mStartWithLast;
     bool mStartOffline;
 
     static nsToolkitProfileService *gService;
 
     class ProfileEnumerator final : public nsISimpleEnumerator
     {
     public:
@@ -219,17 +217,16 @@ nsToolkitProfile::GetName(nsACString& aR
 NS_IMETHODIMP
 nsToolkitProfile::SetName(const nsACString& aName)
 {
     NS_ASSERTION(nsToolkitProfileService::gService,
                  "Where did my service go?");
     NS_ENSURE_TRUE(!mForExternalApp, NS_ERROR_NOT_IMPLEMENTED);
 
     mName = aName;
-    nsToolkitProfileService::gService->mDirty = true;
 
     return NS_OK;
 }
 
 nsresult
 nsToolkitProfile::RemoveInternal(bool aRemoveFiles, bool aInBackground)
 {
     NS_ASSERTION(nsToolkitProfileService::gService,
@@ -280,18 +277,16 @@ nsToolkitProfile::RemoveInternal(bool aR
         mNext->mPrev = mPrev;
 
     mPrev = nullptr;
     mNext = nullptr;
 
     if (nsToolkitProfileService::gService->mChosen == this)
         nsToolkitProfileService::gService->mChosen = nullptr;
 
-    nsToolkitProfileService::gService->mDirty = true;
-
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsToolkitProfile::Remove(bool removeFiles)
 {
     return RemoveInternal(removeFiles, false /* in background */);
 }
@@ -567,17 +562,16 @@ nsToolkitProfileService::Init()
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsToolkitProfileService::SetStartWithLastProfile(bool aValue)
 {
     if (mStartWithLast != aValue) {
         mStartWithLast = aValue;
-        mDirty = true;
     }
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsToolkitProfileService::GetStartWithLastProfile(bool *aResult)
 {
     *aResult = mStartWithLast;
@@ -642,17 +636,16 @@ nsToolkitProfileService::GetSelectedProf
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsToolkitProfileService::SetSelectedProfile(nsIToolkitProfile* aProfile)
 {
     if (mChosen != aProfile) {
         mChosen = aProfile;
-        mDirty = true;
     }
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsToolkitProfileService::GetDefaultProfile(nsIToolkitProfile* *aResult)
 {
     if (!mDefault) return NS_ERROR_FAILURE;
@@ -661,17 +654,16 @@ nsToolkitProfileService::GetDefaultProfi
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsToolkitProfileService::SetDefaultProfile(nsIToolkitProfile* aProfile)
 {
     if (mDefault != aProfile) {
         mDefault = aProfile;
-        mDirty = true;
     }
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsToolkitProfileService::GetProfileByName(const nsACString& aName,
                                           nsIToolkitProfile* *aResult)
 {