summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-10 22:24:48 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-10 22:24:48 +0000
commitd04e76609929454e853117ea8c544774e48d50ed (patch)
tree4f86e1ab973913bf5238d036a496028b0774f6c1 /chrome
parentcc4c9e1dca4f95d322aedff8e520621f4cee5087 (diff)
downloadchromium_src-d04e76609929454e853117ea8c544774e48d50ed.zip
chromium_src-d04e76609929454e853117ea8c544774e48d50ed.tar.gz
chromium_src-d04e76609929454e853117ea8c544774e48d50ed.tar.bz2
Rename ChromeThread to BrowserThread Part14:
- Rename the entries under the first 40 files. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3667002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62126 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/aeropeek_manager.cc34
-rw-r--r--chrome/browser/app_controller_mac.mm4
-rw-r--r--chrome/browser/autocomplete_history_manager_unittest.cc4
-rw-r--r--chrome/browser/background_mode_manager.cc10
-rw-r--r--chrome/browser/browser_about_handler.cc20
-rw-r--r--chrome/browser/browser_child_process_host.cc8
-rw-r--r--chrome/browser/browser_commands_unittest.cc2
-rw-r--r--chrome/browser/browser_init.cc8
-rw-r--r--chrome/browser/browser_main.cc6
-rw-r--r--chrome/browser/browser_main_posix.cc4
-rw-r--r--chrome/browser/browser_process.h2
-rw-r--r--chrome/browser/browser_process_impl.cc16
-rw-r--r--chrome/browser/browser_process_sub_thread.cc4
-rw-r--r--chrome/browser/browser_process_sub_thread.h4
-rw-r--r--chrome/browser/browser_shutdown.cc10
-rw-r--r--chrome/browser/browsing_data_appcache_helper.cc22
-rw-r--r--chrome/browser/browsing_data_database_helper.cc18
-rw-r--r--chrome/browser/browsing_data_database_helper_browsertest.cc2
-rw-r--r--chrome/browser/browsing_data_indexed_db_helper.cc24
-rw-r--r--chrome/browser/browsing_data_local_storage_helper.cc24
-rw-r--r--chrome/browser/browsing_data_local_storage_helper_browsertest.cc4
-rw-r--r--chrome/browser/browsing_data_remover.cc40
-rw-r--r--chrome/browser/child_process_launcher.cc16
-rw-r--r--chrome/browser/chrome_blob_storage_context.cc4
-rw-r--r--chrome/browser/chrome_blob_storage_context.h2
-rw-r--r--chrome/browser/chrome_plugin_browsing_context.cc2
-rw-r--r--chrome/browser/chrome_plugin_host.cc8
-rw-r--r--chrome/browser/chrome_plugin_unittest.cc6
-rw-r--r--chrome/browser/content_exceptions_table_model_unittest.cc4
-rw-r--r--chrome/browser/content_setting_bubble_model_unittest.cc4
-rw-r--r--chrome/browser/content_setting_image_model_unittest.cc4
-rw-r--r--chrome/browser/cookies_tree_model_unittest.cc8
-rw-r--r--chrome/browser/crash_handler_host_linux.cc4
-rw-r--r--chrome/browser/external_tab_container_win.cc2
-rw-r--r--chrome/browser/file_path_watcher.h4
-rw-r--r--chrome/browser/file_path_watcher_inotify.cc12
36 files changed, 175 insertions, 175 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 586fcab..69c844c 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -916,11 +916,11 @@ LRESULT AeroPeekWindow::OnCreate(LPCREATESTRUCT create_struct) {
// may take some time. (For example, when we create an ITaskbarList3
// interface for the first time, Windows loads DLLs and we need to wait for
// some time.)
- ChromeThread::PostTask(ChromeThread::IO,
- FROM_HERE,
- new RegisterThumbnailTask(frame_window_,
- hwnd(),
- tab_active_));
+ BrowserThread::PostTask(
+ BrowserThread::IO,
+ FROM_HERE,
+ new RegisterThumbnailTask(frame_window_, hwnd(), tab_active_));
+
return 0;
}
@@ -955,13 +955,13 @@ LRESULT AeroPeekWindow::OnDwmSendIconicThumbnail(UINT message,
delegate_->GetTabThumbnail(tab_id_, &thumbnail);
gfx::Size aeropeek_size(HIWORD(lparam), LOWORD(lparam));
- ChromeThread::PostTask(ChromeThread::IO,
- FROM_HERE,
- new SendThumbnailTask(hwnd(),
- GetContentBounds(),
- aeropeek_size,
- thumbnail,
- &ready_to_update_thumbnail_));
+ BrowserThread::PostTask(BrowserThread::IO,
+ FROM_HERE,
+ new SendThumbnailTask(hwnd(),
+ GetContentBounds(),
+ aeropeek_size,
+ thumbnail,
+ &ready_to_update_thumbnail_));
return 0;
}
@@ -979,11 +979,11 @@ LRESULT AeroPeekWindow::OnDwmSendIconicLivePreviewBitmap(UINT message,
SkBitmap preview;
delegate_->GetTabPreview(tab_id_, &preview);
- ChromeThread::PostTask(ChromeThread::IO,
- FROM_HERE,
- new SendLivePreviewTask(hwnd(),
- GetContentBounds(),
- preview));
+ BrowserThread::PostTask(
+ BrowserThread::IO,
+ FROM_HERE,
+ new SendLivePreviewTask(hwnd(), GetContentBounds(), preview));
+
return 0;
}
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index cbda456..76d3078 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -134,8 +134,8 @@ void RecordLastRunAppBundlePath() {
app_mode::kAppPrefsID);
// Sync after a delay avoid I/O contention on startup; 1500 ms is plenty.
- ChromeThread::PostDelayedTask(ChromeThread::FILE, FROM_HERE,
- new PrefsSyncTask(), 1500);
+ BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE,
+ new PrefsSyncTask(), 1500);
}
} // anonymous namespace
diff --git a/chrome/browser/autocomplete_history_manager_unittest.cc b/chrome/browser/autocomplete_history_manager_unittest.cc
index f60ccce..b1ef109 100644
--- a/chrome/browser/autocomplete_history_manager_unittest.cc
+++ b/chrome/browser/autocomplete_history_manager_unittest.cc
@@ -27,7 +27,7 @@ class MockWebDataService : public WebDataService {
class AutocompleteHistoryManagerTest : public testing::Test {
protected:
AutocompleteHistoryManagerTest()
- : ui_thread_(ChromeThread::UI, &message_loop_) {
+ : ui_thread_(BrowserThread::UI, &message_loop_) {
}
virtual void SetUp() {
@@ -37,7 +37,7 @@ class AutocompleteHistoryManagerTest : public testing::Test {
}
MessageLoopForUI message_loop_;
- ChromeThread ui_thread_;
+ BrowserThread ui_thread_;
TestingProfile profile_;
scoped_refptr<MockWebDataService> web_data_service_;
diff --git a/chrome/browser/background_mode_manager.cc b/chrome/browser/background_mode_manager.cc
index 3a5f293..64a5023 100644
--- a/chrome/browser/background_mode_manager.cc
+++ b/chrome/browser/background_mode_manager.cc
@@ -64,7 +64,7 @@ const wchar_t* kBackgroundModeRegistryKeyName = L"chromium";
namespace {
FilePath GetAutostartDirectory(base::Environment* environment) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
FilePath result =
base::GetXDGDirectory(environment, kXdgConfigHome, kConfig);
result = result.Append(kAutostart);
@@ -339,11 +339,11 @@ void BackgroundModeManager::EnableLaunchOnStartup(bool should_launch) {
return;
#if defined(OS_LINUX)
if (should_launch)
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
- new EnableLaunchOnStartupTask());
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
+ new EnableLaunchOnStartupTask());
else
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
- new DisableLaunchOnStartupTask());
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
+ new DisableLaunchOnStartupTask());
#elif defined(OS_MACOSX)
if (should_launch) {
// Return if Chrome is already a Login Item (avoid overriding user choice).
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index faa4878..acd23a3 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -314,30 +314,30 @@ class AboutDnsHandler : public base::RefCountedThreadSafe<AboutDnsHandler> {
AboutDnsHandler(AboutSource* source, int request_id)
: source_(source),
request_id_(request_id) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
// Calls FinishOnUIThread() on completion.
void StartOnUIThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this, &AboutDnsHandler::StartOnIOThread));
}
void StartOnIOThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
std::string data;
chrome_browser_net::PredictorGetHtmlInfo(&data);
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &AboutDnsHandler::FinishOnUIThread, data));
}
void FinishOnUIThread(const std::string& data) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
source_->FinishDataRequest(data, request_id_);
}
@@ -889,8 +889,8 @@ AboutSource::AboutSource()
about_source = this;
// Add us to the global URL handler on the IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
diff --git a/chrome/browser/browser_child_process_host.cc b/chrome/browser/browser_child_process_host.cc
index 36f8411..fb846b4 100644
--- a/chrome/browser/browser_child_process_host.cc
+++ b/chrome/browser/browser_child_process_host.cc
@@ -127,8 +127,8 @@ void BrowserChildProcessHost::ForceShutdown() {
}
void BrowserChildProcessHost::Notify(NotificationType type) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE, new ChildNotificationTask(type, this));
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE, new ChildNotificationTask(type, this));
}
bool BrowserChildProcessHost::DidChildCrash() {
@@ -183,14 +183,14 @@ void BrowserChildProcessHost::ClientHook::OnProcessLaunched() {
BrowserChildProcessHost::Iterator::Iterator()
: all_(true), type_(UNKNOWN_PROCESS) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)) <<
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)) <<
"ChildProcessInfo::Iterator must be used on the IO thread.";
iterator_ = Singleton<ChildProcessList>::get()->begin();
}
BrowserChildProcessHost::Iterator::Iterator(ProcessType type)
: all_(false), type_(type) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)) <<
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)) <<
"ChildProcessInfo::Iterator must be used on the IO thread.";
iterator_ = Singleton<ChildProcessList>::get()->begin();
if (!Done() && (*iterator_)->type() != type_)
diff --git a/chrome/browser/browser_commands_unittest.cc b/chrome/browser/browser_commands_unittest.cc
index 81bd0f5..a3d8979 100644
--- a/chrome/browser/browser_commands_unittest.cc
+++ b/chrome/browser/browser_commands_unittest.cc
@@ -80,7 +80,7 @@ TEST_F(BrowserCommandsTest, DuplicateTab) {
}
TEST_F(BrowserCommandsTest, BookmarkCurrentPage) {
- ChromeThread file_loop(ChromeThread::FILE, MessageLoop::current());
+ BrowserThread file_loop(BrowserThread::FILE, MessageLoop::current());
// We use profile() here, since it's a TestingProfile.
profile()->CreateBookmarkModel(true);
profile()->BlockUntilBookmarkModelLoaded();
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 621bb4e..bb8c5d0 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -230,8 +230,8 @@ class CheckDefaultBrowserTask : public Task {
return;
#endif
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE, new NotifyNotDefaultBrowserTask());
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE, new NotifyNotDefaultBrowserTask());
}
private:
@@ -921,8 +921,8 @@ void BrowserInit::LaunchWithProfile::CheckDefaultBrowser(Profile* profile) {
FirstRun::IsChromeFirstRun()) {
return;
}
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE, new CheckDefaultBrowserTask());
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE, new CheckDefaultBrowserTask());
}
bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 1e556d3..b00a413 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -431,8 +431,8 @@ void BrowserMainParts::InitializeMainThread() {
main_message_loop().set_thread_name(kThreadName);
// Register the main thread by instantiating it, but don't call any methods.
- main_thread_.reset(new ChromeThread(ChromeThread::UI,
- MessageLoop::current()));
+ main_thread_.reset(new BrowserThread(BrowserThread::UI,
+ MessageLoop::current()));
}
// -----------------------------------------------------------------------------
@@ -524,7 +524,7 @@ void InitializeNetworkOptions(const CommandLine& parsed_command_line) {
}
// Creates key child threads. We need to do this explicitly since
-// ChromeThread::PostTask silently deletes a posted task if the target message
+// BrowserThread::PostTask silently deletes a posted task if the target message
// loop isn't created.
void CreateChildThreads(BrowserProcessImpl* process) {
process->db_thread();
diff --git a/chrome/browser/browser_main_posix.cc b/chrome/browser/browser_main_posix.cc
index c2fc98c..efe699f 100644
--- a/chrome/browser/browser_main_posix.cc
+++ b/chrome/browser/browser_main_posix.cc
@@ -110,8 +110,8 @@ void ShutdownDetector::ThreadMain() {
LOG(INFO) << "Handling shutdown for signal " << signal << ".";
- if (!ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(BrowserList::CloseAllBrowsersAndExit))) {
// Without a UI thread to post the exit task to, there aren't many
// options. Raise the signal again. The default handler will pick it up
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
index e417f2d..3293d98 100644
--- a/chrome/browser/browser_process.h
+++ b/chrome/browser/browser_process.h
@@ -75,7 +75,7 @@ class BrowserProcess {
// communication with renderers, etc.
// NOTE: You should ONLY use this to pass to IPC or other objects which must
// need a MessageLoop*. If you just want to post a task, use
- // ChromeThread::PostTask (or other variants) as they take care of checking
+ // BrowserThread::PostTask (or other variants) as they take care of checking
// that a thread is still alive, race conditions, lifetime differences etc.
// If you still must use this check the return value for NULL.
virtual IOThread* io_thread() = 0;
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 7201c08..b855ffb 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -283,12 +283,12 @@ void BrowserProcessImpl::EndSession() {
#if defined(USE_X11)
// Can't run a local loop on linux. Instead create a waitable event.
base::WaitableEvent done_writing(false, false);
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(Signal, &done_writing));
done_writing.TimedWait(
base::TimeDelta::FromSeconds(kEndSessionTimeoutSeconds));
#elif defined(OS_WIN)
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(PostQuit, MessageLoop::current()));
MessageLoop::current()->Run();
#else
@@ -549,7 +549,7 @@ void BrowserProcessImpl::CreateIOThread() {
// The lifetime of the BACKGROUND_X11 thread is a subset of the IO thread so
// we start it now.
scoped_ptr<base::Thread> background_x11_thread(
- new BrowserProcessSubThread(ChromeThread::BACKGROUND_X11));
+ new BrowserProcessSubThread(BrowserThread::BACKGROUND_X11));
if (!background_x11_thread->Start())
return;
background_x11_thread_.swap(background_x11_thread);
@@ -568,7 +568,7 @@ void BrowserProcessImpl::CreateFileThread() {
created_file_thread_ = true;
scoped_ptr<base::Thread> thread(
- new BrowserProcessSubThread(ChromeThread::FILE));
+ new BrowserProcessSubThread(BrowserThread::FILE));
base::Thread::Options options;
#if defined(OS_WIN)
// On Windows, the FILE thread needs to be have a UI message loop which pumps
@@ -593,7 +593,7 @@ void BrowserProcessImpl::CreateDBThread() {
created_db_thread_ = true;
scoped_ptr<base::Thread> thread(
- new BrowserProcessSubThread(ChromeThread::DB));
+ new BrowserProcessSubThread(BrowserThread::DB));
if (!thread->Start())
return;
db_thread_.swap(thread);
@@ -604,7 +604,7 @@ void BrowserProcessImpl::CreateProcessLauncherThread() {
created_process_launcher_thread_ = true;
scoped_ptr<base::Thread> thread(
- new BrowserProcessSubThread(ChromeThread::PROCESS_LAUNCHER));
+ new BrowserProcessSubThread(BrowserThread::PROCESS_LAUNCHER));
if (!thread->Start())
return;
process_launcher_thread_.swap(thread);
@@ -615,7 +615,7 @@ void BrowserProcessImpl::CreateCacheThread() {
created_cache_thread_ = true;
scoped_ptr<base::Thread> thread(
- new BrowserProcessSubThread(ChromeThread::CACHE));
+ new BrowserProcessSubThread(BrowserThread::CACHE));
base::Thread::Options options;
options.message_loop_type = MessageLoop::TYPE_IO;
if (!thread->StartWithOptions(options))
@@ -736,7 +736,7 @@ void BrowserProcessImpl::SetIPCLoggingEnabled(bool enable) {
// Helper for SetIPCLoggingEnabled.
void BrowserProcessImpl::SetIPCLoggingEnabledForChildProcesses(bool enabled) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserChildProcessHost::Iterator i; // default constr references a singleton
while (!i.Done()) {
diff --git a/chrome/browser/browser_process_sub_thread.cc b/chrome/browser/browser_process_sub_thread.cc
index 2e99d90..39729d0 100644
--- a/chrome/browser/browser_process_sub_thread.cc
+++ b/chrome/browser/browser_process_sub_thread.cc
@@ -10,8 +10,8 @@
#include <Objbase.h>
#endif
-BrowserProcessSubThread::BrowserProcessSubThread(ChromeThread::ID identifier)
- : ChromeThread(identifier) {}
+BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier)
+ : BrowserThread(identifier) {}
BrowserProcessSubThread::~BrowserProcessSubThread() {
// We cannot rely on our base class to stop the thread since we want our
diff --git a/chrome/browser/browser_process_sub_thread.h b/chrome/browser/browser_process_sub_thread.h
index 72f8372..7ceb082 100644
--- a/chrome/browser/browser_process_sub_thread.h
+++ b/chrome/browser/browser_process_sub_thread.h
@@ -20,9 +20,9 @@ class NotificationService;
// Applications must initialize the COM library before they can call
// COM library functions other than CoGetMalloc and memory allocation
// functions, so this class initializes COM for those users.
-class BrowserProcessSubThread : public ChromeThread {
+class BrowserProcessSubThread : public BrowserThread {
public:
- explicit BrowserProcessSubThread(ChromeThread::ID identifier);
+ explicit BrowserProcessSubThread(BrowserThread::ID identifier);
virtual ~BrowserProcessSubThread();
protected:
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 7f2e4a6..bee0d0c 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -100,8 +100,8 @@ FilePath GetShutdownMsPath() {
void Shutdown() {
// Unload plugins. This needs to happen on the IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableFunction(&ChromePluginLib::UnloadAllPlugins));
// Shutdown all IPC channels to service processes.
@@ -229,7 +229,7 @@ void ReadLastShutdownFile(
ShutdownType type,
int num_procs,
int num_procs_slow) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
FilePath shutdown_ms_file = GetShutdownMsPath();
std::string shutdown_ms_str;
@@ -282,8 +282,8 @@ void ReadLastShutdownInfo() {
prefs->SetInteger(prefs::kShutdownNumProcessesSlow, 0);
// Read and delete the file on the file thread.
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(
&ReadLastShutdownFile, type, num_procs, num_procs_slow));
}
diff --git a/chrome/browser/browsing_data_appcache_helper.cc b/chrome/browser/browsing_data_appcache_helper.cc
index f898318..f36a1fc 100644
--- a/chrome/browser/browsing_data_appcache_helper.cc
+++ b/chrome/browser/browsing_data_appcache_helper.cc
@@ -19,18 +19,18 @@ BrowsingDataAppCacheHelper::BrowsingDataAppCacheHelper(Profile* profile)
}
void BrowsingDataAppCacheHelper::StartFetching(Callback0::Type* callback) {
- if (ChromeThread::CurrentlyOn(ChromeThread::UI)) {
+ if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
DCHECK(!is_fetching_);
DCHECK(callback);
is_fetching_ = true;
info_collection_ = new appcache::AppCacheInfoCollection;
completion_callback_.reset(callback);
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, NewRunnableMethod(
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, NewRunnableMethod(
this, &BrowsingDataAppCacheHelper::StartFetching, callback));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
appcache_info_callback_ =
new net::CancelableCompletionCallback<BrowsingDataAppCacheHelper>(
this, &BrowsingDataAppCacheHelper::OnFetchComplete);
@@ -39,9 +39,9 @@ void BrowsingDataAppCacheHelper::StartFetching(Callback0::Type* callback) {
}
void BrowsingDataAppCacheHelper::CancelNotification() {
- if (ChromeThread::CurrentlyOn(ChromeThread::UI)) {
+ if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
completion_callback_.reset();
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, NewRunnableMethod(
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, NewRunnableMethod(
this, &BrowsingDataAppCacheHelper::CancelNotification));
return;
}
@@ -52,8 +52,8 @@ void BrowsingDataAppCacheHelper::CancelNotification() {
void BrowsingDataAppCacheHelper::DeleteAppCacheGroup(
const GURL& manifest_url) {
- if (ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, NewRunnableMethod(
+ if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, NewRunnableMethod(
this, &BrowsingDataAppCacheHelper::DeleteAppCacheGroup,
manifest_url));
return;
@@ -62,7 +62,7 @@ void BrowsingDataAppCacheHelper::DeleteAppCacheGroup(
}
void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) {
- if (ChromeThread::CurrentlyOn(ChromeThread::IO)) {
+ if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
// Filter out appache info entries for extensions. Extension state is not
// considered browsing data.
typedef std::map<GURL, appcache::AppCacheInfoVector> InfoByOrigin;
@@ -76,12 +76,12 @@ void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) {
}
appcache_info_callback_ = NULL;
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE, NewRunnableMethod(
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, NewRunnableMethod(
this, &BrowsingDataAppCacheHelper::OnFetchComplete, rv));
return;
}
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(is_fetching_);
is_fetching_ = false;
if (completion_callback_ != NULL) {
@@ -91,7 +91,7 @@ void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) {
}
ChromeAppCacheService* BrowsingDataAppCacheHelper::GetAppCacheService() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
ChromeURLRequestContext* request_context =
reinterpret_cast<ChromeURLRequestContext*>(
request_context_getter_->GetURLRequestContext());
diff --git a/chrome/browser/browsing_data_database_helper.cc b/chrome/browser/browsing_data_database_helper.cc
index c407bc8..2ba7798 100644
--- a/chrome/browser/browsing_data_database_helper.cc
+++ b/chrome/browser/browsing_data_database_helper.cc
@@ -26,31 +26,31 @@ BrowsingDataDatabaseHelper::~BrowsingDataDatabaseHelper() {
void BrowsingDataDatabaseHelper::StartFetching(
Callback1<const std::vector<DatabaseInfo>& >::Type* callback) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!is_fetching_);
DCHECK(callback);
is_fetching_ = true;
database_info_.clear();
completion_callback_.reset(callback);
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE, NewRunnableMethod(
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, NewRunnableMethod(
this, &BrowsingDataDatabaseHelper::FetchDatabaseInfoInFileThread));
}
void BrowsingDataDatabaseHelper::CancelNotification() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
completion_callback_.reset(NULL);
}
void BrowsingDataDatabaseHelper::DeleteDatabase(const std::string& origin,
const std::string& name) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE, NewRunnableMethod(
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, NewRunnableMethod(
this, &BrowsingDataDatabaseHelper::DeleteDatabaseInFileThread, origin,
name));
}
void BrowsingDataDatabaseHelper::FetchDatabaseInfoInFileThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
std::vector<webkit_database::OriginInfo> origins_info;
if (tracker_.get() && tracker_->GetAllOriginsInfo(&origins_info)) {
for (std::vector<webkit_database::OriginInfo>::const_iterator ori =
@@ -85,12 +85,12 @@ void BrowsingDataDatabaseHelper::FetchDatabaseInfoInFileThread() {
}
}
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE, NewRunnableMethod(
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, NewRunnableMethod(
this, &BrowsingDataDatabaseHelper::NotifyInUIThread));
}
void BrowsingDataDatabaseHelper::NotifyInUIThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(is_fetching_);
// Note: completion_callback_ mutates only in the UI thread, so it's safe to
// test it here.
@@ -105,7 +105,7 @@ void BrowsingDataDatabaseHelper::NotifyInUIThread() {
void BrowsingDataDatabaseHelper::DeleteDatabaseInFileThread(
const std::string& origin,
const std::string& name) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (!tracker_.get())
return;
tracker_->DeleteDatabase(UTF8ToUTF16(origin), UTF8ToUTF16(name), NULL);
diff --git a/chrome/browser/browsing_data_database_helper_browsertest.cc b/chrome/browser/browsing_data_database_helper_browsertest.cc
index 081d5a0..10fb81b 100644
--- a/chrome/browser/browsing_data_database_helper_browsertest.cc
+++ b/chrome/browser/browsing_data_database_helper_browsertest.cc
@@ -60,7 +60,7 @@ class StopTestOnCallback {
void Callback(const std::vector<BrowsingDataDatabaseHelper::DatabaseInfo>&
database_info_list) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ASSERT_EQ(1UL, database_info_list.size());
EXPECT_EQ(std::string(kTestIdentifier1),
database_info_list.at(0).origin_identifier);
diff --git a/chrome/browser/browsing_data_indexed_db_helper.cc b/chrome/browser/browsing_data_indexed_db_helper.cc
index c1202a9..f0b46af 100644
--- a/chrome/browser/browsing_data_indexed_db_helper.cc
+++ b/chrome/browser/browsing_data_indexed_db_helper.cc
@@ -70,28 +70,28 @@ BrowsingDataIndexedDBHelperImpl::~BrowsingDataIndexedDBHelperImpl() {
void BrowsingDataIndexedDBHelperImpl::StartFetching(
Callback1<const std::vector<IndexedDBInfo>& >::Type* callback) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!is_fetching_);
DCHECK(callback);
is_fetching_ = true;
completion_callback_.reset(callback);
- ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE,
NewRunnableMethod(
this,
&BrowsingDataIndexedDBHelperImpl::FetchIndexedDBInfoInWebKitThread));
}
void BrowsingDataIndexedDBHelperImpl::CancelNotification() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
completion_callback_.reset(NULL);
}
void BrowsingDataIndexedDBHelperImpl::DeleteIndexedDBFile(
const FilePath& file_path) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE,
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE,
NewRunnableMethod(
this,
&BrowsingDataIndexedDBHelperImpl::
@@ -100,7 +100,7 @@ void BrowsingDataIndexedDBHelperImpl::DeleteIndexedDBFile(
}
void BrowsingDataIndexedDBHelperImpl::FetchIndexedDBInfoInWebKitThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
file_util::FileEnumerator file_enumerator(
profile_->GetWebKitContext()->data_path().Append(
IndexedDBContext::kIndexedDBDirectory),
@@ -137,14 +137,14 @@ void BrowsingDataIndexedDBHelperImpl::FetchIndexedDBInfoInWebKitThread() {
}
}
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
this, &BrowsingDataIndexedDBHelperImpl::NotifyInUIThread));
}
void BrowsingDataIndexedDBHelperImpl::NotifyInUIThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(is_fetching_);
// Note: completion_callback_ mutates only in the UI thread, so it's safe to
// test it here.
@@ -157,7 +157,7 @@ void BrowsingDataIndexedDBHelperImpl::NotifyInUIThread() {
void BrowsingDataIndexedDBHelperImpl::DeleteIndexedDBFileInWebKitThread(
const FilePath& file_path) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
// TODO(jochen): implement this once it's possible to delete indexed DBs.
}
diff --git a/chrome/browser/browsing_data_local_storage_helper.cc b/chrome/browser/browsing_data_local_storage_helper.cc
index 1f94c03..73e61f1 100644
--- a/chrome/browser/browsing_data_local_storage_helper.cc
+++ b/chrome/browser/browsing_data_local_storage_helper.cc
@@ -29,13 +29,13 @@ BrowsingDataLocalStorageHelper::~BrowsingDataLocalStorageHelper() {
void BrowsingDataLocalStorageHelper::StartFetching(
Callback1<const std::vector<LocalStorageInfo>& >::Type* callback) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!is_fetching_);
DCHECK(callback);
is_fetching_ = true;
completion_callback_.reset(callback);
- ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE,
NewRunnableMethod(
this,
&BrowsingDataLocalStorageHelper::
@@ -43,15 +43,15 @@ void BrowsingDataLocalStorageHelper::StartFetching(
}
void BrowsingDataLocalStorageHelper::CancelNotification() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
completion_callback_.reset(NULL);
}
void BrowsingDataLocalStorageHelper::DeleteLocalStorageFile(
const FilePath& file_path) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- ChromeThread::PostTask(
- ChromeThread::WEBKIT, FROM_HERE,
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(
+ BrowserThread::WEBKIT, FROM_HERE,
NewRunnableMethod(
this,
&BrowsingDataLocalStorageHelper::
@@ -60,7 +60,7 @@ void BrowsingDataLocalStorageHelper::DeleteLocalStorageFile(
}
void BrowsingDataLocalStorageHelper::FetchLocalStorageInfoInWebKitThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
file_util::FileEnumerator file_enumerator(
profile_->GetWebKitContext()->data_path().Append(
DOMStorageContext::kLocalStorageDirectory),
@@ -92,14 +92,14 @@ void BrowsingDataLocalStorageHelper::FetchLocalStorageInfoInWebKitThread() {
}
}
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
this, &BrowsingDataLocalStorageHelper::NotifyInUIThread));
}
void BrowsingDataLocalStorageHelper::NotifyInUIThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(is_fetching_);
// Note: completion_callback_ mutates only in the UI thread, so it's safe to
// test it here.
@@ -112,7 +112,7 @@ void BrowsingDataLocalStorageHelper::NotifyInUIThread() {
void BrowsingDataLocalStorageHelper::DeleteLocalStorageFileInWebKitThread(
const FilePath& file_path) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
profile_->GetWebKitContext()->dom_storage_context()->DeleteLocalStorageFile(
file_path);
}
diff --git a/chrome/browser/browsing_data_local_storage_helper_browsertest.cc b/chrome/browser/browsing_data_local_storage_helper_browsertest.cc
index 68b105d..8a94cbc1 100644
--- a/chrome/browser/browsing_data_local_storage_helper_browsertest.cc
+++ b/chrome/browser/browsing_data_local_storage_helper_browsertest.cc
@@ -68,7 +68,7 @@ class StopTestOnCallback {
void Callback(
const std::vector<BrowsingDataLocalStorageHelper::LocalStorageInfo>&
local_storage_info) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// There's no guarantee on the order, ensure these files are there.
const char* const kTestHosts[] = {"www.chromium.org", "www.google.com"};
bool test_hosts_found[arraysize(kTestHosts)] = {false, false};
@@ -112,7 +112,7 @@ IN_PROC_BROWSER_TEST_F(BrowsingDataLocalStorageHelperTest, DeleteSingleFile) {
local_storage_helper->DeleteLocalStorageFile(
GetLocalStoragePathForTestingProfile().Append(FilePath(kTestFile0)));
scoped_refptr<ThreadTestHelper> wait_for_webkit_thread(
- new ThreadTestHelper(ChromeThread::WEBKIT));
+ new ThreadTestHelper(BrowserThread::WEBKIT));
ASSERT_TRUE(wait_for_webkit_thread->Run());
// Ensure the file has been deleted.
file_util::FileEnumerator file_enumerator(
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index c17baab..bb38bd5 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -180,8 +180,8 @@ void BrowsingDataRemover::Remove(int remove_mask) {
database_tracker_ = profile_->GetDatabaseTracker();
if (database_tracker_.get()) {
waiting_for_clear_databases_ = true;
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(
this,
&BrowsingDataRemover::ClearDatabasesOnFILEThread,
@@ -189,16 +189,16 @@ void BrowsingDataRemover::Remove(int remove_mask) {
webkit_db_whitelist));
}
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
profile_->GetTransportSecurityState(),
&net::TransportSecurityState::DeleteSince,
delete_begin_));
waiting_for_clear_appcache_ = true;
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
this,
&BrowsingDataRemover::ClearAppCacheOnIOThread,
@@ -240,8 +240,8 @@ void BrowsingDataRemover::Remove(int remove_mask) {
main_context_getter_ = profile_->GetRequestContext();
media_context_getter_ = profile_->GetRequestContextForMedia();
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this, &BrowsingDataRemover::ClearCacheOnIOThread));
}
@@ -324,7 +324,7 @@ void BrowsingDataRemover::ClearedCache() {
void BrowsingDataRemover::ClearCacheOnIOThread() {
// This function should be called on the IO thread.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK_EQ(STATE_NONE, next_cache_state_);
DCHECK(main_context_getter_);
DCHECK(media_context_getter_);
@@ -377,8 +377,8 @@ void BrowsingDataRemover::DoClearCache(int rv) {
cache_ = NULL;
// Notify the UI thread that we are done.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &BrowsingDataRemover::ClearedCache));
next_cache_state_ = STATE_NONE;
@@ -394,9 +394,9 @@ void BrowsingDataRemover::DoClearCache(int rv) {
}
void BrowsingDataRemover::OnClearedDatabases(int rv) {
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- bool result = ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ bool result = BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &BrowsingDataRemover::OnClearedDatabases, rv));
DCHECK(result);
return;
@@ -411,7 +411,7 @@ void BrowsingDataRemover::OnClearedDatabases(int rv) {
void BrowsingDataRemover::ClearDatabasesOnFILEThread(base::Time delete_begin,
const std::vector<string16>& webkit_db_whitelist) {
// This function should be called on the FILE thread.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
int rv = database_tracker_->DeleteDataModifiedSince(
delete_begin, webkit_db_whitelist, &database_cleared_callback_);
@@ -420,9 +420,9 @@ void BrowsingDataRemover::ClearDatabasesOnFILEThread(base::Time delete_begin,
}
void BrowsingDataRemover::OnClearedAppCache() {
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- bool result = ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ bool result = BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &BrowsingDataRemover::OnClearedAppCache));
DCHECK(result);
return;
@@ -434,7 +434,7 @@ void BrowsingDataRemover::OnClearedAppCache() {
void BrowsingDataRemover::ClearAppCacheOnIOThread(base::Time delete_begin,
const std::vector<GURL>& origin_whitelist) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(waiting_for_clear_appcache_);
appcache_whitelist_ = origin_whitelist;
@@ -482,7 +482,7 @@ void BrowsingDataRemover::OnAppCacheDeleted(int rv) {
}
ChromeAppCacheService* BrowsingDataRemover::GetAppCacheService() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
ChromeURLRequestContext* request_context =
reinterpret_cast<ChromeURLRequestContext*>(
request_context_getter_->GetURLRequestContext());
diff --git a/chrome/browser/child_process_launcher.cc b/chrome/browser/child_process_launcher.cc
index ad464c1..8a295cd 100644
--- a/chrome/browser/child_process_launcher.cc
+++ b/chrome/browser/child_process_launcher.cc
@@ -61,10 +61,10 @@ class ChildProcessLauncher::Context
Client* client) {
client_ = client;
- CHECK(ChromeThread::GetCurrentThreadIdentifier(&client_thread_id_));
+ CHECK(BrowserThread::GetCurrentThreadIdentifier(&client_thread_id_));
- ChromeThread::PostTask(
- ChromeThread::PROCESS_LAUNCHER, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
NewRunnableMethod(
this,
&Context::LaunchInternal,
@@ -81,7 +81,7 @@ class ChildProcessLauncher::Context
void ResetClient() {
// No need for locking as this function gets called on the same thread that
// client_ would be used.
- CHECK(ChromeThread::CurrentlyOn(client_thread_id_));
+ CHECK(BrowserThread::CurrentlyOn(client_thread_id_));
client_ = NULL;
}
@@ -191,7 +191,7 @@ class ChildProcessLauncher::Context
}
#endif // else defined(OS_POSIX)
- ChromeThread::PostTask(
+ BrowserThread::PostTask(
client_thread_id_, FROM_HERE,
NewRunnableMethod(
this,
@@ -225,8 +225,8 @@ class ChildProcessLauncher::Context
// On Posix, EnsureProcessTerminated can lead to 2 seconds of sleep! So
// don't this on the UI/IO threads.
- ChromeThread::PostTask(
- ChromeThread::PROCESS_LAUNCHER, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
NewRunnableFunction(
&ChildProcessLauncher::Context::TerminateInternal,
#if defined(OS_LINUX)
@@ -262,7 +262,7 @@ class ChildProcessLauncher::Context
}
Client* client_;
- ChromeThread::ID client_thread_id_;
+ BrowserThread::ID client_thread_id_;
base::Process process_;
bool starting_;
diff --git a/chrome/browser/chrome_blob_storage_context.cc b/chrome/browser/chrome_blob_storage_context.cc
index c59ce0b..139b8d1 100644
--- a/chrome/browser/chrome_blob_storage_context.cc
+++ b/chrome/browser/chrome_blob_storage_context.cc
@@ -13,10 +13,10 @@ ChromeBlobStorageContext::ChromeBlobStorageContext() {
}
void ChromeBlobStorageContext::InitializeOnIOThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
controller_.reset(new BlobStorageController());
}
ChromeBlobStorageContext::~ChromeBlobStorageContext() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
diff --git a/chrome/browser/chrome_blob_storage_context.h b/chrome/browser/chrome_blob_storage_context.h
index f4e39a6..be8463a1 100644
--- a/chrome/browser/chrome_blob_storage_context.h
+++ b/chrome/browser/chrome_blob_storage_context.h
@@ -24,7 +24,7 @@ class BlobStorageController;
// the IO thread (unless specifically called out in doc comments).
class ChromeBlobStorageContext
: public base::RefCountedThreadSafe<ChromeBlobStorageContext,
- ChromeThread::DeleteOnIOThread> {
+ BrowserThread::DeleteOnIOThread> {
public:
ChromeBlobStorageContext();
diff --git a/chrome/browser/chrome_plugin_browsing_context.cc b/chrome/browser/chrome_plugin_browsing_context.cc
index e699566..cb44bc1 100644
--- a/chrome/browser/chrome_plugin_browsing_context.cc
+++ b/chrome/browser/chrome_plugin_browsing_context.cc
@@ -10,7 +10,7 @@
#include "chrome/common/notification_service.h"
CPBrowsingContextManager* CPBrowsingContextManager::Instance() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return Singleton<CPBrowsingContextManager>::get();
}
diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc
index 6bacfd0..ec8e115 100644
--- a/chrome/browser/chrome_plugin_host.cc
+++ b/chrome/browser/chrome_plugin_host.cc
@@ -737,8 +737,8 @@ CPError STDCALL CPB_SendSyncMessage(CPID id, const void *data, uint32 data_len,
CPError STDCALL CPB_PluginThreadAsyncCall(CPID id,
void (*func)(void *),
void *user_data) {
- bool posted = ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ bool posted = BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableFunction(func, user_data));
return posted ? CPERR_SUCCESS : CPERR_FAILURE;
}
@@ -825,8 +825,8 @@ void CPHandleCommand(int command, CPCommandInterface* data,
// brain trying to compile the Tuple3 ctor. This cast works.
int32 context_as_int32 = static_cast<int32>(context);
// Plugins can only be accessed on the IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableFunction(PluginCommandHandler::HandleCommand,
command, data, context_as_int32));
}
diff --git a/chrome/browser/chrome_plugin_unittest.cc b/chrome/browser/chrome_plugin_unittest.cc
index 3c5495c..5eab0b0 100644
--- a/chrome/browser/chrome_plugin_unittest.cc
+++ b/chrome/browser/chrome_plugin_unittest.cc
@@ -34,7 +34,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter {
return context_;
}
virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() {
- return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO);
+ return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
}
private:
@@ -45,7 +45,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter {
class ChromePluginTest : public testing::Test, public URLRequest::Delegate {
public:
ChromePluginTest()
- : io_thread_(ChromeThread::IO, &message_loop_),
+ : io_thread_(BrowserThread::IO, &message_loop_),
request_(NULL),
response_buffer_(new net::IOBuffer(kResponseBufferSize)),
plugin_(NULL),
@@ -94,7 +94,7 @@ class ChromePluginTest : public testing::Test, public URLRequest::Delegate {
}
protected:
MessageLoopForIO message_loop_;
- ChromeThread io_thread_;
+ BrowserThread io_thread_;
// Note: we use URLRequest (instead of URLFetcher) because this allows the
// request to be intercepted.
diff --git a/chrome/browser/content_exceptions_table_model_unittest.cc b/chrome/browser/content_exceptions_table_model_unittest.cc
index 646ab9e..f467d07 100644
--- a/chrome/browser/content_exceptions_table_model_unittest.cc
+++ b/chrome/browser/content_exceptions_table_model_unittest.cc
@@ -12,11 +12,11 @@ namespace {
class ContentExceptionsTableModelTest : public testing::Test {
public:
ContentExceptionsTableModelTest()
- : ui_thread_(ChromeThread::UI, &message_loop_) {}
+ : ui_thread_(BrowserThread::UI, &message_loop_) {}
protected:
MessageLoop message_loop_;
- ChromeThread ui_thread_;
+ BrowserThread ui_thread_;
};
TEST_F(ContentExceptionsTableModelTest, Incognito) {
diff --git a/chrome/browser/content_setting_bubble_model_unittest.cc b/chrome/browser/content_setting_bubble_model_unittest.cc
index d114e89..c4ff8fb 100644
--- a/chrome/browser/content_setting_bubble_model_unittest.cc
+++ b/chrome/browser/content_setting_bubble_model_unittest.cc
@@ -15,7 +15,7 @@
class ContentSettingBubbleModelTest : public RenderViewHostTestHarness {
protected:
ContentSettingBubbleModelTest()
- : ui_thread_(ChromeThread::UI, MessageLoop::current()) {
+ : ui_thread_(BrowserThread::UI, MessageLoop::current()) {
}
void CheckGeolocationBubble(size_t expected_domains,
@@ -43,7 +43,7 @@ class ContentSettingBubbleModelTest : public RenderViewHostTestHarness {
EXPECT_EQ(std::string(), bubble_content.load_plugins_link_title);
}
- ChromeThread ui_thread_;
+ BrowserThread ui_thread_;
};
TEST_F(ContentSettingBubbleModelTest, ImageRadios) {
diff --git a/chrome/browser/content_setting_image_model_unittest.cc b/chrome/browser/content_setting_image_model_unittest.cc
index f16ab93..8b9708d 100644
--- a/chrome/browser/content_setting_image_model_unittest.cc
+++ b/chrome/browser/content_setting_image_model_unittest.cc
@@ -16,10 +16,10 @@ class ContentSettingImageModelTest : public RenderViewHostTestHarness {
public:
ContentSettingImageModelTest()
: RenderViewHostTestHarness(),
- ui_thread_(ChromeThread::UI, &message_loop_) {}
+ ui_thread_(BrowserThread::UI, &message_loop_) {}
private:
- ChromeThread ui_thread_;
+ BrowserThread ui_thread_;
DISALLOW_COPY_AND_ASSIGN(ContentSettingImageModelTest);
};
diff --git a/chrome/browser/cookies_tree_model_unittest.cc b/chrome/browser/cookies_tree_model_unittest.cc
index 75844d0..55888c1 100644
--- a/chrome/browser/cookies_tree_model_unittest.cc
+++ b/chrome/browser/cookies_tree_model_unittest.cc
@@ -47,8 +47,8 @@ class StubSettingsObserver : public NotificationObserver {
class CookiesTreeModelTest : public testing::Test {
public:
- CookiesTreeModelTest() : ui_thread_(ChromeThread::UI, &message_loop_),
- io_thread_(ChromeThread::IO, &message_loop_) {
+ CookiesTreeModelTest() : ui_thread_(BrowserThread::UI, &message_loop_),
+ io_thread_(BrowserThread::IO, &message_loop_) {
}
virtual ~CookiesTreeModelTest() {
@@ -238,8 +238,8 @@ class CookiesTreeModelTest : public testing::Test {
}
protected:
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread io_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread io_thread_;
scoped_ptr<TestingProfile> profile_;
scoped_refptr<MockBrowsingDataDatabaseHelper>
diff --git a/chrome/browser/crash_handler_host_linux.cc b/chrome/browser/crash_handler_host_linux.cc
index 6f3d183..f0fb418 100644
--- a/chrome/browser/crash_handler_host_linux.cc
+++ b/chrome/browser/crash_handler_host_linux.cc
@@ -69,8 +69,8 @@ CrashHandlerHostLinux::CrashHandlerHostLinux() {
process_socket_ = fds[0];
browser_socket_ = fds[1];
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this, &CrashHandlerHostLinux::Init));
}
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index a1e3dd2..660ca4f 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -506,7 +506,7 @@ bool ExternalTabContainer::CanDownload(int request_id) {
// In case the host needs to show UI that needs to take the focus.
::AllowSetForegroundWindow(ASFW_ANY);
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableMethod(automation_resource_message_filter_.get(),
&AutomationResourceMessageFilter::SendDownloadRequestToHost,
0, tab_handle_, request_id));
diff --git a/chrome/browser/file_path_watcher.h b/chrome/browser/file_path_watcher.h
index b8c857f..e000028 100644
--- a/chrome/browser/file_path_watcher.h
+++ b/chrome/browser/file_path_watcher.h
@@ -40,7 +40,7 @@ class FilePathWatcher {
// Register interest in any changes on |path|. OnPathChanged will be called
// back for each change. Returns true on success.
bool Watch(const FilePath& path, Delegate* delegate) WARN_UNUSED_RESULT {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(path.IsAbsolute());
return impl_->Watch(path, delegate);
}
@@ -48,7 +48,7 @@ class FilePathWatcher {
// Used internally to encapsulate different members on different platforms.
class PlatformDelegate
: public base::RefCountedThreadSafe<PlatformDelegate,
- ChromeThread::DeleteOnFileThread> {
+ BrowserThread::DeleteOnFileThread> {
public:
virtual ~PlatformDelegate() {}
diff --git a/chrome/browser/file_path_watcher_inotify.cc b/chrome/browser/file_path_watcher_inotify.cc
index 744e9a1..591daba 100644
--- a/chrome/browser/file_path_watcher_inotify.cc
+++ b/chrome/browser/file_path_watcher_inotify.cc
@@ -276,7 +276,7 @@ void InotifyReader::OnInotifyEvent(const inotify_event* event) {
for (WatcherSet::iterator watcher = watchers_[event->wd].begin();
watcher != watchers_[event->wd].end();
++watcher) {
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(*watcher,
&FilePathWatcherImpl::OnFilePathChanged,
event->wd,
@@ -294,7 +294,7 @@ void FilePathWatcherImpl::OnFilePathChanged(InotifyReader::Watch fired_watch,
const FilePath::StringType& child,
bool created,
bool is_directory) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Find the entry in |watches_| that corresponds to |fired_watch|.
WatchVector::const_iterator watch_entry(watches_.begin());
@@ -338,7 +338,7 @@ void FilePathWatcherImpl::OnFilePathChanged(InotifyReader::Watch fired_watch,
bool FilePathWatcherImpl::Watch(const FilePath& path,
FilePathWatcher::Delegate* delegate) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(target_.empty());
delegate_ = delegate;
@@ -357,8 +357,8 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
void FilePathWatcherImpl::Cancel() {
// Switch to the file thread if necessary so we can access |watches_|.
- if (!ChromeThread::CurrentlyOn(ChromeThread::FILE)) {
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this, &FilePathWatcherImpl::Cancel));
return;
}
@@ -376,7 +376,7 @@ void FilePathWatcherImpl::Cancel() {
bool FilePathWatcherImpl::UpdateWatches() {
// Ensure this runs on the file thread exclusively in order to avoid
// concurrency issues.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Walk the list of watches and update them as we go.
FilePath path(FILE_PATH_LITERAL("/"));