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

Unified Diff: storage/browser/quota/quota_database.h

Issue 1424653002: Add access count and time-since-accessed histograms to temp storage eviction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quota_uma
Patch Set: add quota database test 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 side-by-side diff with in-line comments
Download patch
Index: storage/browser/quota/quota_database.h
diff --git a/storage/browser/quota/quota_database.h b/storage/browser/quota/quota_database.h
index 09e90b34bfeb4e28157144fae2dc5999f2240605..d8216fd9630bb24dec2c65d2d40e232c39366f41 100644
--- a/storage/browser/quota/quota_database.h
+++ b/storage/browser/quota/quota_database.h
@@ -36,6 +36,20 @@ class SpecialStoragePolicy;
// All the methods of this class must run on the DB thread.
class STORAGE_EXPORT_PRIVATE QuotaDatabase {
public:
+ struct STORAGE_EXPORT_PRIVATE OriginInfoTableEntry {
+ OriginInfoTableEntry();
+ OriginInfoTableEntry(const GURL& origin,
+ StorageType type,
+ int used_count,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time);
+ GURL origin;
+ StorageType type;
+ int used_count;
+ base::Time last_access_time;
+ base::Time last_modified_time;
+ };
+
// Constants for {Get,Set}QuotaConfigValue keys.
static const char kDesiredAvailableSpaceKey[];
static const char kTemporaryQuotaOverrideKey[];
@@ -71,6 +85,9 @@ class STORAGE_EXPORT_PRIVATE QuotaDatabase {
// the database schema reset.
bool RegisterInitialOriginInfo(
const std::set<GURL>& origins, StorageType type);
+ bool GetOriginInfo(const GURL& origin,
+ StorageType type,
+ OriginInfoTableEntry* entry);
bool DeleteOriginInfo(const GURL& origin, StorageType type);
@@ -111,21 +128,6 @@ class STORAGE_EXPORT_PRIVATE QuotaDatabase {
};
friend STORAGE_EXPORT_PRIVATE bool operator <(
const QuotaTableEntry& lhs, const QuotaTableEntry& rhs);
-
- struct STORAGE_EXPORT_PRIVATE OriginInfoTableEntry {
- OriginInfoTableEntry();
- OriginInfoTableEntry(
- const GURL& origin,
- StorageType type,
- int used_count,
- const base::Time& last_access_time,
- const base::Time& last_modified_time);
- GURL origin;
- StorageType type;
- int used_count;
- base::Time last_access_time;
- base::Time last_modified_time;
- };
friend STORAGE_EXPORT_PRIVATE bool operator <(
const OriginInfoTableEntry& lhs, const OriginInfoTableEntry& rhs);

Powered by Google App Engine
This is Rietveld 408576698