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

Unified Diff: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc

Issue 443014: Merge 33144 - RESUBMIT of http://codereview.chromium.org/404025/show... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 years, 1 month 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: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc
===================================================================
--- chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc (revision 33168)
+++ chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc (working copy)
@@ -150,9 +150,9 @@
void DOMStorageDispatcherHost::OnNamespaceId(DOMStorageType storage_type,
IPC::Message* reply_msg) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnNamespaceId,
- storage_type, reply_msg));
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnNamespaceId, storage_type,
+ reply_msg));
return;
}
@@ -170,9 +170,9 @@
void DOMStorageDispatcherHost::OnCloneNamespaceId(int64 namespace_id,
IPC::Message* reply_msg) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnCloneNamespaceId,
- namespace_id, reply_msg));
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnCloneNamespaceId, namespace_id,
+ reply_msg));
return;
}
@@ -195,9 +195,9 @@
const string16& origin,
IPC::Message* reply_msg) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnStorageAreaId,
- namespace_id, origin, reply_msg));
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnStorageAreaId, namespace_id, origin,
+ reply_msg));
return;
}
@@ -219,8 +219,8 @@
void DOMStorageDispatcherHost::OnLength(int64 storage_area_id,
IPC::Message* reply_msg) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnLength, storage_area_id, reply_msg));
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnLength, storage_area_id, reply_msg));
return;
}
@@ -240,8 +240,9 @@
void DOMStorageDispatcherHost::OnKey(int64 storage_area_id, unsigned index,
IPC::Message* reply_msg) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnKey, storage_area_id, index, reply_msg));
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnKey, storage_area_id, index,
+ reply_msg));
return;
}
@@ -262,9 +263,9 @@
const string16& key,
IPC::Message* reply_msg) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnGetItem,
- storage_area_id, key, reply_msg));
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnGetItem, storage_area_id, key,
+ reply_msg));
return;
}
@@ -285,8 +286,8 @@
int64 storage_area_id, const string16& key, const string16& value,
const GURL& url, IPC::Message* reply_msg) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnSetItem, storage_area_id, key, value,
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnSetItem, storage_area_id, key, value,
url, reply_msg));
return;
}
@@ -309,8 +310,9 @@
void DOMStorageDispatcherHost::OnRemoveItem(
int64 storage_area_id, const string16& key, const GURL& url) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnRemoveItem, storage_area_id, key, url));
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnRemoveItem, storage_area_id, key,
+ url));
return;
}
@@ -328,8 +330,8 @@
void DOMStorageDispatcherHost::OnClear(int64 storage_area_id, const GURL& url) {
if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- PostTaskToWebKitThread(FROM_HERE, NewRunnableMethod(this,
- &DOMStorageDispatcherHost::OnClear, storage_area_id, url));
+ ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ this, &DOMStorageDispatcherHost::OnClear, storage_area_id, url));
return;
}
@@ -356,9 +358,3 @@
++cur;
}
}
-
-void DOMStorageDispatcherHost::PostTaskToWebKitThread(
- const tracked_objects::Location& from_here, Task* task) {
- webkit_thread_->EnsureInitialized();
- ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, task);
-}
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h ('k') | chrome/browser/in_process_webkit/webkit_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698