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

Unified Diff: content/browser/dom_storage/dom_storage_area.h

Issue 1129233003: localStorage: Aggressively flush to disk for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-storage-flush-android
Patch Set: Only logging LocalStorage.CommitDelay when not aggressive Created 5 years, 7 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/dom_storage/dom_storage_area.h
diff --git a/content/browser/dom_storage/dom_storage_area.h b/content/browser/dom_storage/dom_storage_area.h
index 3a4b1660598ccb4a08e189daaaac6af6c81c58b9..6ed7a71b6abce7de12e1b69448351655317d2907 100644
--- a/content/browser/dom_storage/dom_storage_area.h
+++ b/content/browser/dom_storage/dom_storage_area.h
@@ -34,6 +34,7 @@ class CONTENT_EXPORT DOMStorageArea
static const base::FilePath::CharType kDatabaseFileExtension[];
static base::FilePath DatabaseFileNameFromOrigin(const GURL& origin);
static GURL OriginFromDatabaseFileName(const base::FilePath& file_name);
+ static void EnableAggressiveCommitDelay();
// Local storage. Backed on disk if directory is nonempty.
DOMStorageArea(const GURL& origin,
@@ -153,6 +154,9 @@ class CONTENT_EXPORT DOMStorageArea
void ShutdownInCommitSequence();
+ // If true will write values "soon" i.e. within 1 sec.
+ static bool s_aggressive_flushing_enabled_;
+
int64 namespace_id_;
std::string persistent_namespace_id_;
GURL origin_;

Powered by Google App Engine
This is Rietveld 408576698