summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-10 18:53:21 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-10 18:53:21 +0000
commit8bac235e7c08c21851934cf771d7d473b3beca4d (patch)
treed4a139e5d1edd3a746011340d4aadbe33e813cba
parent9e652efa6c344124a68a41ae41867a3b6b911666 (diff)
downloadchromium_src-8bac235e7c08c21851934cf771d7d473b3beca4d.zip
chromium_src-8bac235e7c08c21851934cf771d7d473b3beca4d.tar.gz
chromium_src-8bac235e7c08c21851934cf771d7d473b3beca4d.tar.bz2
Rename ChromeThread to BrowserThread Part13:
- Rename entries under appcache, automation, chromeos, cocoa, file_system, metrics, policy, prefs, remoting, search_engines and tab_contents. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3660002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62120 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/appcache/chrome_appcache_service.h2
-rw-r--r--chrome/browser/automation/ui_controls_mac.mm2
-rw-r--r--chrome/browser/chromeos/cros/syslogs_library.cc2
-rw-r--r--chrome/browser/chromeos/dom_ui/menu_ui.cc4
-rw-r--r--chrome/browser/cocoa/browser_test_helper.h12
-rw-r--r--chrome/browser/cocoa/bug_report_window_controller_unittest.mm2
-rw-r--r--chrome/browser/cocoa/collected_cookies_mac_unittest.mm2
-rw-r--r--chrome/browser/cocoa/extension_installed_bubble_controller.mm2
-rw-r--r--chrome/browser/cocoa/notifications/balloon_controller_unittest.mm8
-rw-r--r--chrome/browser/cocoa/ssl_client_certificate_selector.mm2
-rw-r--r--chrome/browser/cocoa/tabpose_window.mm4
-rw-r--r--chrome/browser/file_system/file_system_dispatcher_host.cc8
-rw-r--r--chrome/browser/file_system/file_system_host_context_unittest.cc2
-rw-r--r--chrome/browser/metrics/histogram_synchronizer.cc8
-rw-r--r--chrome/browser/policy/config_dir_policy_provider.cc22
-rw-r--r--chrome/browser/policy/config_dir_policy_provider_unittest.cc8
-rw-r--r--chrome/browser/prefs/pref_notifier.cc4
-rw-r--r--chrome/browser/prefs/pref_service.cc2
-rw-r--r--chrome/browser/prefs/pref_value_store.cc16
-rw-r--r--chrome/browser/prefs/pref_value_store.h2
-rw-r--r--chrome/browser/prefs/pref_value_store_unittest.cc24
-rw-r--r--chrome/browser/remoting/remoting_setup_flow.cc6
-rw-r--r--chrome/browser/search_engines/search_provider_install_data.cc4
-rw-r--r--chrome/browser/tab_contents/interstitial_page.cc6
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager_unittest.cc6
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc4
-rw-r--r--chrome/browser/tab_contents/web_drag_source_win.cc16
27 files changed, 90 insertions, 90 deletions
diff --git a/chrome/browser/appcache/chrome_appcache_service.h b/chrome/browser/appcache/chrome_appcache_service.h
index 9c33c04..aeed7c7 100644
--- a/chrome/browser/appcache/chrome_appcache_service.h
+++ b/chrome/browser/appcache/chrome_appcache_service.h
@@ -26,7 +26,7 @@ class FilePath;
// the IO thread (unless specifically called out in doc comments).
class ChromeAppCacheService
: public base::RefCountedThreadSafe<ChromeAppCacheService,
- ChromeThread::DeleteOnIOThread>,
+ BrowserThread::DeleteOnIOThread>,
public appcache::AppCacheService,
public appcache::AppCachePolicy,
public NotificationObserver {
diff --git a/chrome/browser/automation/ui_controls_mac.mm b/chrome/browser/automation/ui_controls_mac.mm
index 5edfa5d..e4176ac 100644
--- a/chrome/browser/automation/ui_controls_mac.mm
+++ b/chrome/browser/automation/ui_controls_mac.mm
@@ -240,7 +240,7 @@ bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
bool alt,
bool command,
Task* task) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
std::vector<NSEvent*> events;
SynthesizeKeyEventsSequence(
diff --git a/chrome/browser/chromeos/cros/syslogs_library.cc b/chrome/browser/chromeos/cros/syslogs_library.cc
index dc95f69..aca9c97 100644
--- a/chrome/browser/chromeos/cros/syslogs_library.cc
+++ b/chrome/browser/chromeos/cros/syslogs_library.cc
@@ -82,7 +82,7 @@ CancelableRequestProvider::Handle SyslogsLibraryImpl::RequestSyslogs(
void SyslogsLibraryImpl::ReadSyslogs(
scoped_refptr<CancelableRequest<ReadCompleteCallback> > request,
bool compress_logs) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (request->canceled())
return;
diff --git a/chrome/browser/chromeos/dom_ui/menu_ui.cc b/chrome/browser/chromeos/dom_ui/menu_ui.cc
index bfdce6b..7e0a854 100644
--- a/chrome/browser/chromeos/dom_ui/menu_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/menu_ui.cc
@@ -575,8 +575,8 @@ MenuUI::MenuUI(TabContents* contents, ChromeURLDataManager::DataSource* source)
MenuHandler* handler = new MenuHandler();
AddMessageHandler((handler)->Attach(this));
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
diff --git a/chrome/browser/cocoa/browser_test_helper.h b/chrome/browser/cocoa/browser_test_helper.h
index 4ff40ba..a5e22cb 100644
--- a/chrome/browser/cocoa/browser_test_helper.h
+++ b/chrome/browser/cocoa/browser_test_helper.h
@@ -28,9 +28,9 @@
class BrowserTestHelper {
public:
BrowserTestHelper()
- : ui_thread_(ChromeThread::UI, &message_loop_),
- file_thread_(new ChromeThread(ChromeThread::FILE, &message_loop_)),
- io_thread_(new ChromeThread(ChromeThread::IO, &message_loop_)) {
+ : ui_thread_(BrowserThread::UI, &message_loop_),
+ file_thread_(new BrowserThread(BrowserThread::FILE, &message_loop_)),
+ io_thread_(new BrowserThread(BrowserThread::IO, &message_loop_)) {
profile_.reset(new TestingProfile());
profile_->CreateBookmarkModel(true);
profile_->BlockUntilBookmarkModelLoaded();
@@ -84,9 +84,9 @@ class BrowserTestHelper {
scoped_ptr<TestingProfile> profile_;
scoped_ptr<Browser> browser_;
MessageLoopForUI message_loop_;
- ChromeThread ui_thread_;
- scoped_ptr<ChromeThread> file_thread_;
- scoped_ptr<ChromeThread> io_thread_;
+ BrowserThread ui_thread_;
+ scoped_ptr<BrowserThread> file_thread_;
+ scoped_ptr<BrowserThread> io_thread_;
};
#endif // CHROME_BROWSER_COCOA_BROWSER_TEST_HELPER_H_
diff --git a/chrome/browser/cocoa/bug_report_window_controller_unittest.mm b/chrome/browser/cocoa/bug_report_window_controller_unittest.mm
index 5c78c67..24a78dd 100644
--- a/chrome/browser/cocoa/bug_report_window_controller_unittest.mm
+++ b/chrome/browser/cocoa/bug_report_window_controller_unittest.mm
@@ -21,7 +21,7 @@ class BugReportWindowControllerUnittest : public RenderViewHostTestHarness {
// See http://crbug.com/29019 for why it's disabled.
TEST_F(BugReportWindowControllerUnittest, DISABLED_ReportBugWithNewTabPageOpen) {
- ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
+ BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current());
// Create a "chrome://newtab" test tab. SiteInstance will be deleted when
// tabContents is deleted.
SiteInstance* instance =
diff --git a/chrome/browser/cocoa/collected_cookies_mac_unittest.mm b/chrome/browser/cocoa/collected_cookies_mac_unittest.mm
index 033cc71..c0a8490 100644
--- a/chrome/browser/cocoa/collected_cookies_mac_unittest.mm
+++ b/chrome/browser/cocoa/collected_cookies_mac_unittest.mm
@@ -19,7 +19,7 @@ class CollectedCookiesWindowControllerTest : public RenderViewHostTestHarness {
};
TEST_F(CollectedCookiesWindowControllerTest, Construction) {
- ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
+ BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current());
// Create a test tab. SiteInstance will be deleted when tabContents is
// deleted.
SiteInstance* instance =
diff --git a/chrome/browser/cocoa/extension_installed_bubble_controller.mm b/chrome/browser/cocoa/extension_installed_bubble_controller.mm
index 4a22436..00cd535 100644
--- a/chrome/browser/cocoa/extension_installed_bubble_controller.mm
+++ b/chrome/browser/cocoa/extension_installed_bubble_controller.mm
@@ -203,7 +203,7 @@ class ExtensionLoadedNotificationObserver : public NotificationObserver {
- (void)showWindow:(id)sender {
// Generic extensions get an infobar rather than a bubble.
DCHECK(type_ != extension_installed_bubble::kGeneric);
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Load nib and calculate height based on messages to be shown.
NSWindow* window = [self initializeWindow];
diff --git a/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm b/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm
index ff1176e..6f6a1ab 100644
--- a/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm
+++ b/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm
@@ -46,8 +46,8 @@ class MockBalloonCollection : public BalloonCollection {
class BalloonControllerTest : public RenderViewHostTestHarness {
public:
BalloonControllerTest() :
- ui_thread_(ChromeThread::UI, MessageLoop::current()),
- io_thread_(ChromeThread::IO, MessageLoop::current()) {
+ ui_thread_(BrowserThread::UI, MessageLoop::current()),
+ io_thread_(BrowserThread::IO, MessageLoop::current()) {
}
virtual void SetUp() {
@@ -65,8 +65,8 @@ class BalloonControllerTest : public RenderViewHostTestHarness {
}
protected:
- ChromeThread ui_thread_;
- ChromeThread io_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread io_thread_;
scoped_ptr<TestingProfile> profile_;
scoped_ptr<Browser> browser_;
scoped_ptr<BalloonCollection> collection_;
diff --git a/chrome/browser/cocoa/ssl_client_certificate_selector.mm b/chrome/browser/cocoa/ssl_client_certificate_selector.mm
index b1d2da1..dd8dbc0 100644
--- a/chrome/browser/cocoa/ssl_client_certificate_selector.mm
+++ b/chrome/browser/cocoa/ssl_client_certificate_selector.mm
@@ -99,7 +99,7 @@ void ShowSSLClientCertificateSelector(
net::SSLCertRequestInfo* cert_request_info,
SSLClientAuthHandler* delegate) {
// TODO(davidben): Implement a tab-modal dialog.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
SSLClientCertificateSelectorCocoa* selector =
[[[SSLClientCertificateSelectorCocoa alloc]
initWithHandler:delegate
diff --git a/chrome/browser/cocoa/tabpose_window.mm b/chrome/browser/cocoa/tabpose_window.mm
index 68c809c..011f10a 100644
--- a/chrome/browser/cocoa/tabpose_window.mm
+++ b/chrome/browser/cocoa/tabpose_window.mm
@@ -105,7 +105,7 @@ class ThumbnailLoader : public base::RefCountedThreadSafe<ThumbnailLoader> {
}
void DidReceiveBitmap(const SkBitmap& bitmap) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ResetPaintingObserver();
[layer_ setThumbnail:bitmap];
}
@@ -127,7 +127,7 @@ class ThumbnailLoader : public base::RefCountedThreadSafe<ThumbnailLoader> {
};
void ThumbnailLoader::LoadThumbnail() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ThumbnailGenerator* generator = g_browser_process->GetThumbnailGenerator();
if (!generator) // In unit tests.
return;
diff --git a/chrome/browser/file_system/file_system_dispatcher_host.cc b/chrome/browser/file_system/file_system_dispatcher_host.cc
index 503e85b..d7af9ea 100644
--- a/chrome/browser/file_system/file_system_dispatcher_host.cc
+++ b/chrome/browser/file_system/file_system_dispatcher_host.cc
@@ -59,7 +59,7 @@ struct OpenFileSystemCompletionTask {
dispatcher_host_(dispatcher_host),
callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
base::FileUtilProxy::CreateDirectory(
- ChromeThread::GetMessageLoopProxyForThread(ChromeThread::FILE),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
root_path_, false, true, callback_factory_.NewCallback(
&OpenFileSystemCompletionTask::DidFinish));
}
@@ -89,7 +89,7 @@ FileSystemDispatcherHost::~FileSystemDispatcherHost() {
}
void FileSystemDispatcherHost::Init(base::ProcessHandle process_handle) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(!shutdown_);
DCHECK(!process_handle_);
DCHECK(process_handle);
@@ -274,7 +274,7 @@ void FileSystemDispatcherHost::OnCancel(
}
void FileSystemDispatcherHost::Send(IPC::Message* message) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (!shutdown_ && message_sender_)
message_sender_->Send(message);
else
@@ -328,7 +328,7 @@ fileapi::FileSystemOperation* FileSystemDispatcherHost::GetNewOperation(
new BrowserFileSystemCallbackDispatcher(this, request_id);
fileapi::FileSystemOperation* operation = new fileapi::FileSystemOperation(
dispatcher,
- ChromeThread::GetMessageLoopProxyForThread(ChromeThread::FILE));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
operations_.AddWithID(operation, request_id);
return operation;
}
diff --git a/chrome/browser/file_system/file_system_host_context_unittest.cc b/chrome/browser/file_system/file_system_host_context_unittest.cc
index 2d58588..efc921e 100644
--- a/chrome/browser/file_system/file_system_host_context_unittest.cc
+++ b/chrome/browser/file_system/file_system_host_context_unittest.cc
@@ -129,7 +129,7 @@ const struct IsRestrictedNameTest {
class FileSystemHostContextTest : public testing::Test {
public:
FileSystemHostContextTest()
- : io_thread_(ChromeThread::IO, &message_loop_),
+ : io_thread_(BrowserThread::IO, &message_loop_),
data_path_(kTestDataPath) {
}
diff --git a/chrome/browser/metrics/histogram_synchronizer.cc b/chrome/browser/metrics/histogram_synchronizer.cc
index ff46199..84b79af 100644
--- a/chrome/browser/metrics/histogram_synchronizer.cc
+++ b/chrome/browser/metrics/histogram_synchronizer.cc
@@ -98,8 +98,8 @@ void HistogramSynchronizer::FetchRendererHistogramsAsynchronously(
}
// callback_task_ member can only be accessed on IO thread.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
current_synchronizer,
&HistogramSynchronizer::SetCallbackTaskToCallAfterGettingHistograms,
@@ -117,8 +117,8 @@ void HistogramSynchronizer::FetchRendererHistogramsAsynchronously(
}
// Post a task that would be called after waiting for wait_time.
- ChromeThread::PostDelayedTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostDelayedTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
current_synchronizer,
&HistogramSynchronizer::ForceHistogramSynchronizationDoneCallback,
diff --git a/chrome/browser/policy/config_dir_policy_provider.cc b/chrome/browser/policy/config_dir_policy_provider.cc
index 9d69793..31b6150 100644
--- a/chrome/browser/policy/config_dir_policy_provider.cc
+++ b/chrome/browser/policy/config_dir_policy_provider.cc
@@ -45,9 +45,9 @@ PolicyDirLoader::PolicyDirLoader(
}
void PolicyDirLoader::Stop() {
- if (!ChromeThread::CurrentlyOn(ChromeThread::FILE)) {
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
- NewRunnableMethod(this, &PolicyDirLoader::Stop));
+ if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
+ NewRunnableMethod(this, &PolicyDirLoader::Stop));
return;
}
@@ -58,7 +58,7 @@ void PolicyDirLoader::Stop() {
}
void PolicyDirLoader::Reload() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Check the directory time in order to see whether a reload is required.
base::TimeDelta delay;
@@ -103,7 +103,7 @@ DictionaryValue* PolicyDirLoader::GetPolicy() {
}
void PolicyDirLoader::OnFilePathChanged(const FilePath& path) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
Reload();
}
@@ -177,13 +177,13 @@ bool PolicyDirLoader::IsSafeToReloadPolicy(const base::Time& now,
}
void PolicyDirLoader::ScheduleReloadTask(const base::TimeDelta& delay) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (reload_task_)
reload_task_->Cancel();
reload_task_ = NewRunnableMethod(this, &PolicyDirLoader::ReloadFromTask);
- ChromeThread::PostDelayedTask(ChromeThread::FILE, FROM_HERE, reload_task_,
+ BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE, reload_task_,
delay.InMilliseconds());
}
@@ -194,7 +194,7 @@ void PolicyDirLoader::NotifyPolicyChanged() {
}
void PolicyDirLoader::ReloadFromTask() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Drop the reference to the reload task, since the task might be the only
// referer that keeps us alive, so we should not Cancel() it.
@@ -209,7 +209,7 @@ void PolicyDirWatcher::Init(PolicyDirLoader* loader) {
// Initialization can happen early when the file thread is not yet available.
// So post a task to ourselves on the UI thread which will run after threading
// is up and schedule watch initialization on the file thread.
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&PolicyDirWatcher::InitWatcher,
scoped_refptr<PolicyDirLoader>(loader)));
@@ -217,8 +217,8 @@ void PolicyDirWatcher::Init(PolicyDirLoader* loader) {
void PolicyDirWatcher::InitWatcher(
const scoped_refptr<PolicyDirLoader>& loader) {
- if (!ChromeThread::CurrentlyOn(ChromeThread::FILE)) {
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this, &PolicyDirWatcher::InitWatcher, loader));
return;
}
diff --git a/chrome/browser/policy/config_dir_policy_provider_unittest.cc b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
index 87a7589..2c755ab 100644
--- a/chrome/browser/policy/config_dir_policy_provider_unittest.cc
+++ b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
@@ -27,8 +27,8 @@ template<typename BASE>
class ConfigDirPolicyProviderTestBase : public BASE {
protected:
ConfigDirPolicyProviderTestBase()
- : ui_thread_(ChromeThread::UI, &loop_),
- file_thread_(ChromeThread::FILE, &loop_) {}
+ : ui_thread_(BrowserThread::UI, &loop_),
+ file_thread_(BrowserThread::FILE, &loop_) {}
virtual void SetUp() {
// Determine the directory to use for testing.
@@ -61,8 +61,8 @@ class ConfigDirPolicyProviderTestBase : public BASE {
FilePath test_dir_;
MessageLoop loop_;
- ChromeThread ui_thread_;
- ChromeThread file_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread file_thread_;
};
// A mock provider that allows us to capture reload notifications.
diff --git a/chrome/browser/prefs/pref_notifier.cc b/chrome/browser/prefs/pref_notifier.cc
index 3bb0628..7c02fc7 100644
--- a/chrome/browser/prefs/pref_notifier.cc
+++ b/chrome/browser/prefs/pref_notifier.cc
@@ -127,8 +127,8 @@ void PrefNotifier::Observe(NotificationType type,
// The notification of the policy refresh can come from any thread,
// but the manipulation of the PrefValueStore must happen on the UI
// thread, thus the policy refresh must be explicitly started on it.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
pref_value_store_,
&PrefValueStore::RefreshPolicyPrefs,
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index d807f5a4..5606d9e 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -132,7 +132,7 @@ void PrefService::InitFromStorage() {
}
if (message_id) {
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&NotifyReadError, this, message_id));
}
UMA_HISTOGRAM_ENUMERATION("PrefService.ReadError", error, 20);
diff --git a/chrome/browser/prefs/pref_value_store.cc b/chrome/browser/prefs/pref_value_store.cc
index ff2a7a4..078aac1 100644
--- a/chrome/browser/prefs/pref_value_store.cc
+++ b/chrome/browser/prefs/pref_value_store.cc
@@ -46,7 +46,7 @@ PrefValueStore* PrefValueStore::CreatePrefValueStore(
JsonPrefStore* user = new JsonPrefStore(
pref_filename,
- ChromeThread::GetMessageLoopProxyForThread(ChromeThread::FILE));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
DefaultPrefStore* default_store = new DefaultPrefStore();
if (!user_only) {
@@ -286,12 +286,12 @@ void PrefValueStore::RefreshPolicyPrefsCompletion(
}
void PrefValueStore::RefreshPolicyPrefsOnFileThread(
- ChromeThread::ID calling_thread_id,
+ BrowserThread::ID calling_thread_id,
PrefStore* new_managed_pref_store,
PrefStore* new_recommended_pref_store,
AfterRefreshCallback* callback_pointer) {
scoped_ptr<AfterRefreshCallback> callback(callback_pointer);
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<PrefStore> managed_pref_store(new_managed_pref_store);
scoped_ptr<PrefStore> recommended_pref_store(new_recommended_pref_store);
@@ -309,7 +309,7 @@ void PrefValueStore::RefreshPolicyPrefsOnFileThread(
return;
}
- ChromeThread::PostTask(
+ BrowserThread::PostTask(
calling_thread_id, FROM_HERE,
NewRunnableMethod(this,
&PrefValueStore::RefreshPolicyPrefsCompletion,
@@ -322,10 +322,10 @@ void PrefValueStore::RefreshPolicyPrefs(
PrefStore* new_managed_pref_store,
PrefStore* new_recommended_pref_store,
AfterRefreshCallback* callback) {
- ChromeThread::ID current_thread_id;
- CHECK(ChromeThread::GetCurrentThreadIdentifier(&current_thread_id));
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::ID current_thread_id;
+ CHECK(BrowserThread::GetCurrentThreadIdentifier(&current_thread_id));
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this,
&PrefValueStore::RefreshPolicyPrefsOnFileThread,
current_thread_id,
diff --git a/chrome/browser/prefs/pref_value_store.h b/chrome/browser/prefs/pref_value_store.h
index 1dd4abb..8903eae 100644
--- a/chrome/browser/prefs/pref_value_store.h
+++ b/chrome/browser/prefs/pref_value_store.h
@@ -217,7 +217,7 @@ class PrefValueStore : public base::RefCountedThreadSafe<PrefValueStore> {
// Called during policy refresh to do the ReadPrefs on the FILE thread.
// RefreshPolicyPrefsOnFileThread takes ownership of the |callback| object.
void RefreshPolicyPrefsOnFileThread(
- ChromeThread::ID calling_thread_id,
+ BrowserThread::ID calling_thread_id,
PrefStore* new_managed_pref_store,
PrefStore* new_recommended_pref_store,
AfterRefreshCallback* callback);
diff --git a/chrome/browser/prefs/pref_value_store_unittest.cc b/chrome/browser/prefs/pref_value_store_unittest.cc
index fcb5b60..e7f182f 100644
--- a/chrome/browser/prefs/pref_value_store_unittest.cc
+++ b/chrome/browser/prefs/pref_value_store_unittest.cc
@@ -133,8 +133,8 @@ class PrefValueStoreTest : public testing::Test {
pref_value_store_->RegisterPreferenceType(prefs::kDefaultPref,
Value::TYPE_INTEGER);
- ui_thread_.reset(new ChromeThread(ChromeThread::UI, &loop_));
- file_thread_.reset(new ChromeThread(ChromeThread::FILE, &loop_));
+ ui_thread_.reset(new BrowserThread(BrowserThread::UI, &loop_));
+ file_thread_.reset(new BrowserThread(BrowserThread::FILE, &loop_));
}
// Creates a new dictionary and stores some sample user preferences
@@ -250,8 +250,8 @@ class PrefValueStoreTest : public testing::Test {
DictionaryValue* default_prefs_;
private:
- scoped_ptr<ChromeThread> ui_thread_;
- scoped_ptr<ChromeThread> file_thread_;
+ scoped_ptr<BrowserThread> ui_thread_;
+ scoped_ptr<BrowserThread> file_thread_;
};
TEST_F(PrefValueStoreTest, IsReadOnly) {
@@ -640,8 +640,8 @@ TEST_F(PrefValueStoreTest, TestPolicyRefresh) {
// recommended stores should change.
MockPolicyRefreshCallback callback;
EXPECT_CALL(callback, DoCallback(_)).Times(0);
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
pref_value_store_.get(),
&PrefValueStore::RefreshPolicyPrefs,
@@ -718,8 +718,8 @@ TEST_F(PrefValueStoreTest, TestRefreshPolicyPrefsCompletion) {
TEST_F(PrefValueStoreTest, TestConcurrentPolicyRefresh) {
MockPolicyRefreshCallback callback1;
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
pref_value_store_.get(),
&PrefValueStore::RefreshPolicyPrefs,
@@ -730,8 +730,8 @@ TEST_F(PrefValueStoreTest, TestConcurrentPolicyRefresh) {
EXPECT_CALL(callback1, DoCallback(_)).Times(0);
MockPolicyRefreshCallback callback2;
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
pref_value_store_.get(),
&PrefValueStore::RefreshPolicyPrefs,
@@ -742,8 +742,8 @@ TEST_F(PrefValueStoreTest, TestConcurrentPolicyRefresh) {
EXPECT_CALL(callback2, DoCallback(_)).Times(0);
MockPolicyRefreshCallback callback3;
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
pref_value_store_.get(),
&PrefValueStore::RefreshPolicyPrefs,
diff --git a/chrome/browser/remoting/remoting_setup_flow.cc b/chrome/browser/remoting/remoting_setup_flow.cc
index f2c3c33..67a9050 100644
--- a/chrome/browser/remoting/remoting_setup_flow.cc
+++ b/chrome/browser/remoting/remoting_setup_flow.cc
@@ -52,7 +52,7 @@ class RemotingServiceProcessHelper
}
void OnProcessLaunched() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// If the flow is detached then show the done page.
if (!flow_)
return;
@@ -99,8 +99,8 @@ RemotingSetupFlow::RemotingSetupFlow(const std::string& args, Profile* profile)
profile_(profile),
process_control_(NULL) {
// TODO(hclam): The data source should be added once.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
make_scoped_refptr(new RemotingResourcesSource())));
diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc
index 21fbf5b..73e75fa 100644
--- a/chrome/browser/search_engines/search_provider_install_data.cc
+++ b/chrome/browser/search_engines/search_provider_install_data.cc
@@ -66,7 +66,7 @@ std::string IOThreadSearchTermsData::GetApplicationLocale() const {
// deleted on the correct thread.)
class GoogleURLChangeNotifier
: public base::RefCountedThreadSafe<GoogleURLChangeNotifier,
- ChromeThread::DeleteOnIOThread> {
+ BrowserThread::DeleteOnIOThread> {
public:
explicit GoogleURLChangeNotifier(
const base::WeakPtr<SearchProviderInstallData>& install_data);
@@ -76,7 +76,7 @@ class GoogleURLChangeNotifier
void OnChange(const std::string& google_base_url);
private:
- friend struct ChromeThread::DeleteOnThread<ChromeThread::IO>;
+ friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>;
friend class DeleteTask<GoogleURLChangeNotifier>;
~GoogleURLChangeNotifier() {}
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc
index 62afe65..660dbec 100644
--- a/chrome/browser/tab_contents/interstitial_page.cc
+++ b/chrome/browser/tab_contents/interstitial_page.cc
@@ -527,7 +527,7 @@ void InterstitialPage::Disable() {
void InterstitialPage::TakeActionOnResourceDispatcher(
ResourceRequestAction action) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)) <<
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)) <<
"TakeActionOnResourceDispatcher should be called on the main thread.";
if (action == CANCEL || action == RESUME) {
@@ -546,8 +546,8 @@ void InterstitialPage::TakeActionOnResourceDispatcher(
if (!rvh || !g_browser_process->resource_dispatcher_host())
return;
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
new ResourceRequestTask(original_child_id_, original_rvh_id_, action));
}
diff --git a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
index f58b140..c749a8f 100644
--- a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -43,7 +43,7 @@ class RenderViewHostManagerTest : public RenderViewHostTestHarness {
// different SiteInstances, BrowsingInstances, and RenderProcessHosts. This is
// a regression test for bug 9364.
TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
- ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
+ BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current());
GURL ntp(chrome::kChromeUINewTabURL);
GURL dest("http://www.google.com/");
@@ -88,7 +88,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
// EnableViewSourceMode message is sent on every navigation regardless
// RenderView is being newly created or reused.
TEST_F(RenderViewHostManagerTest, AlwaysSendEnableViewSourceMode) {
- ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
+ BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current());
const GURL kNtpUrl(chrome::kChromeUINewTabURL);
const GURL kUrl("view-source:http://foo");
@@ -234,7 +234,7 @@ TEST_F(RenderViewHostManagerTest, Navigate) {
// Tests DOMUI creation.
TEST_F(RenderViewHostManagerTest, DOMUI) {
- ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
+ BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current());
SiteInstance* instance = SiteInstance::CreateSiteInstance(profile_.get());
TestTabContents tab_contents(profile_.get(), instance);
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index d103b65..4a41bb8 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -186,7 +186,7 @@ class TabContentsTest : public RenderViewHostTestHarness {
public:
TabContentsTest()
: RenderViewHostTestHarness(),
- ui_thread_(ChromeThread::UI, &message_loop_) {
+ ui_thread_(BrowserThread::UI, &message_loop_) {
}
private:
@@ -224,7 +224,7 @@ class TabContentsTest : public RenderViewHostTestHarness {
profile_.reset(NULL);
}
- ChromeThread ui_thread_;
+ BrowserThread ui_thread_;
};
// Test to make sure that title updates get stripped of whitespace.
diff --git a/chrome/browser/tab_contents/web_drag_source_win.cc b/chrome/browser/tab_contents/web_drag_source_win.cc
index 1b1ced1..e5c3938 100644
--- a/chrome/browser/tab_contents/web_drag_source_win.cc
+++ b/chrome/browser/tab_contents/web_drag_source_win.cc
@@ -44,9 +44,9 @@ WebDragSource::WebDragSource(gfx::NativeWindow source_wnd,
void WebDragSource::OnDragSourceCancel() {
// Delegate to the UI thread if we do drag-and-drop in the background thread.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &WebDragSource::OnDragSourceCancel));
return;
}
@@ -68,8 +68,8 @@ void WebDragSource::OnDragSourceDrop() {
// event to happen after the "drop" event. Since Windows calls these two
// directly after each other we can just post a task to handle the
// OnDragSourceDrop after the current task.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &WebDragSource::DelayedOnDragSourceDrop));
}
@@ -87,9 +87,9 @@ void WebDragSource::DelayedOnDragSourceDrop() {
void WebDragSource::OnDragSourceMove() {
// Delegate to the UI thread if we do drag-and-drop in the background thread.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &WebDragSource::OnDragSourceMove));
return;
}