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

Unified Diff: content/browser/appcache/appcache_database.h

Issue 924723002: [appcache] Don't write during startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: content/browser/appcache/appcache_database.h
diff --git a/content/browser/appcache/appcache_database.h b/content/browser/appcache/appcache_database.h
index ee1c52d8be3e2f8b50a87d4714c1f7960845e743..d6721e4ccaf7f64cefa5084baeb7f9f2a033b68a 100644
--- a/content/browser/appcache/appcache_database.h
+++ b/content/browser/appcache/appcache_database.h
@@ -116,8 +116,11 @@ class CONTENT_EXPORT AppCacheDatabase {
bool FindGroupsForOrigin(
const GURL& origin, std::vector<GroupRecord>* records);
bool FindGroupForCache(int64 cache_id, GroupRecord* record);
- bool UpdateGroupLastAccessTime(
+ bool UpdateLastAccessTime(
int64 group_id, base::Time last_access_time);
+ bool LazyUpdateLastAccessTime(
dmurph 2015/02/20 00:04:45 Can you comment that calling 'commit' is required
cmumford 2015/02/20 17:25:47 I don't believe it is (explicitly) as the destruct
michaeln 2015/02/20 20:24:39 Done.
+ int64 group_id, base::Time last_access_time);
+ bool CommitLazyLastAccessTimes();
bool InsertGroup(const GroupRecord* record);
bool DeleteGroup(int64 group_id);
@@ -220,6 +223,7 @@ class CONTENT_EXPORT AppCacheDatabase {
base::FilePath db_file_path_;
scoped_ptr<sql::Connection> db_;
scoped_ptr<sql::MetaTable> meta_table_;
+ std::map<int64, base::Time> lazy_last_access_times_;
bool is_disabled_;
bool is_recreating_;
bool was_corruption_detected_;
« no previous file with comments | « no previous file | content/browser/appcache/appcache_database.cc » ('j') | content/browser/appcache/appcache_storage_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698