Bug 1438611: Remove unused mDirty property from nsToolkitProfileService. r?florian
MozReview-Commit-ID: 4bTVuO49FaC
--- 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)
{