summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-10 13:18:10 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-10 13:18:10 +0000
commit9d9a80a42fb5ce0879227132b848034c4dbb4ee9 (patch)
tree5c480f45c0356f0da2943eaf5934ac74f2bfecc1 /chrome
parent92543b1c9f448f56d83d29ac23b60ae3bae0c739 (diff)
downloadchromium_src-9d9a80a42fb5ce0879227132b848034c4dbb4ee9.zip
chromium_src-9d9a80a42fb5ce0879227132b848034c4dbb4ee9.tar.gz
chromium_src-9d9a80a42fb5ce0879227132b848034c4dbb4ee9.tar.bz2
Rename ChromeThread to BrowserThread Part12:
- Rename entries under in_process_webkit and notifications. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3669002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/in_process_webkit/dom_storage_context.cc36
-rw-r--r--chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc66
-rw-r--r--chrome/browser/in_process_webkit/indexed_db_browsertest.cc2
-rw-r--r--chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc66
-rw-r--r--chrome/browser/in_process_webkit/indexed_db_key_utility_client.cc42
-rw-r--r--chrome/browser/in_process_webkit/webkit_context.cc26
-rw-r--r--chrome/browser/in_process_webkit/webkit_context_unittest.cc6
-rw-r--r--chrome/browser/in_process_webkit/webkit_thread.cc10
-rw-r--r--chrome/browser/in_process_webkit/webkit_thread.h2
-rw-r--r--chrome/browser/in_process_webkit/webkit_thread_unittest.cc17
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc44
-rw-r--r--chrome/browser/notifications/desktop_notification_service_unittest.cc22
-rw-r--r--chrome/browser/notifications/desktop_notifications_unittest.cc2
-rw-r--r--chrome/browser/notifications/desktop_notifications_unittest.h2
-rw-r--r--chrome/browser/notifications/notification_exceptions_table_model_unittest.cc4
-rw-r--r--chrome/browser/notifications/notification_object_proxy.cc8
-rw-r--r--chrome/browser/notifications/notifications_prefs_cache.cc4
-rw-r--r--chrome/browser/notifications/notifications_prefs_cache_unittest.cc4
18 files changed, 182 insertions, 181 deletions
diff --git a/chrome/browser/in_process_webkit/dom_storage_context.cc b/chrome/browser/in_process_webkit/dom_storage_context.cc
index e13e203..5614307 100644
--- a/chrome/browser/in_process_webkit/dom_storage_context.cc
+++ b/chrome/browser/in_process_webkit/dom_storage_context.cc
@@ -57,42 +57,42 @@ DOMStorageContext::~DOMStorageContext() {
}
int64 DOMStorageContext::AllocateStorageAreaId() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
return ++last_storage_area_id_;
}
int64 DOMStorageContext::AllocateSessionStorageNamespaceId() {
- if (ChromeThread::CurrentlyOn(ChromeThread::UI))
+ if (BrowserThread::CurrentlyOn(BrowserThread::UI))
return ++last_session_storage_namespace_id_on_ui_thread_;
return --last_session_storage_namespace_id_on_io_thread_;
}
int64 DOMStorageContext::CloneSessionStorage(int64 original_id) {
- DCHECK(!ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
int64 clone_id = AllocateSessionStorageNamespaceId();
- ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE, NewRunnableFunction(
+ BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE, NewRunnableFunction(
&DOMStorageContext::CompleteCloningSessionStorage,
this, original_id, clone_id));
return clone_id;
}
void DOMStorageContext::RegisterStorageArea(DOMStorageArea* storage_area) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
int64 id = storage_area->id();
DCHECK(!GetStorageArea(id));
storage_area_map_[id] = storage_area;
}
void DOMStorageContext::UnregisterStorageArea(DOMStorageArea* storage_area) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
int64 id = storage_area->id();
DCHECK(GetStorageArea(id));
storage_area_map_.erase(id);
}
DOMStorageArea* DOMStorageContext::GetStorageArea(int64 id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
StorageAreaMap::iterator iter = storage_area_map_.find(id);
if (iter == storage_area_map_.end())
return NULL;
@@ -100,7 +100,7 @@ DOMStorageArea* DOMStorageContext::GetStorageArea(int64 id) {
}
void DOMStorageContext::DeleteSessionStorageNamespace(int64 namespace_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
StorageNamespaceMap::iterator iter =
storage_namespace_map_.find(namespace_id);
if (iter == storage_namespace_map_.end())
@@ -112,7 +112,7 @@ void DOMStorageContext::DeleteSessionStorageNamespace(int64 namespace_id) {
DOMStorageNamespace* DOMStorageContext::GetStorageNamespace(
int64 id, bool allocation_allowed) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
StorageNamespaceMap::iterator iter = storage_namespace_map_.find(id);
if (iter != storage_namespace_map_.end())
return iter->second;
@@ -125,7 +125,7 @@ DOMStorageNamespace* DOMStorageContext::GetStorageNamespace(
void DOMStorageContext::RegisterDispatcherHost(
DOMStorageDispatcherHost* dispatcher_host) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(dispatcher_host_set_.find(dispatcher_host) ==
dispatcher_host_set_.end());
dispatcher_host_set_.insert(dispatcher_host);
@@ -133,7 +133,7 @@ void DOMStorageContext::RegisterDispatcherHost(
void DOMStorageContext::UnregisterDispatcherHost(
DOMStorageDispatcherHost* dispatcher_host) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(dispatcher_host_set_.find(dispatcher_host) !=
dispatcher_host_set_.end());
dispatcher_host_set_.erase(dispatcher_host);
@@ -141,7 +141,7 @@ void DOMStorageContext::UnregisterDispatcherHost(
const DOMStorageContext::DispatcherHostSet*
DOMStorageContext::GetDispatcherHostSet() const {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return &dispatcher_host_set_;
}
@@ -189,7 +189,7 @@ void DOMStorageContext::DeleteDataModifiedSince(
}
void DOMStorageContext::DeleteLocalStorageFile(const FilePath& file_path) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
// Make sure that we don't delete a database that's currently being accessed
// by unloading all of the databases temporarily.
@@ -201,12 +201,12 @@ void DOMStorageContext::DeleteLocalStorageFile(const FilePath& file_path) {
}
void DOMStorageContext::DeleteLocalStorageForOrigin(const string16& origin_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DeleteLocalStorageFile(GetLocalStorageFilePath(origin_id));
}
void DOMStorageContext::DeleteAllLocalStorageFiles() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
// Make sure that we don't delete a database that's currently being accessed
// by unloading all of the databases temporarily.
@@ -245,7 +245,7 @@ DOMStorageNamespace* DOMStorageContext::CreateSessionStorage(
void DOMStorageContext::RegisterStorageNamespace(
DOMStorageNamespace* storage_namespace) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
int64 id = storage_namespace->id();
DCHECK(!GetStorageNamespace(id, false));
storage_namespace_map_[id] = storage_namespace;
@@ -254,7 +254,7 @@ void DOMStorageContext::RegisterStorageNamespace(
/* static */
void DOMStorageContext::CompleteCloningSessionStorage(
DOMStorageContext* context, int64 existing_id, int64 clone_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DOMStorageNamespace* existing_namespace =
context->GetStorageNamespace(existing_id, false);
// If nothing exists, then there's nothing to clone.
diff --git a/chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc b/chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc
index 17e99c4..f3c16f5 100644
--- a/chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc
+++ b/chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc
@@ -25,7 +25,7 @@ const GURL* DOMStorageDispatcherHost::storage_event_url_ = NULL;
DOMStorageDispatcherHost::
ScopedStorageEventContext::ScopedStorageEventContext(
DOMStorageDispatcherHost* dispatcher_host, const GURL* url) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DCHECK(!storage_event_host_);
DCHECK(!storage_event_url_);
storage_event_host_ = dispatcher_host;
@@ -36,7 +36,7 @@ ScopedStorageEventContext::ScopedStorageEventContext(
DOMStorageDispatcherHost::
ScopedStorageEventContext::~ScopedStorageEventContext() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DCHECK(storage_event_host_);
DCHECK(storage_event_url_);
storage_event_host_ = NULL;
@@ -59,7 +59,7 @@ DOMStorageDispatcherHost::~DOMStorageDispatcherHost() {
void DOMStorageDispatcherHost::Init(int process_id,
base::ProcessHandle process_handle) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(resource_message_filter_); // Ensure Shutdown() has not been called.
DCHECK(!process_handle_); // Make sure Init() has not yet been called.
DCHECK(process_handle);
@@ -69,7 +69,7 @@ void DOMStorageDispatcherHost::Init(int process_id,
}
void DOMStorageDispatcherHost::Shutdown() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
// This is not always true during testing.
if (process_handle_)
Context()->UnregisterDispatcherHost(this);
@@ -80,7 +80,7 @@ void DOMStorageDispatcherHost::Shutdown() {
void DOMStorageDispatcherHost::DispatchStorageEvent(const NullableString16& key,
const NullableString16& old_value, const NullableString16& new_value,
const string16& origin, const GURL& url, bool is_local_storage) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DCHECK(is_local_storage); // Only LocalStorage is implemented right now.
DCHECK(storage_event_host_);
ViewMsg_DOMStorageEvent_Params params;
@@ -93,14 +93,14 @@ void DOMStorageDispatcherHost::DispatchStorageEvent(const NullableString16& key,
: DOM_STORAGE_SESSION;
// The storage_event_host_ is the DOMStorageDispatcherHost that is up in the
// current call stack since it caused the storage event to fire.
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableMethod(storage_event_host_,
&DOMStorageDispatcherHost::OnStorageEvent, params));
}
bool DOMStorageDispatcherHost::OnMessageReceived(const IPC::Message& message,
bool* msg_is_ok) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(process_handle_);
bool handled = true;
@@ -124,13 +124,13 @@ int64 DOMStorageDispatcherHost::CloneSessionStorage(int64 original_id) {
}
void DOMStorageDispatcherHost::Send(IPC::Message* message) {
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
// TODO(jorlow): Even if we successfully post, I believe it's possible for
// the task to never run (if the IO thread is already shutting
// down). We may want to handle this case, though
// realistically it probably doesn't matter.
- if (!ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE, NewRunnableMethod(
+ if (!BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE, NewRunnableMethod(
this, &DOMStorageDispatcherHost::Send, message))) {
// The IO thread is dead.
delete message;
@@ -138,7 +138,7 @@ void DOMStorageDispatcherHost::Send(IPC::Message* message) {
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (!resource_message_filter_)
delete message;
else
@@ -148,10 +148,10 @@ void DOMStorageDispatcherHost::Send(IPC::Message* message) {
void DOMStorageDispatcherHost::OnStorageAreaId(int64 namespace_id,
const string16& origin,
IPC::Message* reply_msg) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
ChromeURLRequestContext* url_request_context =
resource_message_filter_->GetRequestContextForURL(GURL(origin));
- ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
this, &DOMStorageDispatcherHost::OnStorageAreaIdWebKit, namespace_id,
origin, reply_msg, url_request_context->host_content_settings_map()));
}
@@ -159,7 +159,7 @@ void DOMStorageDispatcherHost::OnStorageAreaId(int64 namespace_id,
void DOMStorageDispatcherHost::OnStorageAreaIdWebKit(
int64 namespace_id, const string16& origin, IPC::Message* reply_msg,
HostContentSettingsMap* host_content_settings_map) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DOMStorageNamespace* storage_namespace =
Context()->GetStorageNamespace(namespace_id, true);
if (!storage_namespace) {
@@ -177,13 +177,13 @@ void DOMStorageDispatcherHost::OnStorageAreaIdWebKit(
void DOMStorageDispatcherHost::OnLength(int64 storage_area_id,
IPC::Message* reply_msg) {
- if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
this, &DOMStorageDispatcherHost::OnLength, storage_area_id, reply_msg));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id);
if (!storage_area) {
BrowserRenderProcessHost::BadMessageTerminateProcess(
@@ -198,14 +198,14 @@ void DOMStorageDispatcherHost::OnLength(int64 storage_area_id,
void DOMStorageDispatcherHost::OnKey(int64 storage_area_id, unsigned index,
IPC::Message* reply_msg) {
- if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
this, &DOMStorageDispatcherHost::OnKey, storage_area_id, index,
reply_msg));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id);
if (!storage_area) {
BrowserRenderProcessHost::BadMessageTerminateProcess(
@@ -221,14 +221,14 @@ void DOMStorageDispatcherHost::OnKey(int64 storage_area_id, unsigned index,
void DOMStorageDispatcherHost::OnGetItem(int64 storage_area_id,
const string16& key,
IPC::Message* reply_msg) {
- if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
this, &DOMStorageDispatcherHost::OnGetItem, storage_area_id, key,
reply_msg));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id);
if (!storage_area) {
BrowserRenderProcessHost::BadMessageTerminateProcess(
@@ -244,14 +244,14 @@ void DOMStorageDispatcherHost::OnGetItem(int64 storage_area_id,
void DOMStorageDispatcherHost::OnSetItem(
int64 storage_area_id, const string16& key, const string16& value,
const GURL& url, IPC::Message* reply_msg) {
- if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
this, &DOMStorageDispatcherHost::OnSetItem, storage_area_id, key, value,
url, reply_msg));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id);
if (!storage_area) {
BrowserRenderProcessHost::BadMessageTerminateProcess(
@@ -281,14 +281,14 @@ void DOMStorageDispatcherHost::OnSetItem(
void DOMStorageDispatcherHost::OnRemoveItem(
int64 storage_area_id, const string16& key, const GURL& url,
IPC::Message* reply_msg) {
- if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
this, &DOMStorageDispatcherHost::OnRemoveItem, storage_area_id, key,
url, reply_msg));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id);
if (!storage_area) {
BrowserRenderProcessHost::BadMessageTerminateProcess(
@@ -304,14 +304,14 @@ void DOMStorageDispatcherHost::OnRemoveItem(
void DOMStorageDispatcherHost::OnClear(int64 storage_area_id, const GURL& url,
IPC::Message* reply_msg) {
- if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
this, &DOMStorageDispatcherHost::OnClear, storage_area_id, url,
reply_msg));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id);
if (!storage_area) {
BrowserRenderProcessHost::BadMessageTerminateProcess(
@@ -327,7 +327,7 @@ void DOMStorageDispatcherHost::OnClear(int64 storage_area_id, const GURL& url,
void DOMStorageDispatcherHost::OnStorageEvent(
const ViewMsg_DOMStorageEvent_Params& params) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
const DOMStorageContext::DispatcherHostSet* set =
Context()->GetDispatcherHostSet();
DOMStorageContext::DispatcherHostSet::const_iterator cur = set->begin();
diff --git a/chrome/browser/in_process_webkit/indexed_db_browsertest.cc b/chrome/browser/in_process_webkit/indexed_db_browsertest.cc
index 651b8cd..922b15e 100644
--- a/chrome/browser/in_process_webkit/indexed_db_browsertest.cc
+++ b/chrome/browser/in_process_webkit/indexed_db_browsertest.cc
@@ -25,7 +25,7 @@ const FilePath kTestIndexedDBFile(
class TestOnWebKitThread : public ThreadTestHelper {
public:
TestOnWebKitThread()
- : ThreadTestHelper(ChromeThread::WEBKIT) {
+ : ThreadTestHelper(BrowserThread::WEBKIT) {
}
const std::string& database_name() const { return database_name_; }
diff --git a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
index a015032a..16a0ed7 100644
--- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -50,7 +50,7 @@ namespace {
template <class T>
void DeleteOnWebKitThread(T* obj) {
- if (!ChromeThread::DeleteSoon(ChromeThread::WEBKIT, FROM_HERE, obj))
+ if (!BrowserThread::DeleteSoon(BrowserThread::WEBKIT, FROM_HERE, obj))
delete obj;
}
@@ -86,7 +86,7 @@ IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {
void IndexedDBDispatcherHost::Init(int process_id,
base::ProcessHandle process_handle) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(sender_); // Ensure Shutdown() has not been called.
DCHECK(!process_handle_); // Make sure Init() has not yet been called.
DCHECK(process_handle);
@@ -95,17 +95,17 @@ void IndexedDBDispatcherHost::Init(int process_id,
}
void IndexedDBDispatcherHost::Shutdown() {
- if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
+ if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
sender_ = NULL;
- bool success = ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE,
+ bool success = BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE,
NewRunnableMethod(this, &IndexedDBDispatcherHost::Shutdown));
if (success)
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT) ||
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT) ||
CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess));
DCHECK(!sender_);
@@ -114,7 +114,7 @@ void IndexedDBDispatcherHost::Shutdown() {
}
bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(process_handle_);
switch (message.type()) {
@@ -166,21 +166,21 @@ bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message) {
return false;
}
- bool success = ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod(
+ bool success = BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
this, &IndexedDBDispatcherHost::OnMessageReceivedWebKit, message));
DCHECK(success);
return true;
}
void IndexedDBDispatcherHost::Send(IPC::Message* message) {
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
// TODO(jorlow): Even if we successfully post, I believe it's possible for
// the task to never run (if the IO thread is already shutting
// down). We may want to handle this case, though
// realistically it probably doesn't matter.
- if (!ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE, NewRunnableMethod(
+ if (!BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE, NewRunnableMethod(
this, &IndexedDBDispatcherHost::Send, message))) {
// The IO thread is dead.
delete message;
@@ -188,7 +188,7 @@ void IndexedDBDispatcherHost::Send(IPC::Message* message) {
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (!sender_)
delete message;
else
@@ -197,7 +197,7 @@ void IndexedDBDispatcherHost::Send(IPC::Message* message) {
void IndexedDBDispatcherHost::OnMessageReceivedWebKit(
const IPC::Message& message) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DCHECK(process_handle_);
bool msg_is_ok = true;
@@ -260,7 +260,7 @@ void IndexedDBDispatcherHost::OnIDBFactoryOpen(
IndexedDBContext::kIndexedDBDirectory);
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
GURL host(string16(WebSecurityOrigin::createFromDatabaseIdentifier(
params.origin_).toString()));
@@ -300,7 +300,7 @@ template <typename ObjectType>
ObjectType* IndexedDBDispatcherHost::GetOrTerminateProcess(
IDMap<ObjectType, IDMapOwnPointer>* map, int32 return_object_id,
IPC::Message* reply_msg, uint32 message_type) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
ObjectType* return_object = map->Lookup(return_object_id);
if (!return_object) {
BrowserRenderProcessHost::BadMessageTerminateProcess(message_type,
@@ -422,7 +422,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateObjectStore(
const ViewHostMsg_IDBDatabaseCreateObjectStore_Params& params,
IPC::Message* reply_msg) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess(
&map_, params.idb_database_id_, NULL,
ViewHostMsg_IDBDatabaseCreateObjectStore::ID);
@@ -460,7 +460,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnRemoveObjectStore(
const string16& name,
int32 transaction_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess(
&map_, idb_database_id, NULL,
ViewHostMsg_IDBDatabaseRemoveObjectStore::ID);
@@ -475,7 +475,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnRemoveObjectStore(
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnSetVersion(
int32 idb_database_id, int32 response_id, const string16& version) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess(
&map_, idb_database_id, NULL,
ViewHostMsg_IDBDatabaseSetVersion::ID);
@@ -583,7 +583,7 @@ void IndexedDBDispatcherHost::IndexDispatcherHost::OnUnique(
void IndexedDBDispatcherHost::IndexDispatcherHost::OnOpenObjectCursor(
const ViewHostMsg_IDBIndexOpenCursor_Params& params) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBIndex* idb_index = parent_->GetOrTerminateProcess(
&map_, params.idb_index_id_, NULL,
ViewHostMsg_IDBIndexOpenObjectCursor::ID);
@@ -602,7 +602,7 @@ void IndexedDBDispatcherHost::IndexDispatcherHost::OnOpenObjectCursor(
void IndexedDBDispatcherHost::IndexDispatcherHost::OnOpenKeyCursor(
const ViewHostMsg_IDBIndexOpenCursor_Params& params) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBIndex* idb_index = parent_->GetOrTerminateProcess(
&map_, params.idb_index_id_, NULL, ViewHostMsg_IDBIndexOpenKeyCursor::ID);
WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess(
@@ -623,7 +623,7 @@ void IndexedDBDispatcherHost::IndexDispatcherHost::OnGetObject(
int32 response_id,
const IndexedDBKey& key,
int32 transaction_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBIndex* idb_index = parent_->GetOrTerminateProcess(
&map_, idb_index_id, NULL, ViewHostMsg_IDBIndexGetObject::ID);
WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess(
@@ -642,7 +642,7 @@ void IndexedDBDispatcherHost::IndexDispatcherHost::OnGetKey(
int32 response_id,
const IndexedDBKey& key,
int32 transaction_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBIndex* idb_index = parent_->GetOrTerminateProcess(
&map_, idb_index_id, NULL, ViewHostMsg_IDBIndexGetKey::ID);
WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess(
@@ -742,7 +742,7 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnGet(
int32 response_id,
const IndexedDBKey& key,
int32 transaction_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
&map_, idb_object_store_id, NULL, ViewHostMsg_IDBObjectStoreGet::ID);
WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess(
@@ -758,7 +758,7 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnGet(
void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnPut(
const ViewHostMsg_IDBObjectStorePut_Params& params) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
&map_, params.idb_object_store_id_, NULL,
ViewHostMsg_IDBObjectStorePut::ID);
@@ -779,7 +779,7 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnRemove(
int32 response_id,
const IndexedDBKey& key,
int32 transaction_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
&map_, idb_object_store_id, NULL, ViewHostMsg_IDBObjectStoreRemove::ID);
WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess(
@@ -796,7 +796,7 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnRemove(
void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnCreateIndex(
const ViewHostMsg_IDBObjectStoreCreateIndex_Params& params,
IPC::Message* reply_msg) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
&map_, params.idb_object_store_id_, NULL,
ViewHostMsg_IDBObjectStoreCreateIndex::ID);
@@ -831,7 +831,7 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnRemoveIndex(
int32 idb_object_store_id,
const string16& name,
int32 transaction_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
&map_, idb_object_store_id, NULL,
ViewHostMsg_IDBObjectStoreRemoveIndex::ID);
@@ -846,7 +846,7 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnRemoveIndex(
void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnOpenCursor(
const ViewHostMsg_IDBObjectStoreOpenCursor_Params& params) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
&parent_->object_store_dispatcher_host_->map_,
params.idb_object_store_id_, NULL,
@@ -956,7 +956,7 @@ void IndexedDBDispatcherHost::CursorDispatcherHost::OnUpdate(
int32 cursor_id,
int32 response_id,
const SerializedScriptValue& value) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(
&map_, cursor_id, NULL, ViewHostMsg_IDBCursorUpdate::ID);
if (!idb_cursor)
@@ -969,7 +969,7 @@ void IndexedDBDispatcherHost::CursorDispatcherHost::OnContinue(
int32 cursor_id,
int32 response_id,
const IndexedDBKey& key) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(
&map_, cursor_id, NULL, ViewHostMsg_IDBCursorContinue::ID);
if (!idb_cursor)
@@ -981,7 +981,7 @@ void IndexedDBDispatcherHost::CursorDispatcherHost::OnContinue(
void IndexedDBDispatcherHost::CursorDispatcherHost::OnRemove(
int32 cursor_id,
int32 response_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(
&map_, cursor_id, NULL, ViewHostMsg_IDBCursorUpdate::ID);
if (!idb_cursor)
@@ -1074,7 +1074,7 @@ void IndexedDBDispatcherHost::TransactionDispatcherHost::OnObjectStore(
void IndexedDBDispatcherHost::
TransactionDispatcherHost::OnDidCompleteTaskEvents(int transaction_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess(
&map_, transaction_id, 0,
ViewHostMsg_IDBTransactionDidCompleteTaskEvents::ID);
diff --git a/chrome/browser/in_process_webkit/indexed_db_key_utility_client.cc b/chrome/browser/in_process_webkit/indexed_db_key_utility_client.cc
index 2acef08..6667d50 100644
--- a/chrome/browser/in_process_webkit/indexed_db_key_utility_client.cc
+++ b/chrome/browser/in_process_webkit/indexed_db_key_utility_client.cc
@@ -22,7 +22,7 @@ IndexedDBKeyUtilityClient::~IndexedDBKeyUtilityClient() {
}
void IndexedDBKeyUtilityClient::StartUtilityProcess() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DCHECK(state_ == STATE_UNINITIALIZED);
GetRDHAndStartUtilityProcess();
@@ -32,7 +32,7 @@ void IndexedDBKeyUtilityClient::StartUtilityProcess() {
}
void IndexedDBKeyUtilityClient::EndUtilityProcess() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DCHECK(state_ == STATE_INITIALIZED);
EndUtilityProcessInternal();
@@ -45,7 +45,7 @@ void IndexedDBKeyUtilityClient::CreateIDBKeysFromSerializedValuesAndKeyPath(
const std::vector<SerializedScriptValue>& values,
const string16& key_path,
std::vector<IndexedDBKey>* keys) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
DCHECK(state_ == STATE_INITIALIZED);
state_ = STATE_CREATING_KEYS;
@@ -61,15 +61,15 @@ void IndexedDBKeyUtilityClient::GetRDHAndStartUtilityProcess() {
// a pointer to the ResourceDispatcherHost. This can only
// be done on the UI thread. See the comment at the top of
// browser_process.h
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
this,
&IndexedDBKeyUtilityClient::GetRDHAndStartUtilityProcess));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
StartUtilityProcessInternal(g_browser_process->resource_dispatcher_host());
}
@@ -77,31 +77,31 @@ void IndexedDBKeyUtilityClient::StartUtilityProcessInternal(
ResourceDispatcherHost* rdh) {
DCHECK(rdh);
// The ResourceDispatcherHost can only be used on the IO thread.
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
this,
&IndexedDBKeyUtilityClient::StartUtilityProcessInternal,
rdh));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(state_ == STATE_UNINITIALIZED);
client_ = new IndexedDBKeyUtilityClient::Client(this);
utility_process_host_ = new UtilityProcessHost(
- rdh, client_.get(), ChromeThread::IO);
+ rdh, client_.get(), BrowserThread::IO);
utility_process_host_->StartBatchMode();
state_ = STATE_INITIALIZED;
waitable_event_.Signal();
}
void IndexedDBKeyUtilityClient::EndUtilityProcessInternal() {
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
this,
&IndexedDBKeyUtilityClient::EndUtilityProcessInternal));
@@ -118,9 +118,9 @@ void IndexedDBKeyUtilityClient::EndUtilityProcessInternal() {
void IndexedDBKeyUtilityClient::CallStartIDBKeyFromValueAndKeyPathFromIOThread(
const std::vector<SerializedScriptValue>& values,
const string16& key_path) {
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this,
&IndexedDBKeyUtilityClient::
CallStartIDBKeyFromValueAndKeyPathFromIOThread,
@@ -128,13 +128,13 @@ void IndexedDBKeyUtilityClient::CallStartIDBKeyFromValueAndKeyPathFromIOThread(
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
utility_process_host_->StartIDBKeysFromValuesAndKeyPath(
0, values, key_path);
}
void IndexedDBKeyUtilityClient::SetKeys(const std::vector<IndexedDBKey>& keys) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
keys_ = keys;
}
diff --git a/chrome/browser/in_process_webkit/webkit_context.cc b/chrome/browser/in_process_webkit/webkit_context.cc
index 598e5aa..8e54179 100644
--- a/chrome/browser/in_process_webkit/webkit_context.cc
+++ b/chrome/browser/in_process_webkit/webkit_context.cc
@@ -23,24 +23,24 @@ WebKitContext::~WebKitContext() {
// will just get deleted if the WebKit thread isn't created (which only
// happens during testing).
DOMStorageContext* dom_storage_context = dom_storage_context_.release();
- if (!ChromeThread::DeleteSoon(
- ChromeThread::WEBKIT, FROM_HERE, dom_storage_context)) {
+ if (!BrowserThread::DeleteSoon(
+ BrowserThread::WEBKIT, FROM_HERE, dom_storage_context)) {
// The WebKit thread wasn't created, and the task got deleted without
// freeing the DOMStorageContext, so delete it manually.
delete dom_storage_context;
}
IndexedDBContext* indexed_db_context = indexed_db_context_.release();
- if (!ChromeThread::DeleteSoon(
- ChromeThread::WEBKIT, FROM_HERE, indexed_db_context)) {
+ if (!BrowserThread::DeleteSoon(
+ BrowserThread::WEBKIT, FROM_HERE, indexed_db_context)) {
delete indexed_db_context;
}
}
void WebKitContext::PurgeMemory() {
- if (!ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)) {
- bool result = ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)) {
+ bool result = BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE,
NewRunnableMethod(this, &WebKitContext::PurgeMemory));
DCHECK(result);
return;
@@ -53,9 +53,9 @@ void WebKitContext::DeleteDataModifiedSince(
const base::Time& cutoff,
const char* url_scheme_to_be_skipped,
const std::vector<string16>& protected_origins) {
- if (!ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)) {
- bool result = ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)) {
+ bool result = BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE,
NewRunnableMethod(this, &WebKitContext::DeleteDataModifiedSince,
cutoff, url_scheme_to_be_skipped, protected_origins));
DCHECK(result);
@@ -69,9 +69,9 @@ void WebKitContext::DeleteDataModifiedSince(
void WebKitContext::DeleteSessionStorageNamespace(
int64 session_storage_namespace_id) {
- if (!ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)) {
- ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)) {
+ BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE,
NewRunnableMethod(this, &WebKitContext::DeleteSessionStorageNamespace,
session_storage_namespace_id));
return;
diff --git a/chrome/browser/in_process_webkit/webkit_context_unittest.cc b/chrome/browser/in_process_webkit/webkit_context_unittest.cc
index 9158495..a920726 100644
--- a/chrome/browser/in_process_webkit/webkit_context_unittest.cc
+++ b/chrome/browser/in_process_webkit/webkit_context_unittest.cc
@@ -16,8 +16,8 @@ class MockDOMStorageContext : public DOMStorageContext {
}
virtual void PurgeMemory() {
- EXPECT_FALSE(ChromeThread::CurrentlyOn(ChromeThread::UI));
- EXPECT_TRUE(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ EXPECT_FALSE(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
++purge_count_;
}
@@ -42,7 +42,7 @@ TEST(WebKitContextTest, Basic) {
TEST(WebKitContextTest, PurgeMemory) {
// Start up a WebKit thread for the WebKitContext to call the
// DOMStorageContext on.
- ChromeThread webkit_thread(ChromeThread::WEBKIT);
+ BrowserThread webkit_thread(BrowserThread::WEBKIT);
webkit_thread.Start();
// Create the contexts.
diff --git a/chrome/browser/in_process_webkit/webkit_thread.cc b/chrome/browser/in_process_webkit/webkit_thread.cc
index 486e703..8ff8174 100644
--- a/chrome/browser/in_process_webkit/webkit_thread.cc
+++ b/chrome/browser/in_process_webkit/webkit_thread.cc
@@ -14,11 +14,11 @@ WebKitThread::WebKitThread() {
// This happens on the UI thread after the IO thread has been shut down.
WebKitThread::~WebKitThread() {
- // We can't just check CurrentlyOn(ChromeThread::UI) because in unit tests,
+ // We can't just check CurrentlyOn(BrowserThread::UI) because in unit tests,
// MessageLoop::Current is sometimes NULL and other times valid and there's
- // no ChromeThread object. Can't check that CurrentlyOn is not IO since
- // some unit tests set that ChromeThread for other checks.
- DCHECK(!ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ // no BrowserThread object. Can't check that CurrentlyOn is not IO since
+ // some unit tests set that BrowserThread for other checks.
+ DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
}
void WebKitThread::Initialize() {
@@ -35,7 +35,7 @@ void WebKitThread::Initialize() {
}
WebKitThread::InternalWebKitThread::InternalWebKitThread()
- : ChromeThread(ChromeThread::WEBKIT) {
+ : BrowserThread(BrowserThread::WEBKIT) {
}
WebKitThread::InternalWebKitThread::~InternalWebKitThread() {
diff --git a/chrome/browser/in_process_webkit/webkit_thread.h b/chrome/browser/in_process_webkit/webkit_thread.h
index eeed43c..7884501 100644
--- a/chrome/browser/in_process_webkit/webkit_thread.h
+++ b/chrome/browser/in_process_webkit/webkit_thread.h
@@ -25,7 +25,7 @@ class WebKitThread {
private:
// Must be private so that we can carefully control its lifetime.
- class InternalWebKitThread : public ChromeThread {
+ class InternalWebKitThread : public BrowserThread {
public:
InternalWebKitThread();
virtual ~InternalWebKitThread();
diff --git a/chrome/browser/in_process_webkit/webkit_thread_unittest.cc b/chrome/browser/in_process_webkit/webkit_thread_unittest.cc
index 668062a..63296ff3 100644
--- a/chrome/browser/in_process_webkit/webkit_thread_unittest.cc
+++ b/chrome/browser/in_process_webkit/webkit_thread_unittest.cc
@@ -5,17 +5,18 @@
#include "chrome/browser/in_process_webkit/webkit_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST(WebKitThreadTest, DISABLED_ExposedInChromeThread) {
+TEST(WebKitThreadTest, DISABLED_ExposedInBrowserThread) {
int* null = NULL; // Help the template system out.
- EXPECT_FALSE(ChromeThread::DeleteSoon(ChromeThread::WEBKIT, FROM_HERE, null));
+ EXPECT_FALSE(BrowserThread::DeleteSoon(BrowserThread::WEBKIT,
+ FROM_HERE, null));
{
WebKitThread thread;
- EXPECT_FALSE(ChromeThread::DeleteSoon(ChromeThread::WEBKIT,
- FROM_HERE, null));
+ EXPECT_FALSE(BrowserThread::DeleteSoon(BrowserThread::WEBKIT,
+ FROM_HERE, null));
thread.Initialize();
- EXPECT_TRUE(ChromeThread::DeleteSoon(ChromeThread::WEBKIT,
- FROM_HERE, null));
+ EXPECT_TRUE(BrowserThread::DeleteSoon(BrowserThread::WEBKIT,
+ FROM_HERE, null));
}
- EXPECT_FALSE(ChromeThread::DeleteSoon(ChromeThread::WEBKIT,
- FROM_HERE, null));
+ EXPECT_FALSE(BrowserThread::DeleteSoon(BrowserThread::WEBKIT,
+ FROM_HERE, null));
}
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 99be401..a3b662b 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -102,7 +102,7 @@ class NotificationPermissionCallbackTask : public Task {
}
virtual void Run() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_);
if (host)
host->Send(new ViewMsg_PermissionRequestDone(route_id_, request_id_));
@@ -139,8 +139,8 @@ class NotificationPermissionInfoBarDelegate : public ConfirmInfoBarDelegate {
if (!action_taken_)
UMA_HISTOGRAM_COUNTS("NotificationPermissionRequest.Ignored", 1);
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
new NotificationPermissionCallbackTask(
process_id_, route_id_, callback_context_));
@@ -269,24 +269,24 @@ void DesktopNotificationService::StopObserving() {
}
void DesktopNotificationService::GrantPermission(const GURL& origin) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
PersistPermissionChange(origin, true);
// Schedule a cache update on the IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
prefs_cache_.get(), &NotificationsPrefsCache::CacheAllowedOrigin,
origin));
}
void DesktopNotificationService::DenyPermission(const GURL& origin) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
PersistPermissionChange(origin, false);
// Schedule a cache update on the IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
prefs_cache_.get(), &NotificationsPrefsCache::CacheDeniedOrigin,
origin));
@@ -307,8 +307,8 @@ void DesktopNotificationService::Observe(NotificationType type,
std::vector<GURL> allowed_origins(GetAllowedOrigins());
// Schedule a cache update on the IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
prefs_cache_.get(),
&NotificationsPrefsCache::SetCacheAllowedOrigins,
@@ -321,8 +321,8 @@ void DesktopNotificationService::Observe(NotificationType type,
std::vector<GURL> denied_origins(GetBlockedOrigins());
// Schedule a cache update on the IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
prefs_cache_.get(),
&NotificationsPrefsCache::SetCacheDeniedOrigins,
@@ -332,8 +332,8 @@ void DesktopNotificationService::Observe(NotificationType type,
prefs->GetInteger(prefs::kDesktopNotificationDefaultContentSetting));
// Schedule a cache update on the IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
prefs_cache_.get(),
&NotificationsPrefsCache::SetCacheDefaultContentSetting,
@@ -417,7 +417,7 @@ ContentSetting DesktopNotificationService::GetDefaultContentSetting() {
void DesktopNotificationService::SetDefaultContentSetting(
ContentSetting setting) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
profile_->GetPrefs()->SetInteger(
prefs::kDesktopNotificationDefaultContentSetting,
setting == CONTENT_SETTING_DEFAULT ? kDefaultSetting : setting);
@@ -425,7 +425,7 @@ void DesktopNotificationService::SetDefaultContentSetting(
}
void DesktopNotificationService::ResetToDefaultContentSetting() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
PrefService* prefs = profile_->GetPrefs();
prefs->ClearPref(prefs::kDesktopNotificationDefaultContentSetting);
@@ -501,7 +501,7 @@ void DesktopNotificationService::ResetAllOrigins() {
ContentSetting DesktopNotificationService::GetContentSetting(
const GURL& origin) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (profile_->IsOffTheRecord())
return kDefaultSetting;
@@ -521,7 +521,7 @@ ContentSetting DesktopNotificationService::GetContentSetting(
void DesktopNotificationService::RequestPermission(
const GURL& origin, int process_id, int route_id, int callback_context,
TabContents* tab) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!tab)
return;
@@ -537,8 +537,8 @@ void DesktopNotificationService::RequestPermission(
route_id, callback_context));
} else {
// Notify renderer immediately.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
new NotificationPermissionCallbackTask(
process_id, route_id, callback_context));
}
@@ -563,7 +563,7 @@ bool DesktopNotificationService::CancelDesktopNotification(
bool DesktopNotificationService::ShowDesktopNotification(
const ViewHostMsg_ShowNotification_Params& params,
int process_id, int route_id, DesktopNotificationSource source) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
const GURL& origin = params.origin;
NotificationObjectProxy* proxy =
new NotificationObjectProxy(process_id, route_id,
diff --git a/chrome/browser/notifications/desktop_notification_service_unittest.cc b/chrome/browser/notifications/desktop_notification_service_unittest.cc
index f88466b..9f0067c 100644
--- a/chrome/browser/notifications/desktop_notification_service_unittest.cc
+++ b/chrome/browser/notifications/desktop_notification_service_unittest.cc
@@ -28,10 +28,10 @@ class ThreadProxy : public base::RefCountedThreadSafe<ThreadProxy> {
permission_(0) {
// The current message loop was already initalized by the test superclass.
ui_thread_.reset(
- new ChromeThread(ChromeThread::UI, MessageLoop::current()));
+ new BrowserThread(BrowserThread::UI, MessageLoop::current()));
// Create IO thread, start its message loop.
- io_thread_.reset(new ChromeThread(ChromeThread::IO));
+ io_thread_.reset(new BrowserThread(BrowserThread::IO));
io_thread_->Start();
// Calling PauseIOThread() here isn't safe, because the runnable method
@@ -39,25 +39,25 @@ class ThreadProxy : public base::RefCountedThreadSafe<ThreadProxy> {
}
int CacheHasPermission(NotificationsPrefsCache* cache, const GURL& url) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this, &ThreadProxy::CacheHasPermissionIO,
cache, url));
io_event_.Signal();
ui_event_.Wait(); // Wait for IO thread to be done.
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this, &ThreadProxy::PauseIOThreadIO));
return permission_;
}
void PauseIOThread() {
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this, &ThreadProxy::PauseIOThreadIO));
}
void DrainIOThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
io_event_.Signal();
io_thread_->Stop();
}
@@ -69,20 +69,20 @@ class ThreadProxy : public base::RefCountedThreadSafe<ThreadProxy> {
}
void PauseIOThreadIO() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
io_event_.Wait();
}
void CacheHasPermissionIO(NotificationsPrefsCache* cache, const GURL& url) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
permission_ = cache->HasPermission(url);
ui_event_.Signal();
}
base::WaitableEvent io_event_;
base::WaitableEvent ui_event_;
- scoped_ptr<ChromeThread> ui_thread_;
- scoped_ptr<ChromeThread> io_thread_;
+ scoped_ptr<BrowserThread> ui_thread_;
+ scoped_ptr<BrowserThread> io_thread_;
int permission_;
};
diff --git a/chrome/browser/notifications/desktop_notifications_unittest.cc b/chrome/browser/notifications/desktop_notifications_unittest.cc
index d324b6a..99466901 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.cc
+++ b/chrome/browser/notifications/desktop_notifications_unittest.cc
@@ -68,7 +68,7 @@ int MockBalloonCollection::UppermostVerticalPosition() {
}
DesktopNotificationsTest::DesktopNotificationsTest()
- : ui_thread_(ChromeThread::UI, &message_loop_) {
+ : ui_thread_(BrowserThread::UI, &message_loop_) {
}
DesktopNotificationsTest::~DesktopNotificationsTest() {
diff --git a/chrome/browser/notifications/desktop_notifications_unittest.h b/chrome/browser/notifications/desktop_notifications_unittest.h
index ab3ad63..6066c82 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.h
+++ b/chrome/browser/notifications/desktop_notifications_unittest.h
@@ -100,7 +100,7 @@ class DesktopNotificationsTest : public testing::Test {
// Create a message loop to allow notifications code to post tasks,
// and a thread so that notifications code runs on the expected thread.
MessageLoopForUI message_loop_;
- ChromeThread ui_thread_;
+ BrowserThread ui_thread_;
// Test profile.
scoped_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/notifications/notification_exceptions_table_model_unittest.cc b/chrome/browser/notifications/notification_exceptions_table_model_unittest.cc
index 5a650ae..f1e78b8 100644
--- a/chrome/browser/notifications/notification_exceptions_table_model_unittest.cc
+++ b/chrome/browser/notifications/notification_exceptions_table_model_unittest.cc
@@ -14,7 +14,7 @@
class NotificationExceptionsTableModelTest : public RenderViewHostTestHarness {
public:
NotificationExceptionsTableModelTest()
- : ui_thread_(ChromeThread::UI, MessageLoop::current()) {
+ : ui_thread_(BrowserThread::UI, MessageLoop::current()) {
}
virtual ~NotificationExceptionsTableModelTest() {
@@ -47,7 +47,7 @@ class NotificationExceptionsTableModelTest : public RenderViewHostTestHarness {
}
protected:
- ChromeThread ui_thread_;
+ BrowserThread ui_thread_;
scoped_ptr<NotificationExceptionsTableModel> model_;
DesktopNotificationService* service_;
};
diff --git a/chrome/browser/notifications/notification_object_proxy.cc b/chrome/browser/notifications/notification_object_proxy.cc
index edf35df..34185e5 100644
--- a/chrome/browser/notifications/notification_object_proxy.cc
+++ b/chrome/browser/notifications/notification_object_proxy.cc
@@ -65,9 +65,9 @@ std::string NotificationObjectProxy::id() const {
void NotificationObjectProxy::DeliverMessage(IPC::Message* message) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this, &NotificationObjectProxy::Send, message));
}
@@ -77,7 +77,7 @@ void NotificationObjectProxy::Send(IPC::Message* message) {
// Take ownership of the message; ownership will pass to a host if possible.
scoped_ptr<IPC::Message> owned_message(message);
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_);
if (host) {
// Pass ownership to the host.
diff --git a/chrome/browser/notifications/notifications_prefs_cache.cc b/chrome/browser/notifications/notifications_prefs_cache.cc
index 8603d9e..22a5378 100644
--- a/chrome/browser/notifications/notifications_prefs_cache.cc
+++ b/chrome/browser/notifications/notifications_prefs_cache.cc
@@ -93,8 +93,8 @@ bool NotificationsPrefsCache::IsOriginDenied(
void NotificationsPrefsCache::CheckThreadAccess() {
if (is_initialized_) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
} else {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
}
diff --git a/chrome/browser/notifications/notifications_prefs_cache_unittest.cc b/chrome/browser/notifications/notifications_prefs_cache_unittest.cc
index 0cbea9e..ba6e073 100644
--- a/chrome/browser/notifications/notifications_prefs_cache_unittest.cc
+++ b/chrome/browser/notifications/notifications_prefs_cache_unittest.cc
@@ -18,7 +18,7 @@ TEST(NotificationsPrefsCacheTest, CanCreate) {
{
MessageLoop loop;
- ChromeThread ui_thread(ChromeThread::UI, &loop);
+ BrowserThread ui_thread(BrowserThread::UI, &loop);
cache->SetCacheAllowedOrigins(allowed_origins);
cache->SetCacheDeniedOrigins(denied_origins);
@@ -29,7 +29,7 @@ TEST(NotificationsPrefsCacheTest, CanCreate) {
{
MessageLoop loop;
- ChromeThread io_thread(ChromeThread::IO, &loop);
+ BrowserThread io_thread(BrowserThread::IO, &loop);
cache->CacheAllowedOrigin(GURL("http://allowed2.com"));
cache->CacheDeniedOrigin(GURL("http://denied2.com"));