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

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

Issue 2788813002: Try to flush DOMStorage too when ending the browsing session.
Patch Set: fixes Created 3 years, 8 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_context_wrapper.h
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.h b/content/browser/dom_storage/dom_storage_context_wrapper.h
index 2c37e330b91a164044bea0da9f7dd3282880a5bd..9170791736a4dbcc4d6c835d035aadc3bef549d5 100644
--- a/content/browser/dom_storage/dom_storage_context_wrapper.h
+++ b/content/browser/dom_storage/dom_storage_context_wrapper.h
@@ -13,6 +13,7 @@
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/ref_counted.h"
#include "content/browser/dom_storage/dom_storage_context_impl.h"
+#include "content/browser/dom_storage/dom_storage_task_runner.h"
#include "content/common/content_export.h"
#include "content/common/storage_partition_service.mojom.h"
#include "content/public/browser/dom_storage_context.h"
@@ -71,7 +72,11 @@ class CONTENT_EXPORT DOMStorageContextWrapper :
// Called when the BrowserContext/Profile is going away.
void Shutdown();
- void Flush();
+ // Write any unwritten data to disk, returns a collection of task runners
+ // that have been tasked with writing data.
+ // Note: this method does not sync the data - it only ensures that any
+ // unwritten data has been written out to the filesystem.
+ std::vector<scoped_refptr<base::SequencedTaskRunner>> Flush();
// See mojom::StoragePartitionService interface.
void OpenLocalStorage(const url::Origin& origin,

Powered by Google App Engine
This is Rietveld 408576698