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

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: Added trace event. 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dd0df52bdc218ad594be92e41aca00e7fcecc79c 100644
--- a/content/browser/dom_storage/dom_storage_area.h
+++ b/content/browser/dom_storage/dom_storage_area.h
@@ -35,6 +35,12 @@ class CONTENT_EXPORT DOMStorageArea
static base::FilePath DatabaseFileNameFromOrigin(const GURL& origin);
static GURL OriginFromDatabaseFileName(const base::FilePath& file_name);
+ // Commence aggressive flushing. This should be called early in the startup -
+ // before any localStorage writing. Currently scheduled writes will not be
+ // rescheduled and will be flushed at the scheduled time after which
+ // aggressive flushing will commence.
+ static void EnableAggressiveCommitDelay();
+
// Local storage. Backed on disk if directory is nonempty.
DOMStorageArea(const GURL& origin,
const base::FilePath& directory,
@@ -153,6 +159,8 @@ class CONTENT_EXPORT DOMStorageArea
void ShutdownInCommitSequence();
+ static bool s_aggressive_flushing_enabled_;
+
int64 namespace_id_;
std::string persistent_namespace_id_;
GURL origin_;
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698