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

Unified Diff: chrome/browser/browsing_data_remover.cc

Issue 9700007: ContentAPI change - Post DomStorage tasks via a SequencedTaskRunner instead of directly to WEBKIT_DE (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 | « chrome/browser/browsing_data_remover.h ('k') | chrome/browser/extensions/extension_data_deleter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_remover.cc
===================================================================
--- chrome/browser/browsing_data_remover.cc (revision 126447)
+++ chrome/browser/browsing_data_remover.cc (working copy)
@@ -301,12 +301,11 @@
}
}
- if (remove_mask & REMOVE_LOCAL_STORAGE &&
- BrowserThread::IsMessageLoopValid(BrowserThread::WEBKIT_DEPRECATED)) {
+ if (remove_mask & REMOVE_LOCAL_STORAGE) {
DOMStorageContext* context = BrowserContext::GetDOMStorageContext(profile_);
- BrowserThread::PostTask(
- BrowserThread::WEBKIT_DEPRECATED, FROM_HERE,
- base::Bind(&BrowsingDataRemover::ClearDOMStorageOnWebKitThread,
+ context->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&BrowsingDataRemover::ClearDOMStorageInSequencedTask,
base::Unretained(this), make_scoped_refptr(context)));
}
@@ -436,9 +435,10 @@
return delete_begin_time - diff;
}
-void BrowsingDataRemover::ClearDOMStorageOnWebKitThread(
- scoped_refptr<DOMStorageContext> dom_storage_context) {
+void BrowsingDataRemover::ClearDOMStorageInSequencedTask(
+ DOMStorageContext* dom_storage_context) {
// We assume the end time is now.
+ DCHECK(dom_storage_context->task_runner()->RunsTasksOnCurrentThread());
dom_storage_context->DeleteDataModifiedSince(delete_begin_);
}
« no previous file with comments | « chrome/browser/browsing_data_remover.h ('k') | chrome/browser/extensions/extension_data_deleter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698