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

Unified Diff: content/browser/storage_partition_impl.cc

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/storage_partition_impl.cc
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 03b107ac75099480c89d755154db9fd3f7244986..80a6d2eed90cbedb8eee5d0cc049165e2a1ae2ae 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -894,10 +894,13 @@ void StoragePartitionImpl::ClearHttpAndMediaCaches(
}
}
-void StoragePartitionImpl::Flush() {
+std::vector<scoped_refptr<base::SequencedTaskRunner>>
+StoragePartitionImpl::Flush() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (GetDOMStorageContext())
- GetDOMStorageContext()->Flush();
+ std::vector<scoped_refptr<base::SequencedTaskRunner>> flush_runners;
+ if (dom_storage_context_)
+ flush_runners = dom_storage_context_->Flush();
+ return flush_runners;
}
void StoragePartitionImpl::ClearBluetoothAllowedDevicesMapForTesting() {

Powered by Google App Engine
This is Rietveld 408576698