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

Unified Diff: content/browser/dom_storage/dom_storage_context_impl_new.cc

Issue 9718029: DomStorage commit task sequencing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « no previous file | content/browser/dom_storage/dom_storage_message_filter_new.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_context_impl_new.cc
===================================================================
--- content/browser/dom_storage/dom_storage_context_impl_new.cc (revision 127736)
+++ content/browser/dom_storage/dom_storage_context_impl_new.cc (working copy)
@@ -21,6 +21,7 @@
using content::DOMStorageContext;
using dom_storage::DomStorageArea;
using dom_storage::DomStorageContext;
+using dom_storage::DomStorageTaskRunner;
using dom_storage::DomStorageWorkerPoolTaskRunner;
using webkit_database::DatabaseUtil;
@@ -85,7 +86,8 @@
special_storage_policy,
new DomStorageWorkerPoolTaskRunner(
worker_pool,
- worker_pool->GetNamedSequenceToken("dom_storage"),
+ worker_pool->GetNamedSequenceToken("dom_storage_primary"),
+ worker_pool->GetNamedSequenceToken("dom_storage_commit"),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
}
@@ -95,8 +97,9 @@
void DOMStorageContextImpl::GetAllStorageFiles(
const GetAllStorageFilesCallback& callback) {
DCHECK(context_);
- context_->task_runner()->PostTask(
+ context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
+ DomStorageTaskRunner::PRIMARY_SEQUENCE,
base::Bind(&GetAllStorageFilesHelper,
base::MessageLoopProxy::current(),
context_, callback));
@@ -109,54 +112,61 @@
void DOMStorageContextImpl::DeleteForOrigin(const string16& origin_id) {
DCHECK(context_);
- context_->task_runner()->PostTask(
+ context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
+ DomStorageTaskRunner::PRIMARY_SEQUENCE,
base::Bind(&DomStorageContext::DeleteOrigin, context_,
OriginIdToGURL(origin_id)));
}
void DOMStorageContextImpl::DeleteLocalStorageFile(const FilePath& file_path) {
DCHECK(context_);
- context_->task_runner()->PostTask(
+ context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
+ DomStorageTaskRunner::PRIMARY_SEQUENCE,
base::Bind(&DomStorageContext::DeleteOrigin, context_,
FilePathToOrigin(file_path)));
}
void DOMStorageContextImpl::DeleteDataModifiedSince(const base::Time& cutoff) {
DCHECK(context_);
- context_->task_runner()->PostTask(
+ context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
+ DomStorageTaskRunner::PRIMARY_SEQUENCE,
base::Bind(&DomStorageContext::DeleteDataModifiedSince, context_,
cutoff));
}
void DOMStorageContextImpl::PurgeMemory() {
DCHECK(context_);
- context_->task_runner()->PostTask(
+ context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
+ DomStorageTaskRunner::PRIMARY_SEQUENCE,
base::Bind(&DomStorageContext::PurgeMemory, context_));
}
void DOMStorageContextImpl::SetClearLocalState(bool clear_local_state) {
DCHECK(context_);
- context_->task_runner()->PostTask(
+ context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
+ DomStorageTaskRunner::PRIMARY_SEQUENCE,
base::Bind(&DomStorageContext::SetClearLocalState, context_,
clear_local_state));
}
void DOMStorageContextImpl::SaveSessionState() {
DCHECK(context_);
- context_->task_runner()->PostTask(
+ context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
+ DomStorageTaskRunner::PRIMARY_SEQUENCE,
base::Bind(&DomStorageContext::SaveSessionState, context_));
}
void DOMStorageContextImpl::Shutdown() {
DCHECK(context_);
- context_->task_runner()->PostTask(
+ context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
+ DomStorageTaskRunner::PRIMARY_SEQUENCE,
base::Bind(&DomStorageContext::Shutdown, context_));
}
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_message_filter_new.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698