Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: storage/browser/quota/quota_manager.h

Issue 1403673002: Add Quota.TimeSinceOriginEvicted UMA histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « storage/browser/quota/quota_database.cc ('k') | storage/browser/quota/quota_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ 5 #ifndef STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_
6 #define STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ 6 #define STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 static const int kPerHostTemporaryPortion; 268 static const int kPerHostTemporaryPortion;
269 269
270 static const int64 kPerHostPersistentQuotaLimit; 270 static const int64 kPerHostPersistentQuotaLimit;
271 271
272 static const char kDatabaseName[]; 272 static const char kDatabaseName[];
273 273
274 static const int kThresholdOfErrorsToBeBlacklisted; 274 static const int kThresholdOfErrorsToBeBlacklisted;
275 275
276 static const int kEvictionIntervalInMilliSeconds; 276 static const int kEvictionIntervalInMilliSeconds;
277 277
278 static const char kTimeBetweenRepeatedOriginEvictionsHistogram[];
279
278 // These are kept non-const so that test code can change the value. 280 // These are kept non-const so that test code can change the value.
279 // TODO(kinuko): Make this a real const value and add a proper way to set 281 // TODO(kinuko): Make this a real const value and add a proper way to set
280 // the quota for syncable storage. (http://crbug.com/155488) 282 // the quota for syncable storage. (http://crbug.com/155488)
281 static int64 kMinimumPreserveForSystem; 283 static int64 kMinimumPreserveForSystem;
282 static int64 kSyncableStorageDefaultHostQuota; 284 static int64 kSyncableStorageDefaultHostQuota;
283 285
284 protected: 286 protected:
285 ~QuotaManager() override; 287 ~QuotaManager() override;
286 288
287 private: 289 private:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 void NotifyStorageModifiedInternal( 366 void NotifyStorageModifiedInternal(
365 QuotaClient::ID client_id, 367 QuotaClient::ID client_id,
366 const GURL& origin, 368 const GURL& origin,
367 StorageType type, 369 StorageType type,
368 int64 delta, 370 int64 delta,
369 base::Time modified_time); 371 base::Time modified_time);
370 372
371 void DumpQuotaTable(const DumpQuotaTableCallback& callback); 373 void DumpQuotaTable(const DumpQuotaTableCallback& callback);
372 void DumpOriginInfoTable(const DumpOriginInfoTableCallback& callback); 374 void DumpOriginInfoTable(const DumpOriginInfoTableCallback& callback);
373 375
376 void DeleteOriginDataInternal(const GURL& origin,
377 StorageType type,
378 int quota_client_mask,
379 bool is_eviction,
380 const StatusCallback& callback);
381
374 // Methods for eviction logic. 382 // Methods for eviction logic.
375 void StartEviction(); 383 void StartEviction();
376 void DeleteOriginFromDatabase(const GURL& origin, StorageType type); 384 void DeleteOriginFromDatabase(const GURL& origin,
385 StorageType type,
386 bool is_eviction);
377 387
378 void DidOriginDataEvicted(QuotaStatusCode status); 388 void DidOriginDataEvicted(QuotaStatusCode status);
379 389
380 void ReportHistogram(); 390 void ReportHistogram();
381 void DidGetTemporaryGlobalUsageForHistogram(int64 usage, 391 void DidGetTemporaryGlobalUsageForHistogram(int64 usage,
382 int64 unlimited_usage); 392 int64 unlimited_usage);
383 void DidGetPersistentGlobalUsageForHistogram(int64 usage, 393 void DidGetPersistentGlobalUsageForHistogram(int64 usage,
384 int64 unlimited_usage); 394 int64 unlimited_usage);
385 395
386 void DidGetEvictionOrigin(const GetOriginCallback& callback, 396 void DidGetEvictionOrigin(const GetOriginCallback& callback,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 494
485 struct QuotaManagerDeleter { 495 struct QuotaManagerDeleter {
486 static void Destruct(const QuotaManager* manager) { 496 static void Destruct(const QuotaManager* manager) {
487 manager->DeleteOnCorrectThread(); 497 manager->DeleteOnCorrectThread();
488 } 498 }
489 }; 499 };
490 500
491 } // namespace storage 501 } // namespace storage
492 502
493 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ 503 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_
OLDNEW
« no previous file with comments | « storage/browser/quota/quota_database.cc ('k') | storage/browser/quota/quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698