Chromium Code Reviews| Index: components/precache/core/precache_session_table.h |
| diff --git a/components/precache/core/precache_session_table.h b/components/precache/core/precache_session_table.h |
| index ce742b1bec3c977387967bc29f2050bff3af929e..b92e9d9f8ce734e818fd2a64700abe6d4a78f0c5 100644 |
| --- a/components/precache/core/precache_session_table.h |
| +++ b/components/precache/core/precache_session_table.h |
| @@ -24,13 +24,18 @@ class Connection; |
| namespace precache { |
| class PrecacheUnfinishedWork; |
| +class PrecacheQuota; |
|
sclittle
2016/09/14 17:59:18
Remove this forward include, and add an #include f
Raj
2016/09/14 20:01:51
Done.
|
| // Denotes the type of session information being stored. |
| enum SessionDataType { |
|
sclittle
2016/09/14 17:59:17
nit: Could you change this to be an enum class? Ri
Raj
2016/09/14 20:01:51
Done.
|
| // Unfinished work to do sometime later. |
| UNFINISHED_WORK = 0, |
| + |
| // Timestamp of the last precache. |
| LAST_PRECACHE_TIMESTAMP = 1, |
| + |
| + // Remaining quota limits. |
| + QUOTA = 2, |
| }; |
| class PrecacheSessionTable { |
| @@ -53,6 +58,10 @@ class PrecacheSessionTable { |
| void DeleteLastPrecacheTimestamp(); |
| + // Precache quota. |
| + void SaveQuota(const PrecacheQuota& quota); |
| + PrecacheQuota GetQuota(); |
| + |
| // -- Unfinished work -- |
| // Stores unfinished work. |
| @@ -68,6 +77,9 @@ class PrecacheSessionTable { |
| private: |
| bool CreateTableIfNonExistent(); |
| + void SetSessionDataType(SessionDataType id, const std::string& data); |
| + std::string GetSessionDataType(SessionDataType id); |
| + |
| // Non-owned pointer. |
| sql::Connection* db_; |