Bug 1621916 - Remove unused argument in Client::InitOrigin; r=dom-workers-and-storage-reviewers,sg
authorJan Varga <jan.varga@gmail.com>
Wed, 27 May 2020 15:52:49 +0000
changeset 596491 c3f73781a871c11a110eb0abf2b084569a197514
parent 596490 24d3d987b60d0f628865afe8dc3b88ced9ea9b99
child 596492 272e3c98d0029fe73c0a57c45bc3b11ffa0e2bee
push id13186
push userffxbld-merge
push dateMon, 01 Jun 2020 09:52:46 +0000
treeherdermozilla-beta@3e7c70a1e4a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdom-workers-and-storage-reviewers, sg
bugs1621916
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1621916 - Remove unused argument in Client::InitOrigin; r=dom-workers-and-storage-reviewers,sg Depends on D77070 Differential Revision: https://phabricator.services.mozilla.com/D77072
dom/cache/QuotaClient.cpp
dom/cache/QuotaClientImpl.h
dom/indexedDB/ActorsParent.cpp
dom/localstorage/ActorsParent.cpp
dom/quota/ActorsParent.cpp
dom/quota/Client.h
dom/simpledb/ActorsParent.cpp
--- a/dom/cache/QuotaClient.cpp
+++ b/dom/cache/QuotaClient.cpp
@@ -179,18 +179,17 @@ CacheQuotaClient* CacheQuotaClient::Get(
 }
 
 CacheQuotaClient::Type CacheQuotaClient::GetType() { return DOMCACHE; }
 
 nsresult CacheQuotaClient::InitOrigin(PersistenceType aPersistenceType,
                                       const nsACString& aGroup,
                                       const nsACString& aOrigin,
                                       const AtomicBool& aCanceled,
-                                      UsageInfo* aUsageInfo,
-                                      bool aForGetUsage) {
+                                      UsageInfo* aUsageInfo) {
   AssertIsOnIOThread();
 
   // The QuotaManager passes a nullptr UsageInfo if there is no quota being
   // enforced against the origin.
   if (!aUsageInfo) {
     return NS_OK;
   }
 
--- a/dom/cache/QuotaClientImpl.h
+++ b/dom/cache/QuotaClientImpl.h
@@ -25,18 +25,17 @@ class CacheQuotaClient final : public qu
 
   static CacheQuotaClient* Get();
 
   virtual Type GetType() override;
   virtual nsresult InitOrigin(PersistenceType aPersistenceType,
                               const nsACString& aGroup,
                               const nsACString& aOrigin,
                               const AtomicBool& aCanceled,
-                              UsageInfo* aUsageInfo,
-                              bool aForGetUsage) override;
+                              UsageInfo* aUsageInfo) override;
 
   virtual nsresult GetUsageForOrigin(PersistenceType aPersistenceType,
                                      const nsACString& aGroup,
                                      const nsACString& aOrigin,
                                      const AtomicBool& aCanceled,
                                      UsageInfo* aUsageInfo) override;
 
   virtual void OnOriginClearCompleted(PersistenceType aPersistenceType,
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -8576,18 +8576,18 @@ class QuotaClient final : public mozilla
   mozilla::dom::quota::Client::Type GetType() override;
 
   nsresult UpgradeStorageFrom1_0To2_0(nsIFile* aDirectory) override;
 
   nsresult UpgradeStorageFrom2_1To2_2(nsIFile* aDirectory) override;
 
   nsresult InitOrigin(PersistenceType aPersistenceType,
                       const nsACString& aGroup, const nsACString& aOrigin,
-                      const AtomicBool& aCanceled, UsageInfo* aUsageInfo,
-                      bool aForGetUsage) override;
+                      const AtomicBool& aCanceled,
+                      UsageInfo* aUsageInfo) override;
 
   nsresult GetUsageForOrigin(PersistenceType aPersistenceType,
                              const nsACString& aGroup,
                              const nsACString& aOrigin,
                              const AtomicBool& aCanceled,
                              UsageInfo* aUsageInfo) override;
 
   void OnOriginClearCompleted(PersistenceType aPersistenceType,
@@ -17200,17 +17200,17 @@ nsresult QuotaClient::UpgradeStorageFrom
 
   return NS_OK;
 }
 
 nsresult QuotaClient::InitOrigin(PersistenceType aPersistenceType,
                                  const nsACString& aGroup,
                                  const nsACString& aOrigin,
                                  const AtomicBool& aCanceled,
-                                 UsageInfo* aUsageInfo, bool aForGetUsage) {
+                                 UsageInfo* aUsageInfo) {
   AssertIsOnIOThread();
 
   nsCOMPtr<nsIFile> directory;
   nsresult rv =
       GetDirectory(aPersistenceType, aOrigin, getter_AddRefs(directory));
   if (NS_WARN_IF(NS_FAILED(rv))) {
     REPORT_TELEMETRY_INIT_ERR(kQuotaExternalError, IDB_GetDirectory);
     return rv;
--- a/dom/localstorage/ActorsParent.cpp
+++ b/dom/localstorage/ActorsParent.cpp
@@ -2789,18 +2789,18 @@ class QuotaClient final : public mozilla
   }
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(mozilla::dom::QuotaClient, override)
 
   Type GetType() override;
 
   nsresult InitOrigin(PersistenceType aPersistenceType,
                       const nsACString& aGroup, const nsACString& aOrigin,
-                      const AtomicBool& aCanceled, UsageInfo* aUsageInfo,
-                      bool aForGetUsage) override;
+                      const AtomicBool& aCanceled,
+                      UsageInfo* aUsageInfo) override;
 
   nsresult GetUsageForOrigin(PersistenceType aPersistenceType,
                              const nsACString& aGroup,
                              const nsACString& aOrigin,
                              const AtomicBool& aCanceled,
                              UsageInfo* aUsageInfo) override;
 
   nsresult AboutToClearOrigins(
@@ -8711,17 +8711,17 @@ nsresult QuotaClient::Initialize() {
 mozilla::dom::quota::Client::Type QuotaClient::GetType() {
   return QuotaClient::LS;
 }
 
 nsresult QuotaClient::InitOrigin(PersistenceType aPersistenceType,
                                  const nsACString& aGroup,
                                  const nsACString& aOrigin,
                                  const AtomicBool& aCanceled,
-                                 UsageInfo* aUsageInfo, bool aForGetUsage) {
+                                 UsageInfo* aUsageInfo) {
   AssertIsOnIOThread();
   MOZ_ASSERT(aPersistenceType == PERSISTENCE_TYPE_DEFAULT);
 
   QuotaManager* quotaManager = QuotaManager::Get();
   MOZ_ASSERT(quotaManager);
 
   nsCOMPtr<nsIFile> directory;
   nsresult rv = quotaManager->GetDirectoryForOrigin(aPersistenceType, aOrigin,
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -5298,18 +5298,17 @@ nsresult QuotaManager::InitializeOrigin(
       // we find them.
       UNKNOWN_FILE_WARNING(leafName);
       continue;
     }
 
     UsageInfo usageInfo;
     rv = mClients[clientType]->InitOrigin(aPersistenceType, aGroup, aOrigin,
                                           /* aCanceled */ Atomic<bool>(false),
-                                          trackQuota ? &usageInfo : nullptr,
-                                          /* aForGetUsage */ false);
+                                          trackQuota ? &usageInfo : nullptr);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       // error should have reported in InitOrigin
       RECORD_IN_NIGHTLY(statusKeeper, rv);
       CONTINUE_IN_NIGHTLY_RETURN_IN_OTHERS(rv);
     }
 
     if (trackQuota) {
       Maybe<uint64_t> clientUsage = usageInfo.TotalUsage();
@@ -9144,17 +9143,17 @@ nsresult QuotaUsageRequestBase::GetUsage
       Client* client = aQuotaManager->GetClient(clientType);
       MOZ_ASSERT(client);
 
       if (initialized) {
         rv = client->GetUsageForOrigin(aPersistenceType, aGroup, aOrigin,
                                        mCanceled, aUsageInfo);
       } else {
         rv = client->InitOrigin(aPersistenceType, aGroup, aOrigin, mCanceled,
-                                aUsageInfo, /* aForGetUsage */ true);
+                                aUsageInfo);
       }
       NS_ENSURE_SUCCESS(rv, rv);
     }
   }
 
   return NS_OK;
 }
 
--- a/dom/quota/Client.h
+++ b/dom/quota/Client.h
@@ -91,17 +91,17 @@ class Client {
   virtual nsresult UpgradeStorageFrom2_1To2_2(nsIFile* aDirectory) {
     return NS_OK;
   }
 
   virtual nsresult InitOrigin(PersistenceType aPersistenceType,
                               const nsACString& aGroup,
                               const nsACString& aOrigin,
                               const AtomicBool& aCanceled,
-                              UsageInfo* aUsageInfo, bool aForGetUsage) = 0;
+                              UsageInfo* aUsageInfo) = 0;
 
   virtual nsresult GetUsageForOrigin(PersistenceType aPersistenceType,
                                      const nsACString& aGroup,
                                      const nsACString& aOrigin,
                                      const AtomicBool& aCanceled,
                                      UsageInfo* aUsageInfo) = 0;
 
   // This method is called when origins are about to be cleared
--- a/dom/simpledb/ActorsParent.cpp
+++ b/dom/simpledb/ActorsParent.cpp
@@ -444,18 +444,18 @@ class QuotaClient final : public mozilla
   }
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(QuotaClient, override)
 
   Type GetType() override;
 
   nsresult InitOrigin(PersistenceType aPersistenceType,
                       const nsACString& aGroup, const nsACString& aOrigin,
-                      const AtomicBool& aCanceled, UsageInfo* aUsageInfo,
-                      bool aForGetUsage) override;
+                      const AtomicBool& aCanceled,
+                      UsageInfo* aUsageInfo) override;
 
   nsresult GetUsageForOrigin(PersistenceType aPersistenceType,
                              const nsACString& aGroup,
                              const nsACString& aOrigin,
                              const AtomicBool& aCanceled,
                              UsageInfo* aUsageInfo) override;
 
   void OnOriginClearCompleted(PersistenceType aPersistenceType,
@@ -1624,17 +1624,17 @@ QuotaClient::~QuotaClient() {
 mozilla::dom::quota::Client::Type QuotaClient::GetType() {
   return QuotaClient::SDB;
 }
 
 nsresult QuotaClient::InitOrigin(PersistenceType aPersistenceType,
                                  const nsACString& aGroup,
                                  const nsACString& aOrigin,
                                  const AtomicBool& aCanceled,
-                                 UsageInfo* aUsageInfo, bool aForGetUsage) {
+                                 UsageInfo* aUsageInfo) {
   AssertIsOnIOThread();
 
   if (!aUsageInfo) {
     return NS_OK;
   }
 
   return GetUsageForOrigin(aPersistenceType, aGroup, aOrigin, aCanceled,
                            aUsageInfo);