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

Unified Diff: components/precache/core/precache_session_table.h

Issue 2123813002: Report Precache.TimeSinceLastPrecache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gclient sync Created 4 years, 5 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: 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 e4be3238107b612c86c52de6a835066c706b21cf..ce742b1bec3c977387967bc29f2050bff3af929e 100644
--- a/components/precache/core/precache_session_table.h
+++ b/components/precache/core/precache_session_table.h
@@ -29,6 +29,8 @@ class PrecacheUnfinishedWork;
enum SessionDataType {
// Unfinished work to do sometime later.
UNFINISHED_WORK = 0,
+ // Timestamp of the last precache.
+ LAST_PRECACHE_TIMESTAMP = 1,
};
class PrecacheSessionTable {
@@ -41,6 +43,18 @@ class PrecacheSessionTable {
// Init must be called before any other methods.
bool Init(sql::Connection* db);
+ // -- Time since last precache --
+
+ void SetLastPrecacheTimestamp(const base::Time& time);
+
+ // If none present, it will return base::Time(), so it can be checked via
+ // is_null().
+ base::Time GetLastPrecacheTimestamp();
+
+ void DeleteLastPrecacheTimestamp();
+
+ // -- Unfinished work --
+
// Stores unfinished work.
void SaveUnfinishedWork(
std::unique_ptr<PrecacheUnfinishedWork> unfinished_work);
« no previous file with comments | « components/precache/core/precache_database_unittest.cc ('k') | components/precache/core/precache_session_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698