summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 22:15:55 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 22:15:55 +0000
commitcca169b5688799d274859e0cb4a01447e4258ea6 (patch)
tree2e979d2e23a563309552f3483e5f73951057485e /chrome/browser/chromeos
parentcfb73d625665af4f863c6f58205b4f1664b3f5c8 (diff)
downloadchromium_src-cca169b5688799d274859e0cb4a01447e4258ea6.zip
chromium_src-cca169b5688799d274859e0cb4a01447e4258ea6.tar.gz
chromium_src-cca169b5688799d274859e0cb4a01447e4258ea6.tar.bz2
Rename ChromeThread to BrowserThread Part7:
- Rename entries under chromeos. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3592014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc16
-rw-r--r--chrome/browser/chromeos/cros/burn_library.cc8
-rw-r--r--chrome/browser/chromeos/cros/cryptohome_library.cc20
-rw-r--r--chrome/browser/chromeos/cros/input_method_library.cc8
-rw-r--r--chrome/browser/chromeos/cros/login_library.cc16
-rw-r--r--chrome/browser/chromeos/cros/mock_mount_library.cc8
-rw-r--r--chrome/browser/chromeos/cros/mount_library.cc2
-rw-r--r--chrome/browser/chromeos/cros/network_library.cc6
-rw-r--r--chrome/browser/chromeos/cros/power_library.cc12
-rw-r--r--chrome/browser/chromeos/cros/screen_lock_library.cc42
-rw-r--r--chrome/browser/chromeos/cros/syslogs_library.cc4
-rw-r--r--chrome/browser/chromeos/cros/touchpad_library.cc8
-rw-r--r--chrome/browser/chromeos/cros/update_library.cc6
-rw-r--r--chrome/browser/chromeos/dom_ui/imageburner_ui.cc10
-rw-r--r--chrome/browser/chromeos/dom_ui/menu_ui.cc4
-rw-r--r--chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc4
-rw-r--r--chrome/browser/chromeos/dom_ui/register_page_ui.cc4
-rw-r--r--chrome/browser/chromeos/dom_ui/system_info_ui.cc4
-rw-r--r--chrome/browser/chromeos/external_metrics.cc8
-rw-r--r--chrome/browser/chromeos/google_update_chromeos.cc4
-rw-r--r--chrome/browser/chromeos/login/account_screen_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/login/auth_attempt_state.cc18
-rw-r--r--chrome/browser/chromeos/login/cookie_fetcher_unittest.cc4
-rw-r--r--chrome/browser/chromeos/login/cryptohome_op.cc16
-rw-r--r--chrome/browser/chromeos/login/cryptohome_op_unittest.cc8
-rw-r--r--chrome/browser/chromeos/login/google_authenticator.cc40
-rw-r--r--chrome/browser/chromeos/login/google_authenticator_unittest.cc40
-rw-r--r--chrome/browser/chromeos/login/image_decoder.cc12
-rw-r--r--chrome/browser/chromeos/login/image_downloader.cc4
-rw-r--r--chrome/browser/chromeos/login/login_performer.cc16
-rw-r--r--chrome/browser/chromeos/login/login_screen.cc8
-rw-r--r--chrome/browser/chromeos/login/login_screen_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/login/mock_authenticator.h12
-rw-r--r--chrome/browser/chromeos/login/mock_owner_key_utils.h8
-rw-r--r--chrome/browser/chromeos/login/mock_url_fetchers.cc8
-rw-r--r--chrome/browser/chromeos/login/online_attempt.cc16
-rw-r--r--chrome/browser/chromeos/login/online_attempt_unittest.cc36
-rw-r--r--chrome/browser/chromeos/login/owner_manager.cc40
-rw-r--r--chrome/browser/chromeos/login/owner_manager.h4
-rw-r--r--chrome/browser/chromeos/login/owner_manager_unittest.cc56
-rw-r--r--chrome/browser/chromeos/login/ownership_service.cc28
-rw-r--r--chrome/browser/chromeos/login/ownership_service_unittest.cc8
-rw-r--r--chrome/browser/chromeos/login/screen_locker.cc4
-rw-r--r--chrome/browser/chromeos/login/signed_settings.cc24
-rw-r--r--chrome/browser/chromeos/login/signed_settings_helper.cc8
-rw-r--r--chrome/browser/chromeos/login/signed_settings_helper_unittest.cc8
-rw-r--r--chrome/browser/chromeos/login/signed_settings_unittest.cc8
-rw-r--r--chrome/browser/chromeos/login/user_image_downloader.cc4
-rw-r--r--chrome/browser/chromeos/login/user_image_loader.cc12
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.cc8
-rw-r--r--chrome/browser/chromeos/network_state_notifier.cc6
-rw-r--r--chrome/browser/chromeos/network_state_notifier_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/notifications/desktop_notifications_unittest.cc2
-rw-r--r--chrome/browser/chromeos/notifications/desktop_notifications_unittest.h2
-rw-r--r--chrome/browser/chromeos/offline/offline_load_page.cc2
-rw-r--r--chrome/browser/chromeos/offline/offline_load_page_unittest.cc8
-rw-r--r--chrome/browser/chromeos/offline/offline_load_service.cc18
-rw-r--r--chrome/browser/chromeos/proxy_config_service_impl.cc6
-rw-r--r--chrome/browser/chromeos/proxy_config_service_impl.h4
-rw-r--r--chrome/browser/chromeos/proxy_config_service_impl_unittest.cc8
60 files changed, 360 insertions, 358 deletions
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index c6b2628..4683a91 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -79,8 +79,8 @@ BootTimesLoader::Handle BootTimesLoader::GetBootTimes(
new CancelableRequest<GetBootTimesCallback>(callback));
AddRequest(request, consumer);
- ChromeThread::PostTask(
- ChromeThread::FILE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE,
FROM_HERE,
NewRunnableMethod(backend_.get(), &Backend::GetBootTimes, request));
return request->handle();
@@ -167,8 +167,8 @@ void BootTimesLoader::Backend::GetBootTimes(
FilePath log_dir(kLogPath);
FilePath log_file = log_dir.Append(uptime_prefix + kLoginPromptReady);
if (!file_util::PathExists(log_file)) {
- ChromeThread::PostDelayedTask(
- ChromeThread::FILE,
+ BrowserThread::PostDelayedTask(
+ BrowserThread::FILE,
FROM_HERE,
NewRunnableMethod(this, &Backend::GetBootTimes, request),
kReadAttemptDelayMs);
@@ -230,8 +230,8 @@ static void WriteLoginTimes(
}
void BootTimesLoader::RecordStats(const std::string& name, const Stats& stats) {
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(
RecordStatsDelayed, name, stats.uptime, stats.disk));
}
@@ -295,8 +295,8 @@ void BootTimesLoader::Observe(
// Post chrome first render stat.
registrar_.Remove(this, NotificationType::LOAD_START,
NotificationService::AllSources());
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(
WriteLoginTimes,
login_attempt_, login_success_, chrome_first_render_));
diff --git a/chrome/browser/chromeos/cros/burn_library.cc b/chrome/browser/chromeos/cros/burn_library.cc
index d174348..de6ffd7 100644
--- a/chrome/browser/chromeos/cros/burn_library.cc
+++ b/chrome/browser/chromeos/cros/burn_library.cc
@@ -38,7 +38,7 @@ bool BurnLibraryImpl::DoBurn(const FilePath& from_path,
BurnLibraryTaskProxy* task = new BurnLibraryTaskProxy(AsWeakPtr());
task->AddRef();
task->BurnImage(from_path, to_path);
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(task, &BurnLibraryTaskProxy::BurnImage,
from_path, to_path));
return true;
@@ -47,7 +47,7 @@ bool BurnLibraryImpl::DoBurn(const FilePath& from_path,
bool BurnLibraryImpl::BurnImage(const FilePath& from_path,
const FilePath& to_path) {
// Make sure we run on file thread.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Check if there is a target path already being burnt to.
if (target_path_ == "") {
@@ -71,7 +71,7 @@ void BurnLibraryImpl::BurnStatusChangedHandler(void* object,
BurnLibraryTaskProxy* task = new BurnLibraryTaskProxy(burn->AsWeakPtr());
task->AddRef();
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(task, &BurnLibraryTaskProxy::UpdateBurnStatus,
status_copy, evt));
}
@@ -83,7 +83,7 @@ void BurnLibraryImpl::Init() {
void BurnLibraryImpl::UpdateBurnStatus(const ImageBurnStatus& status,
BurnEventType evt) {
// Make sure we run on UI thread.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// If burn is finished, remove target paths from paths being burnt to.
// This has to be done in thread-safe way, hence using task proxy class.
diff --git a/chrome/browser/chromeos/cros/cryptohome_library.cc b/chrome/browser/chromeos/cros/cryptohome_library.cc
index 13145d3..6a437fc 100644
--- a/chrome/browser/chromeos/cros/cryptohome_library.cc
+++ b/chrome/browser/chromeos/cros/cryptohome_library.cc
@@ -156,8 +156,8 @@ class CryptohomeLibraryStubImpl : public CryptohomeLibrary {
bool AsyncCheckKey(const std::string& user_email,
const std::string& passhash,
Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
@@ -172,8 +172,8 @@ class CryptohomeLibraryStubImpl : public CryptohomeLibrary {
const std::string& old_hash,
const std::string& new_hash,
Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
@@ -183,8 +183,8 @@ class CryptohomeLibraryStubImpl : public CryptohomeLibrary {
}
bool AsyncRemove(const std::string& user_email, Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
@@ -199,8 +199,8 @@ class CryptohomeLibraryStubImpl : public CryptohomeLibrary {
const std::string& passhash,
const bool create_if_missing,
Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
@@ -210,8 +210,8 @@ class CryptohomeLibraryStubImpl : public CryptohomeLibrary {
}
bool AsyncMountForBwsi(Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
diff --git a/chrome/browser/chromeos/cros/input_method_library.cc b/chrome/browser/chromeos/cros/input_method_library.cc
index 933700b..0999dc7 100644
--- a/chrome/browser/chromeos/cros/input_method_library.cc
+++ b/chrome/browser/chromeos/cros/input_method_library.cc
@@ -288,7 +288,7 @@ class InputMethodLibraryImpl : public InputMethodLibrary,
// notified via a DBus connection. Since the DBus notificatiosn are
// handled in the UI thread, we can assume that this functionalways
// runs on the UI thread, but just in case.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
LOG(ERROR) << "Not on UI thread";
return;
}
@@ -301,7 +301,7 @@ class InputMethodLibraryImpl : public InputMethodLibrary,
static void RegisterPropertiesHandler(
void* object, const ImePropertyList& prop_list) {
// See comments in InputMethodChangedHandler.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
LOG(ERROR) << "Not on UI thread";
return;
}
@@ -314,7 +314,7 @@ class InputMethodLibraryImpl : public InputMethodLibrary,
static void UpdatePropertyHandler(
void* object, const ImePropertyList& prop_list) {
// See comments in InputMethodChangedHandler.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
LOG(ERROR) << "Not on UI thread";
return;
}
@@ -326,7 +326,7 @@ class InputMethodLibraryImpl : public InputMethodLibrary,
static void ConnectionChangeHandler(void* object, bool connected) {
// See comments in InputMethodChangedHandler.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
LOG(ERROR) << "Not on UI thread";
return;
}
diff --git a/chrome/browser/chromeos/cros/login_library.cc b/chrome/browser/chromeos/cros/login_library.cc
index 4b57d44..13405b7 100644
--- a/chrome/browser/chromeos/cros/login_library.cc
+++ b/chrome/browser/chromeos/cros/login_library.cc
@@ -179,8 +179,8 @@ class LoginLibraryStubImpl : public LoginLibrary {
}
bool SetOwnerKeyAsync(const std::vector<uint8>& public_key_der,
Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
@@ -188,24 +188,24 @@ class LoginLibraryStubImpl : public LoginLibrary {
const std::string& value,
const std::vector<uint8>& signature,
Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
bool UnwhitelistAsync(const std::string& email,
const std::vector<uint8>& signature,
Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
bool WhitelistAsync(const std::string& email,
const std::vector<uint8>& signature,
Delegate* callback) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&DoStubCallback, callback));
return true;
}
diff --git a/chrome/browser/chromeos/cros/mock_mount_library.cc b/chrome/browser/chromeos/cros/mock_mount_library.cc
index 0f96b1c..c42610d 100644
--- a/chrome/browser/chromeos/cros/mock_mount_library.cc
+++ b/chrome/browser/chromeos/cros/mock_mount_library.cc
@@ -22,7 +22,8 @@ void MockMountLibrary::AddObserverInternal(MountLibrary::Observer* observer) {
observers_.AddObserver(observer);
}
-void MockMountLibrary::RemoveObserverInternal(MountLibrary::Observer* observer) {
+void MockMountLibrary::RemoveObserverInternal(
+ MountLibrary::Observer* observer) {
observers_.RemoveObserver(observer);
}
@@ -56,7 +57,8 @@ void MockMountLibrary::FireDeviceInsertEvents() {
// Disk Changed
disks_.clear();
- disks_.push_back(Disk(kTestDevicePath, kTestMountPath, kTestSystemPath, false, true));
+ disks_.push_back(Disk(
+ kTestDevicePath, kTestMountPath, kTestSystemPath, false, true));
evt = chromeos::DISK_CHANGED;
UpdateMountStatus(evt, kTestDevicePath);
}
@@ -71,7 +73,7 @@ void MockMountLibrary::FireDeviceRemoveEvents() {
void MockMountLibrary::UpdateMountStatus(MountEventType evt,
const std::string& path) {
// Make sure we run on UI thread.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
FOR_EACH_OBSERVER(Observer, observers_, MountChanged(this, evt, path));
}
diff --git a/chrome/browser/chromeos/cros/mount_library.cc b/chrome/browser/chromeos/cros/mount_library.cc
index 16cec4a..c5d420c 100644
--- a/chrome/browser/chromeos/cros/mount_library.cc
+++ b/chrome/browser/chromeos/cros/mount_library.cc
@@ -97,7 +97,7 @@ class MountLibraryImpl : public MountLibrary {
MountEventType evt,
const std::string& path) {
// Make sure we run on UI thread.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
FOR_EACH_OBSERVER(
Observer, observers_, MountChanged(this, evt, path));
diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc
index 7e118bd..1653cd2 100644
--- a/chrome/browser/chromeos/cros/network_library.cc
+++ b/chrome/browser/chromeos/cros/network_library.cc
@@ -894,9 +894,9 @@ class NetworkLibraryImpl : public NetworkLibrary {
void UpdateNetworkStatus() {
// Make sure we run on UI 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,
&NetworkLibraryImpl::UpdateNetworkStatus));
return;
diff --git a/chrome/browser/chromeos/cros/power_library.cc b/chrome/browser/chromeos/cros/power_library.cc
index 85c5e9a..1f6db30 100644
--- a/chrome/browser/chromeos/cros/power_library.cc
+++ b/chrome/browser/chromeos/cros/power_library.cc
@@ -65,9 +65,9 @@ class PowerLibraryImpl : public PowerLibrary {
// Make sure we run on FILE thread becuase chromeos::EnableScreenLock
// would write power manager config file to disk.
- if (!ChromeThread::CurrentlyOn(ChromeThread::FILE)) {
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this, &PowerLibraryImpl::EnableScreenLock, enable));
return;
}
@@ -89,9 +89,9 @@ class PowerLibraryImpl : public PowerLibrary {
void UpdatePowerStatus(const chromeos::PowerStatus& status) {
// Make sure we run on UI 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, &PowerLibraryImpl::UpdatePowerStatus, status));
return;
diff --git a/chrome/browser/chromeos/cros/screen_lock_library.cc b/chrome/browser/chromeos/cros/screen_lock_library.cc
index 0115683..2f8d7b8 100644
--- a/chrome/browser/chromeos/cros/screen_lock_library.cc
+++ b/chrome/browser/chromeos/cros/screen_lock_library.cc
@@ -36,9 +36,9 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary {
void NotifyScreenLockRequested() {
// Make sure we run on IO thread.
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
this,
&ScreenLockLibraryImpl::NotifyScreenLockRequested));
@@ -49,9 +49,9 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary {
void NotifyScreenLockCompleted() {
// Make sure we run on IO thread.
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
this,
&ScreenLockLibraryImpl::NotifyScreenLockCompleted));
@@ -62,9 +62,9 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary {
void NotifyScreenUnlockRequested() {
// Make sure we run on IO thread.
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
this,
&ScreenLockLibraryImpl::NotifyScreenUnlockRequested));
@@ -75,9 +75,9 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary {
void NotifyScreenUnlockCompleted() {
// Make sure we run on IO thread.
- if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
this,
&ScreenLockLibraryImpl::NotifyScreenUnlockCompleted));
@@ -94,9 +94,9 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary {
void LockScreen() {
// Make sure we run on UI 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, &ScreenLockLibraryImpl::LockScreen));
return;
}
@@ -105,9 +105,9 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary {
void UnlockScreen() {
// Make sure we run on UI 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, &ScreenLockLibraryImpl::UnlockScreen));
return;
}
@@ -116,9 +116,9 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary {
void UnlockScreenFailed() {
// Make sure we run on UI 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, &ScreenLockLibraryImpl::UnlockScreenFailed));
return;
}
diff --git a/chrome/browser/chromeos/cros/syslogs_library.cc b/chrome/browser/chromeos/cros/syslogs_library.cc
index 9fed176..ed31800 100644
--- a/chrome/browser/chromeos/cros/syslogs_library.cc
+++ b/chrome/browser/chromeos/cros/syslogs_library.cc
@@ -25,8 +25,8 @@ class SyslogsLibraryImpl : public SyslogsLibrary {
// Schedule a task on the FILE thread which will then trigger a request
// callback on the calling thread (e.g. UI) when complete.
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(
this, &SyslogsLibraryImpl::ReadSyslogs, request, tmpfilename));
diff --git a/chrome/browser/chromeos/cros/touchpad_library.cc b/chrome/browser/chromeos/cros/touchpad_library.cc
index 62294ea..9816ef6 100644
--- a/chrome/browser/chromeos/cros/touchpad_library.cc
+++ b/chrome/browser/chromeos/cros/touchpad_library.cc
@@ -17,16 +17,16 @@ class TouchpadLibraryImpl : public TouchpadLibrary {
void SetSensitivity(int value) {
if (CrosLibrary::Get()->EnsureLoaded()) {
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(&SetTouchpadSensitivity, value));
}
}
void SetTapToClick(bool enabled) {
if (CrosLibrary::Get()->EnsureLoaded()) {
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(&SetTouchpadTapToClick, enabled));
}
}
diff --git a/chrome/browser/chromeos/cros/update_library.cc b/chrome/browser/chromeos/cros/update_library.cc
index 79b1bba..98e9215 100644
--- a/chrome/browser/chromeos/cros/update_library.cc
+++ b/chrome/browser/chromeos/cros/update_library.cc
@@ -67,9 +67,9 @@ class UpdateLibraryImpl : public UpdateLibrary {
void UpdateStatus(const Status& status) {
// Make sure we run on UI 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, &UpdateLibraryImpl::UpdateStatus, status));
return;
}
diff --git a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
index 9c5acba..eb7bc89 100644
--- a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
@@ -236,8 +236,8 @@ void ImageBurnHandler::HandleDownloadImage(const ListValue* args) {
void ImageBurnHandler::HandleBurnImage(const ListValue* args) {
ImageBurnTaskProxy* task = new ImageBurnTaskProxy(AsWeakPtr());
task->AddRef();
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(task, &ImageBurnTaskProxy::BurnImage));
}
@@ -279,7 +279,7 @@ void ImageBurnHandler::BurnImage() {
}
void ImageBurnHandler::FinalizeBurn(bool successful) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (successful)
dom_ui_->CallJavascriptFunction(L"burnSuccessful");
else
@@ -614,8 +614,8 @@ ImageBurnUI::ImageBurnUI(TabContents* contents) : DOMUI(contents) {
ImageBurnHandler* handler = new ImageBurnHandler(contents);
AddMessageHandler((handler)->Attach(this));
ImageBurnUIHTMLSource* html_source = new ImageBurnUIHTMLSource();
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
diff --git a/chrome/browser/chromeos/dom_ui/menu_ui.cc b/chrome/browser/chromeos/dom_ui/menu_ui.cc
index e6adb5d..bfdce6b 100644
--- a/chrome/browser/chromeos/dom_ui/menu_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/menu_ui.cc
@@ -562,8 +562,8 @@ MenuUI::MenuUI(TabContents* contents) : DOMUI(contents) {
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/chromeos/dom_ui/mobile_setup_ui.cc b/chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc
index 6bbb947..1c11c09 100644
--- a/chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc
@@ -228,8 +228,8 @@ MobileSetupUI::MobileSetupUI(TabContents* contents) : DOMUI(contents){
MobileSetupUIHTMLSource* html_source = new MobileSetupUIHTMLSource();
// Set up the chrome://mobilesetup/ source.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
diff --git a/chrome/browser/chromeos/dom_ui/register_page_ui.cc b/chrome/browser/chromeos/dom_ui/register_page_ui.cc
index 2deda48..9ea5125 100644
--- a/chrome/browser/chromeos/dom_ui/register_page_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/register_page_ui.cc
@@ -321,8 +321,8 @@ RegisterPageUI::RegisterPageUI(TabContents* contents) : DOMUI(contents){
RegisterPageUIHTMLSource* html_source = new RegisterPageUIHTMLSource();
// Set up the chrome://register/ source.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
diff --git a/chrome/browser/chromeos/dom_ui/system_info_ui.cc b/chrome/browser/chromeos/dom_ui/system_info_ui.cc
index a15f8d80..4b4f7a4 100644
--- a/chrome/browser/chromeos/dom_ui/system_info_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/system_info_ui.cc
@@ -176,8 +176,8 @@ SystemInfoUI::SystemInfoUI(TabContents* contents) : DOMUI(contents) {
SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource();
// Set up the chrome://system/ source.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
diff --git a/chrome/browser/chromeos/external_metrics.cc b/chrome/browser/chromeos/external_metrics.cc
index 96e2b68..10e78f2 100644
--- a/chrome/browser/chromeos/external_metrics.cc
+++ b/chrome/browser/chromeos/external_metrics.cc
@@ -75,8 +75,8 @@ void ExternalMetrics::RecordActionUI(std::string action_string) {
void ExternalMetrics::RecordAction(const char* action) {
std::string action_string(action);
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &ExternalMetrics::RecordActionUI, action));
}
@@ -229,8 +229,8 @@ void ExternalMetrics::CollectEventsAndReschedule() {
void ExternalMetrics::ScheduleCollector() {
bool result;
- result = ChromeThread::PostDelayedTask(
- ChromeThread::FILE, FROM_HERE, NewRunnableMethod(
+ result = BrowserThread::PostDelayedTask(
+ BrowserThread::FILE, FROM_HERE, NewRunnableMethod(
this, &chromeos::ExternalMetrics::CollectEventsAndReschedule),
kExternalMetricsCollectionIntervalMs);
DCHECK(result);
diff --git a/chrome/browser/chromeos/google_update_chromeos.cc b/chrome/browser/chromeos/google_update_chromeos.cc
index c1bf0ba..4d568b4 100644
--- a/chrome/browser/chromeos/google_update_chromeos.cc
+++ b/chrome/browser/chromeos/google_update_chromeos.cc
@@ -34,8 +34,8 @@ GoogleUpdate::~GoogleUpdate() {
void GoogleUpdate::CheckForUpdate(bool install_if_newer, Window* window) {
// We need to shunt this request over to InitiateGoogleUpdateCheck and have
// it run in the file thread.
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(
this, &GoogleUpdate::InitiateGoogleUpdateCheck, install_if_newer,
window, MessageLoop::current()));
diff --git a/chrome/browser/chromeos/login/account_screen_browsertest.cc b/chrome/browser/chromeos/login/account_screen_browsertest.cc
index eec150d..384a4bc 100644
--- a/chrome/browser/chromeos/login/account_screen_browsertest.cc
+++ b/chrome/browser/chromeos/login/account_screen_browsertest.cc
@@ -61,8 +61,8 @@ static URLRequestJob* InspectorHook(URLRequest* request,
EXPECT_STREQ("cros://inspector/?param1=value1+param2",
request->url().spec().c_str());
inspector_called = true;
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
- NewRunnableFunction(QuitUIMessageLoop));
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ NewRunnableFunction(QuitUIMessageLoop));
// Do not navigate to the given URL. Navigate to about:blank instead.
return new URLRequestAboutJob(request);
diff --git a/chrome/browser/chromeos/login/auth_attempt_state.cc b/chrome/browser/chromeos/login/auth_attempt_state.cc
index db77787..8e3ac9b 100644
--- a/chrome/browser/chromeos/login/auth_attempt_state.cc
+++ b/chrome/browser/chromeos/login/auth_attempt_state.cc
@@ -48,7 +48,7 @@ AuthAttemptState::~AuthAttemptState() {}
void AuthAttemptState::RecordOnlineLoginStatus(
const GaiaAuthConsumer::ClientLoginResult& credentials,
const LoginFailure& outcome) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
online_complete_ = true;
online_outcome_ = outcome;
credentials_ = credentials;
@@ -56,46 +56,46 @@ void AuthAttemptState::RecordOnlineLoginStatus(
void AuthAttemptState::RecordCryptohomeStatus(bool cryptohome_outcome,
int cryptohome_code) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
cryptohome_complete_ = true;
cryptohome_outcome_ = cryptohome_outcome;
cryptohome_code_ = cryptohome_code;
}
void AuthAttemptState::ResetCryptohomeStatus() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
cryptohome_complete_ = false;
cryptohome_outcome_ = false;
cryptohome_code_ = kCryptohomeMountErrorNone;
}
bool AuthAttemptState::online_complete() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return online_complete_;
}
const LoginFailure& AuthAttemptState::online_outcome() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return online_outcome_;
}
const GaiaAuthConsumer::ClientLoginResult& AuthAttemptState::credentials() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return credentials_;
}
bool AuthAttemptState::cryptohome_complete() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return cryptohome_complete_;
}
bool AuthAttemptState::cryptohome_outcome() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return cryptohome_outcome_;
}
int AuthAttemptState::cryptohome_code() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return cryptohome_code_;
}
diff --git a/chrome/browser/chromeos/login/cookie_fetcher_unittest.cc b/chrome/browser/chromeos/login/cookie_fetcher_unittest.cc
index b5e3a4f..2c295d6 100644
--- a/chrome/browser/chromeos/login/cookie_fetcher_unittest.cc
+++ b/chrome/browser/chromeos/login/cookie_fetcher_unittest.cc
@@ -37,7 +37,7 @@ class CookieFetcherTest : public ::testing::Test {
ta_url_(AuthResponseHandler::kTokenAuthUrl),
client_login_data_("SID n' LSID"),
token_("auth token"),
- ui_thread_(ChromeThread::UI, &message_loop_) {
+ ui_thread_(BrowserThread::UI, &message_loop_) {
}
const GURL iat_url_;
@@ -45,7 +45,7 @@ class CookieFetcherTest : public ::testing::Test {
const std::string client_login_data_;
const std::string token_;
MessageLoopForUI message_loop_;
- ChromeThread ui_thread_;
+ BrowserThread ui_thread_;
TestingProfile profile_;
};
diff --git a/chrome/browser/chromeos/login/cryptohome_op.cc b/chrome/browser/chromeos/login/cryptohome_op.cc
index 4ec79cf..c04c6fe 100644
--- a/chrome/browser/chromeos/login/cryptohome_op.cc
+++ b/chrome/browser/chromeos/login/cryptohome_op.cc
@@ -23,15 +23,15 @@ CryptohomeOp::CryptohomeOp(AuthAttemptState* current_attempt,
CryptohomeOp::~CryptohomeOp() {}
void CryptohomeOp::OnComplete(bool success, int return_code) {
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this,
&CryptohomeOp::TriggerResolve,
success, return_code));
}
void CryptohomeOp::TriggerResolve(bool success, int return_code) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
attempt_->RecordCryptohomeStatus(success, return_code);
resolver_->Resolve();
}
@@ -48,7 +48,7 @@ class MountAttempt : public CryptohomeOp {
virtual ~MountAttempt() {}
bool Initiate() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CryptohomeLibrary* lib = CrosLibrary::Get()->GetCryptohomeLibrary();
return lib->AsyncMount(attempt_->username,
attempt_->ascii_hash,
@@ -71,7 +71,7 @@ class MountGuestAttempt : public CryptohomeOp {
virtual ~MountGuestAttempt() {}
bool Initiate() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CryptohomeLibrary* lib = CrosLibrary::Get()->GetCryptohomeLibrary();
return lib->AsyncMountForBwsi(this);
}
@@ -94,7 +94,7 @@ class MigrateAttempt : public CryptohomeOp {
virtual ~MigrateAttempt() {}
bool Initiate() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CryptohomeLibrary* lib = CrosLibrary::Get()->GetCryptohomeLibrary();
if (is_old_hash_) {
return lib->AsyncMigrateKey(attempt_->username,
@@ -126,7 +126,7 @@ class RemoveAttempt : public CryptohomeOp {
virtual ~RemoveAttempt() {}
bool Initiate() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CryptohomeLibrary* lib = CrosLibrary::Get()->GetCryptohomeLibrary();
return lib->AsyncRemove(attempt_->username, this);
}
@@ -145,7 +145,7 @@ class CheckKeyAttempt : public CryptohomeOp {
virtual ~CheckKeyAttempt() {}
bool Initiate() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CryptohomeLibrary* lib = CrosLibrary::Get()->GetCryptohomeLibrary();
return lib->AsyncCheckKey(attempt_->username, attempt_->ascii_hash, this);
}
diff --git a/chrome/browser/chromeos/login/cryptohome_op_unittest.cc b/chrome/browser/chromeos/login/cryptohome_op_unittest.cc
index 7289347..e0db067 100644
--- a/chrome/browser/chromeos/login/cryptohome_op_unittest.cc
+++ b/chrome/browser/chromeos/login/cryptohome_op_unittest.cc
@@ -28,8 +28,8 @@ class CryptohomeOpTest : public ::testing::Test {
public:
CryptohomeOpTest()
: message_loop_(MessageLoop::TYPE_UI),
- ui_thread_(ChromeThread::UI, &message_loop_),
- io_thread_(ChromeThread::IO),
+ ui_thread_(BrowserThread::UI, &message_loop_),
+ io_thread_(BrowserThread::IO),
username_("me@nowhere.org"),
hash_ascii_("0a010000000000a0"),
state_(username_, "", hash_ascii_, "", ""),
@@ -124,8 +124,8 @@ class CryptohomeOpTest : public ::testing::Test {
}
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread io_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread io_thread_;
std::string username_;
std::string hash_ascii_;
TestAttemptState state_;
diff --git a/chrome/browser/chromeos/login/google_authenticator.cc b/chrome/browser/chromeos/login/google_authenticator.cc
index 64baae1..b5ed14f 100644
--- a/chrome/browser/chromeos/login/google_authenticator.cc
+++ b/chrome/browser/chromeos/login/google_authenticator.cc
@@ -71,8 +71,8 @@ void GoogleAuthenticator::CancelClientLogin() {
LOG(INFO) << "Canceling ClientLogin attempt.";
gaia_authenticator_->CancelRequest();
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this,
&GoogleAuthenticator::LoadLocalaccount,
std::string(kLocalaccountFile)));
@@ -90,8 +90,8 @@ void GoogleAuthenticator::TryClientLogin() {
login_captcha_,
GaiaAuthenticator2::HostedAccountsAllowed);
- ChromeThread::PostDelayedTask(
- ChromeThread::UI,
+ BrowserThread::PostDelayedTask(
+ BrowserThread::UI,
FROM_HERE,
NewRunnableMethod(this,
&GoogleAuthenticator::CancelClientLogin),
@@ -146,14 +146,14 @@ bool GoogleAuthenticator::AuthenticateToUnlock(const std::string& username,
LoadLocalaccount(kLocalaccountFile);
if (!localaccount_.empty() && localaccount_ == username) {
LOG(INFO) << "unlocking local account";
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&GoogleAuthenticator::OnLoginSuccess,
GaiaAuthConsumer::ClientLoginResult(), false));
} else {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &GoogleAuthenticator::CheckOffline,
LoginFailure(LoginFailure::UNLOCK_FAILED)));
}
@@ -161,7 +161,7 @@ bool GoogleAuthenticator::AuthenticateToUnlock(const std::string& username,
}
void GoogleAuthenticator::LoginOffTheRecord() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
int mount_error = chromeos::kCryptohomeMountErrorNone;
if (CrosLibrary::Get()->GetCryptohomeLibrary()->MountForBwsi(&mount_error)) {
AuthenticationNotificationDetails details(true);
@@ -183,8 +183,8 @@ void GoogleAuthenticator::OnClientLoginSuccess(
LOG(INFO) << "Online login successful!";
ClearClientLoginAttempt();
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&GoogleAuthenticator::OnLoginSuccess,
credentials, false));
@@ -211,8 +211,8 @@ void GoogleAuthenticator::OnClientLoginFailure(
return;
}
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this,
&GoogleAuthenticator::LoadLocalaccount,
std::string(kLocalaccountFile)));
@@ -221,16 +221,16 @@ void GoogleAuthenticator::OnClientLoginFailure(
if (error.state() == GoogleServiceAuthError::CONNECTION_FAILED) {
// The fetch failed for network reasons, try offline login.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &GoogleAuthenticator::CheckOffline,
failure_details));
return;
}
// The fetch succeeded, but ClientLogin said no, or we exhausted retries.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&GoogleAuthenticator::CheckLocalaccount,
failure_details));
@@ -279,8 +279,8 @@ void GoogleAuthenticator::CheckLocalaccount(const LoginFailure& error) {
AutoLock for_this_block(localaccount_lock_);
LOG(INFO) << "Checking localaccount";
if (!checked_for_localaccount_) {
- ChromeThread::PostDelayedTask(
- ChromeThread::UI,
+ BrowserThread::PostDelayedTask(
+ BrowserThread::UI,
FROM_HERE,
NewRunnableMethod(this,
&GoogleAuthenticator::CheckLocalaccount,
@@ -351,7 +351,7 @@ void GoogleAuthenticator::LoadSystemSalt() {
}
void GoogleAuthenticator::LoadLocalaccount(const std::string& filename) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
{
AutoLock for_this_block(localaccount_lock_);
if (checked_for_localaccount_)
diff --git a/chrome/browser/chromeos/login/google_authenticator_unittest.cc b/chrome/browser/chromeos/login/google_authenticator_unittest.cc
index 130e18a..3bf1251 100644
--- a/chrome/browser/chromeos/login/google_authenticator_unittest.cc
+++ b/chrome/browser/chromeos/login/google_authenticator_unittest.cc
@@ -108,11 +108,11 @@ class GoogleAuthenticatorTest : public ::testing::Test {
void ReadLocalaccountFile(GoogleAuthenticator* auth,
const std::string& filename) {
- ChromeThread file_thread(ChromeThread::FILE);
+ BrowserThread file_thread(BrowserThread::FILE);
file_thread.Start();
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(auth,
&GoogleAuthenticator::LoadLocalaccount,
filename));
@@ -125,8 +125,8 @@ class GoogleAuthenticatorTest : public ::testing::Test {
}
void CancelLogin(GoogleAuthenticator* auth) {
- ChromeThread::PostTask(
- ChromeThread::UI,
+ BrowserThread::PostTask(
+ BrowserThread::UI,
FROM_HERE,
NewRunnableMethod(auth,
&GoogleAuthenticator::CancelClientLogin));
@@ -305,7 +305,7 @@ TEST_F(GoogleAuthenticatorTest, ForgetOldData) {
TEST_F(GoogleAuthenticatorTest, LoginNetFailure) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
GoogleServiceAuthError error =
GoogleServiceAuthError::FromConnectionError(net::ERR_CONNECTION_RESET);
@@ -329,7 +329,7 @@ TEST_F(GoogleAuthenticatorTest, LoginNetFailure) {
TEST_F(GoogleAuthenticatorTest, LoginDenied) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
GoogleServiceAuthError client_error(
GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
@@ -347,7 +347,7 @@ TEST_F(GoogleAuthenticatorTest, LoginDenied) {
TEST_F(GoogleAuthenticatorTest, LoginAccountDisabled) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
GoogleServiceAuthError client_error(
GoogleServiceAuthError::ACCOUNT_DISABLED);
@@ -365,7 +365,7 @@ TEST_F(GoogleAuthenticatorTest, LoginAccountDisabled) {
TEST_F(GoogleAuthenticatorTest, LoginAccountDeleted) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
GoogleServiceAuthError client_error(
GoogleServiceAuthError::ACCOUNT_DELETED);
@@ -383,7 +383,7 @@ TEST_F(GoogleAuthenticatorTest, LoginAccountDeleted) {
TEST_F(GoogleAuthenticatorTest, LoginServiceUnavailable) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
GoogleServiceAuthError client_error(
GoogleServiceAuthError::SERVICE_UNAVAILABLE);
@@ -401,7 +401,7 @@ TEST_F(GoogleAuthenticatorTest, LoginServiceUnavailable) {
TEST_F(GoogleAuthenticatorTest, CaptchaErrorOutputted) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
GoogleServiceAuthError auth_error =
GoogleServiceAuthError::FromCaptchaChallenge(
@@ -424,7 +424,7 @@ TEST_F(GoogleAuthenticatorTest, CaptchaErrorOutputted) {
TEST_F(GoogleAuthenticatorTest, OfflineLogin) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
GoogleServiceAuthError auth_error(
GoogleServiceAuthError::FromConnectionError(net::ERR_CONNECTION_RESET));
@@ -448,7 +448,7 @@ TEST_F(GoogleAuthenticatorTest, OfflineLogin) {
TEST_F(GoogleAuthenticatorTest, OnlineLogin) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
MockConsumer consumer;
EXPECT_CALL(consumer, OnLoginSuccess(username_, result_, false))
@@ -518,7 +518,7 @@ TEST_F(GoogleAuthenticatorTest, LocalaccountLogin) {
// localaccount name off disk and trying to authenticate against it
// simultaneously.
MessageLoop message_loop(MessageLoop::TYPE_UI);
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
MockConsumer consumer;
EXPECT_CALL(consumer, OnLoginSuccess(username_, _, false))
@@ -538,8 +538,8 @@ TEST_F(GoogleAuthenticatorTest, LocalaccountLogin) {
// First, force a check of username_ against the localaccount -- which we
// haven't yet gotten off disk.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(auth.get(),
&GoogleAuthenticator::CheckLocalaccount,
LoginFailure(LoginFailure::LOGIN_TIMED_OUT)));
@@ -560,7 +560,7 @@ TEST_F(GoogleAuthenticatorTest, LocalaccountLogin) {
TEST_F(GoogleAuthenticatorTest, FullLogin) {
MessageLoopForUI message_loop;
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
chromeos::CryptohomeBlob salt_v(fake_hash_, fake_hash_ + sizeof(fake_hash_));
MockConsumer consumer;
@@ -590,7 +590,7 @@ TEST_F(GoogleAuthenticatorTest, FullLogin) {
TEST_F(GoogleAuthenticatorTest, CancelLogin) {
MessageLoop message_loop(MessageLoop::TYPE_UI);
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
chromeos::CryptohomeBlob salt_v(fake_hash_, fake_hash_ + sizeof(fake_hash_));
MockConsumer consumer;
@@ -623,7 +623,7 @@ TEST_F(GoogleAuthenticatorTest, CancelLogin) {
scoped_refptr<GoogleAuthenticator> auth(new GoogleAuthenticator(&consumer));
// For when |auth| tries to load the localaccount file.
- ChromeThread file_thread(ChromeThread::FILE);
+ BrowserThread file_thread(BrowserThread::FILE);
file_thread.Start();
// Start an authentication attempt, which will kick off a URL "fetch" that
@@ -642,7 +642,7 @@ TEST_F(GoogleAuthenticatorTest, CancelLogin) {
TEST_F(GoogleAuthenticatorTest, CancelLoginAlreadyGotLocalaccount) {
MessageLoop message_loop(MessageLoop::TYPE_UI);
- ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ BrowserThread ui_thread(BrowserThread::UI, &message_loop);
chromeos::CryptohomeBlob salt_v(fake_hash_, fake_hash_ + sizeof(fake_hash_));
MockConsumer consumer;
diff --git a/chrome/browser/chromeos/login/image_decoder.cc b/chrome/browser/chromeos/login/image_decoder.cc
index f1b4b74..3c9dadb 100644
--- a/chrome/browser/chromeos/login/image_decoder.cc
+++ b/chrome/browser/chromeos/login/image_decoder.cc
@@ -16,9 +16,9 @@ ImageDecoder::ImageDecoder(Delegate* delegate,
}
void ImageDecoder::Start() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
this, &ImageDecoder::DecodeImageInSandbox,
g_browser_process->resource_dispatcher_host(),
@@ -26,7 +26,7 @@ void ImageDecoder::Start() {
}
void ImageDecoder::OnDecodeImageSucceeded(const SkBitmap& decoded_image) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (delegate_)
delegate_->OnImageDecoded(decoded_image);
}
@@ -34,11 +34,11 @@ void ImageDecoder::OnDecodeImageSucceeded(const SkBitmap& decoded_image) {
void ImageDecoder::DecodeImageInSandbox(
ResourceDispatcherHost* rdh,
const std::vector<unsigned char>& image_data) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
UtilityProcessHost* utility_process_host =
new UtilityProcessHost(rdh,
this,
- ChromeThread::UI);
+ BrowserThread::UI);
utility_process_host->StartImageDecoding(image_data);
}
diff --git a/chrome/browser/chromeos/login/image_downloader.cc b/chrome/browser/chromeos/login/image_downloader.cc
index 367e27e..07d2191 100644
--- a/chrome/browser/chromeos/login/image_downloader.cc
+++ b/chrome/browser/chromeos/login/image_downloader.cc
@@ -26,7 +26,7 @@ ImageDownloader::ImageDownloader(ImageDecoder::Delegate* delegate,
const GURL& image_url,
const std::string& auth_token)
: delegate_(delegate) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
image_fetcher_.reset(new URLFetcher(GURL(image_url), URLFetcher::GET, this));
image_fetcher_->set_request_context(
ProfileManager::GetDefaultProfile()->GetRequestContext());
@@ -43,7 +43,7 @@ void ImageDownloader::OnURLFetchComplete(const URLFetcher* source,
int response_code,
const ResponseCookies& cookies,
const std::string& data) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (response_code != 200) {
LOG(ERROR) << "Response code is " << response_code;
LOG(ERROR) << "Url is " << url.spec();
diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc
index 5aedb93..ae72c4e 100644
--- a/chrome/browser/chromeos/login/login_performer.cc
+++ b/chrome/browser/chromeos/login/login_performer.cc
@@ -107,15 +107,15 @@ void LoginPerformer::Login(const std::string& username,
void LoginPerformer::LoginOffTheRecord() {
authenticator_ = LoginUtils::Get()->CreateAuthenticator(this);
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(authenticator_.get(),
&Authenticator::LoginOffTheRecord));
}
void LoginPerformer::RecoverEncryptedData(const std::string& old_password) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(authenticator_.get(),
&Authenticator::RecoverEncryptedData,
old_password,
@@ -124,8 +124,8 @@ void LoginPerformer::RecoverEncryptedData(const std::string& old_password) {
}
void LoginPerformer::ResyncEncryptedData() {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(authenticator_.get(),
&Authenticator::ResyncEncryptedData,
cached_credentials_));
@@ -138,8 +138,8 @@ void LoginPerformer::ResyncEncryptedData() {
void LoginPerformer::StartAuthentication() {
authenticator_ = LoginUtils::Get()->CreateAuthenticator(this);
Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile();
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(authenticator_.get(),
&Authenticator::AuthenticateToLogin,
profile,
diff --git a/chrome/browser/chromeos/login/login_screen.cc b/chrome/browser/chromeos/login/login_screen.cc
index c0f94e9..757961f 100644
--- a/chrome/browser/chromeos/login/login_screen.cc
+++ b/chrome/browser/chromeos/login/login_screen.cc
@@ -50,8 +50,8 @@ void LoginScreen::OnLogin(const std::string& username,
const std::string& password) {
BootTimesLoader::Get()->RecordLoginAttempted();
Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile();
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(authenticator_.get(),
&Authenticator::AuthenticateToLogin,
profile, username, password,
@@ -59,8 +59,8 @@ void LoginScreen::OnLogin(const std::string& username,
}
void LoginScreen::OnLoginOffTheRecord() {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(authenticator_.get(),
&Authenticator::LoginOffTheRecord));
}
diff --git a/chrome/browser/chromeos/login/login_screen_browsertest.cc b/chrome/browser/chromeos/login/login_screen_browsertest.cc
index 5d97071..7c5a796 100644
--- a/chrome/browser/chromeos/login/login_screen_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_screen_browsertest.cc
@@ -70,8 +70,8 @@ class LoginScreenTest : public WizardInProcessBrowserTest {
static void Quit() {
LOG(INFO) << "Posting a QuitTask to UI thread";
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE, new MessageLoop::QuitTask);
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE, new MessageLoop::QuitTask);
}
IN_PROC_BROWSER_TEST_F(LoginScreenTest, TestBasic) {
ASSERT_TRUE(controller() != NULL);
diff --git a/chrome/browser/chromeos/login/mock_authenticator.h b/chrome/browser/chromeos/login/mock_authenticator.h
index 7a83372..730a9c8 100644
--- a/chrome/browser/chromeos/login/mock_authenticator.h
+++ b/chrome/browser/chromeos/login/mock_authenticator.h
@@ -39,8 +39,8 @@ class MockAuthenticator : public Authenticator {
const std::string& login_captcha) {
if (expected_username_ == username &&
expected_password_ == password) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&MockAuthenticator::OnLoginSuccess,
GaiaAuthConsumer::ClientLoginResult(),
@@ -49,8 +49,8 @@ class MockAuthenticator : public Authenticator {
} else {
GoogleServiceAuthError error(
GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&MockAuthenticator::OnLoginFailure,
LoginFailure::FromNetworkAuthFailure(error)));
@@ -80,8 +80,8 @@ class MockAuthenticator : public Authenticator {
void OnLoginFailure(const LoginFailure& failure) {
consumer_->OnLoginFailure(failure);
LOG(INFO) << "Posting a QuitTask to UI thread";
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE, new MessageLoop::QuitTask);
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE, new MessageLoop::QuitTask);
}
virtual void RecoverEncryptedData(
diff --git a/chrome/browser/chromeos/login/mock_owner_key_utils.h b/chrome/browser/chromeos/login/mock_owner_key_utils.h
index 8e5f9aa6..7699019 100644
--- a/chrome/browser/chromeos/login/mock_owner_key_utils.h
+++ b/chrome/browser/chromeos/login/mock_owner_key_utils.h
@@ -48,16 +48,16 @@ class MockKeyUtils : public OwnerKeyUtils {
static bool ExportPublicKeyViaDbusWin(RSAPrivateKey* key,
LoginLibrary::Delegate* d) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&SetOwnerKeyCallback, d, true));
return true;
}
static bool ExportPublicKeyViaDbusFail(RSAPrivateKey* key,
LoginLibrary::Delegate* d) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&SetOwnerKeyCallback, d, false));
return false;
}
diff --git a/chrome/browser/chromeos/login/mock_url_fetchers.cc b/chrome/browser/chromeos/login/mock_url_fetchers.cc
index 282713e..a1b1bdf 100644
--- a/chrome/browser/chromeos/login/mock_url_fetchers.cc
+++ b/chrome/browser/chromeos/login/mock_url_fetchers.cc
@@ -29,10 +29,10 @@ ExpectCanceledFetcher::~ExpectCanceledFetcher() {
void ExpectCanceledFetcher::Start() {
LOG(INFO) << "Delaying fetch completion in mock";
task_ = NewRunnableFunction(&ExpectCanceledFetcher::CompleteFetch);
- ChromeThread::PostDelayedTask(ChromeThread::UI,
- FROM_HERE,
- task_,
- 100);
+ BrowserThread::PostDelayedTask(BrowserThread::UI,
+ FROM_HERE,
+ task_,
+ 100);
}
// static
diff --git a/chrome/browser/chromeos/login/online_attempt.cc b/chrome/browser/chromeos/login/online_attempt.cc
index 690f681..b2bdfed 100644
--- a/chrome/browser/chromeos/login/online_attempt.cc
+++ b/chrome/browser/chromeos/login/online_attempt.cc
@@ -43,7 +43,7 @@ OnlineAttempt::~OnlineAttempt() {
}
void OnlineAttempt::Initiate(Profile* profile) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
gaia_authenticator_.reset(
new GaiaAuthenticator2(this,
GaiaConstants::kChromeOSSource,
@@ -53,7 +53,7 @@ void OnlineAttempt::Initiate(Profile* profile) {
void OnlineAttempt::OnClientLoginSuccess(
const GaiaAuthConsumer::ClientLoginResult& credentials) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
LOG(INFO) << "Online login successful!";
if (fetch_canceler_) {
fetch_canceler_->Cancel();
@@ -65,7 +65,7 @@ void OnlineAttempt::OnClientLoginSuccess(
void OnlineAttempt::OnClientLoginFailure(
const GoogleServiceAuthError& error) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (fetch_canceler_) {
fetch_canceler_->Cancel();
fetch_canceler_ = NULL;
@@ -93,11 +93,11 @@ void OnlineAttempt::OnClientLoginFailure(
}
void OnlineAttempt::TryClientLogin() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
fetch_canceler_ = NewRunnableMethod(this, &OnlineAttempt::CancelClientLogin);
- ChromeThread::PostDelayedTask(ChromeThread::IO, FROM_HERE,
- fetch_canceler_,
- kClientLoginTimeoutMs);
+ BrowserThread::PostDelayedTask(BrowserThread::IO, FROM_HERE,
+ fetch_canceler_,
+ kClientLoginTimeoutMs);
gaia_authenticator_->StartClientLogin(
attempt_->username,
attempt_->password,
@@ -108,7 +108,7 @@ void OnlineAttempt::TryClientLogin() {
}
void OnlineAttempt::CancelClientLogin() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (gaia_authenticator_->HasPendingFetch()) {
LOG(WARNING) << "Canceling ClientLogin attempt.";
gaia_authenticator_->CancelRequest();
diff --git a/chrome/browser/chromeos/login/online_attempt_unittest.cc b/chrome/browser/chromeos/login/online_attempt_unittest.cc
index 1b8dfba..6226769 100644
--- a/chrome/browser/chromeos/login/online_attempt_unittest.cc
+++ b/chrome/browser/chromeos/login/online_attempt_unittest.cc
@@ -31,8 +31,8 @@ class OnlineAttemptTest : public ::testing::Test {
public:
OnlineAttemptTest()
: message_loop_(MessageLoop::TYPE_UI),
- ui_thread_(ChromeThread::UI, &message_loop_),
- io_thread_(ChromeThread::IO),
+ ui_thread_(BrowserThread::UI, &message_loop_),
+ io_thread_(BrowserThread::IO),
state_("", "", "", "", ""),
resolver_(new MockAuthAttemptStateResolver) {
}
@@ -68,8 +68,8 @@ class OnlineAttemptTest : public ::testing::Test {
.Times(1)
.RetiresOnSaturation();
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(attempt_.get(),
&OnlineAttempt::OnClientLoginFailure,
error));
@@ -79,16 +79,16 @@ class OnlineAttemptTest : public ::testing::Test {
}
void CancelLogin(OnlineAttempt* auth) {
- ChromeThread::PostTask(
- ChromeThread::IO,
+ BrowserThread::PostTask(
+ BrowserThread::IO,
FROM_HERE,
NewRunnableMethod(auth,
&OnlineAttempt::CancelClientLogin));
}
static void Quit() {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE, new MessageLoop::QuitTask());
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE, new MessageLoop::QuitTask());
}
static void RunCancelTest(OnlineAttempt* attempt, Profile* profile) {
@@ -97,8 +97,8 @@ class OnlineAttemptTest : public ::testing::Test {
}
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread io_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread io_thread_;
TestAttemptState state_;
scoped_ptr<MockAuthAttemptStateResolver> resolver_;
scoped_refptr<OnlineAttempt> attempt_;
@@ -110,8 +110,8 @@ TEST_F(OnlineAttemptTest, LoginSuccess) {
.Times(1)
.RetiresOnSaturation();
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(attempt_.get(),
&OnlineAttempt::OnClientLoginSuccess,
result));
@@ -134,8 +134,8 @@ TEST_F(OnlineAttemptTest, LoginCancelRetry) {
MockFactory<GotCanceledFetcher> factory;
URLFetcher::set_factory(&factory);
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableFunction(&OnlineAttemptTest::RunCancelTest,
attempt_.get(), &profile));
@@ -161,8 +161,8 @@ TEST_F(OnlineAttemptTest, LoginTimeout) {
MockFactory<ExpectCanceledFetcher> factory;
URLFetcher::set_factory(&factory);
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableFunction(&OnlineAttemptTest::RunCancelTest,
attempt_.get(), &profile));
@@ -214,8 +214,8 @@ TEST_F(OnlineAttemptTest, TwoFactorSuccess) {
.Times(1)
.RetiresOnSaturation();
GoogleServiceAuthError error(GoogleServiceAuthError::TWO_FACTOR);
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(attempt_.get(),
&OnlineAttempt::OnClientLoginFailure,
error));
diff --git a/chrome/browser/chromeos/login/owner_manager.cc b/chrome/browser/chromeos/login/owner_manager.cc
index cf21dc8..330a19d 100644
--- a/chrome/browser/chromeos/login/owner_manager.cc
+++ b/chrome/browser/chromeos/login/owner_manager.cc
@@ -24,7 +24,7 @@ OwnerManager::OwnerManager()
OwnerManager::~OwnerManager() {}
void OwnerManager::LoadOwnerKey() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
LOG(INFO) << "Loading owner key";
NotificationType result = NotificationType::OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED;
@@ -37,8 +37,8 @@ void OwnerManager::LoadOwnerKey() {
// Whether we loaded the public key or not, send a notification indicating
// that we're done with this attempt.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&OwnerManager::SendNotification,
result,
@@ -46,21 +46,21 @@ void OwnerManager::LoadOwnerKey() {
}
void OwnerManager::GenerateKeysAndExportPublic() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
LOG(INFO) << "Generating key pair";
private_key_.reset(utils_->GenerateKeyPair());
if (private_key_.get() && private_key_->ExportPublicKey(&public_key_)) {
// If we generated the keys successfully, export them.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &OwnerManager::ExportKey));
} else {
private_key_.reset(NULL);
// If we didn't generate the key, send along a notification of failure.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&OwnerManager::SendNotification,
NotificationType::OWNER_KEY_FETCH_ATTEMPT_FAILED,
@@ -72,8 +72,8 @@ void OwnerManager::ExportKey() {
LOG(INFO) << "Exporting public key";
if (!utils_->ExportPublicKeyViaDbus(private_key_.get(), this)) {
private_key_.reset(NULL);
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&OwnerManager::SendNotification,
NotificationType::OWNER_KEY_FETCH_ATTEMPT_FAILED,
@@ -89,8 +89,8 @@ void OwnerManager::OnComplete(bool value) {
// Whether we exported the public key or not, send a notification indicating
// that we're done with this attempt.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&OwnerManager::SendNotification,
result,
@@ -115,14 +115,14 @@ bool OwnerManager::EnsurePrivateKey() {
return private_key_.get() != NULL;
}
-void OwnerManager::Sign(const ChromeThread::ID thread_id,
+void OwnerManager::Sign(const BrowserThread::ID thread_id,
const std::string& data,
Delegate* d) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// If it's not the case that we can get both keys...
if (!(EnsurePublicKey() && EnsurePrivateKey())) {
- ChromeThread::PostTask(
+ BrowserThread::PostTask(
thread_id, FROM_HERE,
NewRunnableMethod(this,
&OwnerManager::CallDelegate,
@@ -137,21 +137,21 @@ void OwnerManager::Sign(const ChromeThread::ID thread_id,
return_code = OPERATION_FAILED;
}
- ChromeThread::PostTask(
+ BrowserThread::PostTask(
thread_id, FROM_HERE,
NewRunnableMethod(this,
&OwnerManager::CallDelegate,
d, return_code, signature));
}
-void OwnerManager::Verify(const ChromeThread::ID thread_id,
+void OwnerManager::Verify(const BrowserThread::ID thread_id,
const std::string& data,
const std::vector<uint8>& signature,
Delegate* d) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (!EnsurePublicKey()) {
- ChromeThread::PostTask(
+ BrowserThread::PostTask(
thread_id, FROM_HERE,
NewRunnableMethod(this,
&OwnerManager::CallDelegate,
@@ -164,7 +164,7 @@ void OwnerManager::Verify(const ChromeThread::ID thread_id,
if (!utils_->Verify(data, signature, public_key_)) {
return_code = OPERATION_FAILED;
}
- ChromeThread::PostTask(
+ BrowserThread::PostTask(
thread_id, FROM_HERE,
NewRunnableMethod(this,
&OwnerManager::CallDelegate,
diff --git a/chrome/browser/chromeos/login/owner_manager.h b/chrome/browser/chromeos/login/owner_manager.h
index 29d8d89..f260df6 100644
--- a/chrome/browser/chromeos/login/owner_manager.h
+++ b/chrome/browser/chromeos/login/owner_manager.h
@@ -77,7 +77,7 @@ class OwnerManager : public base::RefCountedThreadSafe<OwnerManager>,
// successful return code, passing the signaure blob in |payload|.
// On failure, calls d->OnKeyOpComplete() on |thread_id| with an appropriate
// error and passes an empty string for |payload|.
- void Sign(const ChromeThread::ID thread_id,
+ void Sign(const BrowserThread::ID thread_id,
const std::string& data,
Delegate* d);
@@ -89,7 +89,7 @@ class OwnerManager : public base::RefCountedThreadSafe<OwnerManager>,
// successful return code, passing an empty string for |payload|.
// On failure, calls d->OnKeyOpComplete() on |thread_id| with an appropriate
// error code, passing an empty string for |payload|.
- void Verify(const ChromeThread::ID thread_id,
+ void Verify(const BrowserThread::ID thread_id,
const std::string& data,
const std::vector<uint8>& signature,
Delegate* d);
diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.cc b/chrome/browser/chromeos/login/owner_manager_unittest.cc
index 438c4ab..e0512dc 100644
--- a/chrome/browser/chromeos/login/owner_manager_unittest.cc
+++ b/chrome/browser/chromeos/login/owner_manager_unittest.cc
@@ -32,8 +32,8 @@ class OwnerManagerTest : public ::testing::Test {
public:
OwnerManagerTest()
: message_loop_(MessageLoop::TYPE_UI),
- ui_thread_(ChromeThread::UI, &message_loop_),
- file_thread_(ChromeThread::FILE),
+ ui_thread_(BrowserThread::UI, &message_loop_),
+ file_thread_(BrowserThread::FILE),
mock_(new MockKeyUtils),
injector_(mock_) /* injector_ takes ownership of mock_ */ {
}
@@ -69,8 +69,8 @@ class OwnerManagerTest : public ::testing::Test {
FilePath tmpfile_;
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread file_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread file_thread_;
std::vector<uint8> fake_public_key_;
scoped_ptr<RSAPrivateKey> fake_private_key_;
@@ -91,8 +91,8 @@ TEST_F(OwnerManagerTest, LoadOwnerKeyFail) {
.WillOnce(Return(false))
.RetiresOnSaturation();
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::LoadOwnerKey));
message_loop_.Run();
@@ -108,8 +108,8 @@ TEST_F(OwnerManagerTest, AlreadyLoadedOwnerKey) {
InjectKeys(manager.get());
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::LoadOwnerKey));
@@ -128,8 +128,8 @@ TEST_F(OwnerManagerTest, LoadOwnerKey) {
Return(true)))
.RetiresOnSaturation();
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::LoadOwnerKey));
@@ -148,8 +148,8 @@ TEST_F(OwnerManagerTest, KeyGenerationFail) {
EXPECT_CALL(*mock_, GetOwnerKeyFilePath())
.WillRepeatedly(Return(tmpfile_));
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::GenerateKeysAndExportPublic));
@@ -172,8 +172,8 @@ TEST_F(OwnerManagerTest, KeyExportFail) {
EXPECT_CALL(*mock_, GetOwnerKeyFilePath())
.WillRepeatedly(Return(tmpfile_));
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::GenerateKeysAndExportPublic));
@@ -196,8 +196,8 @@ TEST_F(OwnerManagerTest, TakeOwnership) {
EXPECT_CALL(*mock_, GetOwnerKeyFilePath())
.WillRepeatedly(Return(tmpfile_));
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::GenerateKeysAndExportPublic));
@@ -218,11 +218,11 @@ TEST_F(OwnerManagerTest, GetKeyFailDuringVerify) {
MockKeyUser delegate(OwnerManager::KEY_UNAVAILABLE);
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::Verify,
- ChromeThread::UI,
+ BrowserThread::UI,
std::string(),
std::vector<uint8>(),
&delegate));
@@ -244,11 +244,11 @@ TEST_F(OwnerManagerTest, AlreadyHaveKeysVerify) {
InjectKeys(manager.get());
MockKeyUser delegate(OwnerManager::SUCCESS);
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::Verify,
- ChromeThread::UI,
+ BrowserThread::UI,
data,
sig,
&delegate));
@@ -276,11 +276,11 @@ TEST_F(OwnerManagerTest, GetKeyAndVerify) {
MockKeyUser delegate(OwnerManager::SUCCESS);
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::Verify,
- ChromeThread::UI,
+ BrowserThread::UI,
data,
sig,
&delegate));
@@ -303,11 +303,11 @@ TEST_F(OwnerManagerTest, AlreadyHaveKeysSign) {
InjectKeys(manager.get());
MockSigner delegate(OwnerManager::SUCCESS, sig);
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager.get(),
&OwnerManager::Sign,
- ChromeThread::UI,
+ BrowserThread::UI,
data,
&delegate));
message_loop_.Run();
diff --git a/chrome/browser/chromeos/login/ownership_service.cc b/chrome/browser/chromeos/login/ownership_service.cc
index c2d8341..af96724 100644
--- a/chrome/browser/chromeos/login/ownership_service.cc
+++ b/chrome/browser/chromeos/login/ownership_service.cc
@@ -36,8 +36,8 @@ bool OwnershipService::StartLoadOwnerKeyAttempt() {
LOG(WARNING) << "Device not yet owned";
return false;
}
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager_.get(), &OwnerManager::LoadOwnerKey));
return true;
}
@@ -47,8 +47,8 @@ bool OwnershipService::StartTakeOwnershipAttempt(const std::string& owner) {
LOG(INFO) << "Device is already owned";
return false;
}
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager_.get(),
&OwnerManager::GenerateKeysAndExportPublic));
whitelister_ = SignedSettings::CreateWhitelistOp(owner, true, this);
@@ -62,11 +62,11 @@ void OwnershipService::StartSigningAttempt(const std::string& data,
d->OnKeyOpComplete(OwnerManager::KEY_UNAVAILABLE, std::vector<uint8>());
return;
}
- ChromeThread::ID thread_id;
- if (!ChromeThread::GetCurrentThreadIdentifier(&thread_id))
- thread_id = ChromeThread::UI;
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::ID thread_id;
+ if (!BrowserThread::GetCurrentThreadIdentifier(&thread_id))
+ thread_id = BrowserThread::UI;
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager_.get(),
&OwnerManager::Sign,
thread_id,
@@ -82,11 +82,11 @@ void OwnershipService::StartVerifyAttempt(const std::string& data,
d->OnKeyOpComplete(OwnerManager::KEY_UNAVAILABLE, std::vector<uint8>());
return;
}
- ChromeThread::ID thread_id;
- if (!ChromeThread::GetCurrentThreadIdentifier(&thread_id))
- thread_id = ChromeThread::UI;
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::ID thread_id;
+ if (!BrowserThread::GetCurrentThreadIdentifier(&thread_id))
+ thread_id = BrowserThread::UI;
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(manager_.get(),
&OwnerManager::Verify,
thread_id,
diff --git a/chrome/browser/chromeos/login/ownership_service_unittest.cc b/chrome/browser/chromeos/login/ownership_service_unittest.cc
index 9003d9d..5a622e5 100644
--- a/chrome/browser/chromeos/login/ownership_service_unittest.cc
+++ b/chrome/browser/chromeos/login/ownership_service_unittest.cc
@@ -34,8 +34,8 @@ class OwnershipServiceTest : public ::testing::Test {
public:
OwnershipServiceTest()
: message_loop_(MessageLoop::TYPE_UI),
- ui_thread_(ChromeThread::UI, &message_loop_),
- file_thread_(ChromeThread::FILE),
+ ui_thread_(BrowserThread::UI, &message_loop_),
+ file_thread_(BrowserThread::FILE),
mock_(new MockKeyUtils),
injector_(mock_) /* injector_ takes ownership of mock_ */ {
}
@@ -69,8 +69,8 @@ class OwnershipServiceTest : public ::testing::Test {
FilePath tmpfile_;
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread file_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread file_thread_;
std::vector<uint8> fake_public_key_;
scoped_ptr<RSAPrivateKey> fake_private_key_;
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index 1b0c36a..98732f5 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -628,8 +628,8 @@ void ScreenLocker::InfoBubbleClosing(InfoBubble* info_bubble,
void ScreenLocker::Authenticate(const string16& password) {
screen_lock_view_->SetEnabled(false);
screen_lock_view_->SetSignoutEnabled(false);
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(authenticator_.get(),
&Authenticator::AuthenticateToUnlock,
user_.email(),
diff --git a/chrome/browser/chromeos/login/signed_settings.cc b/chrome/browser/chromeos/login/signed_settings.cc
index 0798fe5..bcdb9fc 100644
--- a/chrome/browser/chromeos/login/signed_settings.cc
+++ b/chrome/browser/chromeos/login/signed_settings.cc
@@ -148,9 +148,9 @@ void CheckWhitelistOp::OnKeyOpComplete(
const OwnerManager::KeyOpCode return_code,
const std::vector<uint8>& payload) {
// Ensure we're on the UI thread, due to the need to send DBus traffic.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&CheckWhitelistOp::OnKeyOpComplete,
return_code, payload));
@@ -181,9 +181,9 @@ bool WhitelistOp::Execute() {
void WhitelistOp::OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
const std::vector<uint8>& payload) {
// Ensure we're on the UI thread, due to the need to send DBus traffic.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&WhitelistOp::OnKeyOpComplete,
return_code, payload));
@@ -235,9 +235,9 @@ bool StorePropertyOp::Execute() {
void StorePropertyOp::OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
const std::vector<uint8>& payload) {
// Ensure we're on the UI thread, due to the need to send DBus traffic.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&StorePropertyOp::OnKeyOpComplete,
return_code, payload));
@@ -290,9 +290,9 @@ bool RetrievePropertyOp::Execute() {
void RetrievePropertyOp::OnKeyOpComplete(
const OwnerManager::KeyOpCode return_code,
const std::vector<uint8>& payload) {
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&RetrievePropertyOp::OnKeyOpComplete,
return_code, payload));
diff --git a/chrome/browser/chromeos/login/signed_settings_helper.cc b/chrome/browser/chromeos/login/signed_settings_helper.cc
index 74f4727..5f0c80e 100644
--- a/chrome/browser/chromeos/login/signed_settings_helper.cc
+++ b/chrome/browser/chromeos/login/signed_settings_helper.cc
@@ -370,7 +370,7 @@ void SignedSettingsHelperImpl::StartRetrieveProperty(
void SignedSettingsHelperImpl::CancelCallback(
SignedSettingsHelper::Callback* callback) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
for (size_t i = 0; i < pending_contexts_.size(); ++i) {
if (pending_contexts_[i]->callback() == callback) {
@@ -380,7 +380,7 @@ void SignedSettingsHelperImpl::CancelCallback(
}
void SignedSettingsHelperImpl::AddOpContext(OpContext* context) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK(context);
pending_contexts_.push_back(context);
@@ -402,14 +402,14 @@ void SignedSettingsHelperImpl::OnOpCreated(OpContext* context) {
}
void SignedSettingsHelperImpl::OnOpStarted(OpContext* context) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (test_delegate_)
test_delegate_->OnOpStarted(context->op());
}
void SignedSettingsHelperImpl::OnOpCompleted(OpContext* context) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(pending_contexts_.front() == context);
pending_contexts_.erase(pending_contexts_.begin());
diff --git a/chrome/browser/chromeos/login/signed_settings_helper_unittest.cc b/chrome/browser/chromeos/login/signed_settings_helper_unittest.cc
index f49d1b0..7f3f26b 100644
--- a/chrome/browser/chromeos/login/signed_settings_helper_unittest.cc
+++ b/chrome/browser/chromeos/login/signed_settings_helper_unittest.cc
@@ -39,8 +39,8 @@ class SignedSettingsHelperTest : public ::testing::Test,
fake_prop_("prop_name"),
fake_value_("stub"),
message_loop_(MessageLoop::TYPE_UI),
- ui_thread_(ChromeThread::UI, &message_loop_),
- file_thread_(ChromeThread::FILE),
+ ui_thread_(BrowserThread::UI, &message_loop_),
+ file_thread_(BrowserThread::FILE),
pending_ops_(0) {
}
@@ -75,8 +75,8 @@ class SignedSettingsHelperTest : public ::testing::Test,
MockOwnershipService m_;
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread file_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread file_thread_;
int pending_ops_;
};
diff --git a/chrome/browser/chromeos/login/signed_settings_unittest.cc b/chrome/browser/chromeos/login/signed_settings_unittest.cc
index fce9ea2..15bdaec 100644
--- a/chrome/browser/chromeos/login/signed_settings_unittest.cc
+++ b/chrome/browser/chromeos/login/signed_settings_unittest.cc
@@ -69,8 +69,8 @@ class SignedSettingsTest : public ::testing::Test {
fake_prop_("prop_name"),
fake_value_("stub"),
message_loop_(MessageLoop::TYPE_UI),
- ui_thread_(ChromeThread::UI, &message_loop_),
- file_thread_(ChromeThread::FILE),
+ ui_thread_(BrowserThread::UI, &message_loop_),
+ file_thread_(BrowserThread::FILE),
mock_(new MockKeyUtils),
injector_(mock_) /* injector_ takes ownership of mock_ */ {
}
@@ -155,8 +155,8 @@ class SignedSettingsTest : public ::testing::Test {
FilePath tmpfile_;
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread file_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread file_thread_;
std::vector<uint8> fake_public_key_;
scoped_ptr<RSAPrivateKey> fake_private_key_;
diff --git a/chrome/browser/chromeos/login/user_image_downloader.cc b/chrome/browser/chromeos/login/user_image_downloader.cc
index 3deea71..bb8304b 100644
--- a/chrome/browser/chromeos/login/user_image_downloader.cc
+++ b/chrome/browser/chromeos/login/user_image_downloader.cc
@@ -41,7 +41,7 @@ UserImageDownloader::UserImageDownloader(const std::string& username,
const std::string& auth_token)
: username_(username),
auth_token_(auth_token) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (auth_token_.empty())
return;
@@ -64,7 +64,7 @@ void UserImageDownloader::OnURLFetchComplete(const URLFetcher* source,
int response_code,
const ResponseCookies& cookies,
const std::string& data) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (response_code != 200) {
LOG(ERROR) << "Response code is " << response_code;
LOG(ERROR) << "Url is " << url.spec();
diff --git a/chrome/browser/chromeos/login/user_image_loader.cc b/chrome/browser/chromeos/login/user_image_loader.cc
index d40696d..a78fae4 100644
--- a/chrome/browser/chromeos/login/user_image_loader.cc
+++ b/chrome/browser/chromeos/login/user_image_loader.cc
@@ -25,12 +25,12 @@ void UserImageLoader::Start(const std::string& username,
const std::string& filename) {
target_message_loop_ = MessageLoop::current();
- ChromeThread::PostTask(ChromeThread::FILE,
- FROM_HERE,
- NewRunnableMethod(this,
- &UserImageLoader::LoadImage,
- username,
- filename));
+ BrowserThread::PostTask(BrowserThread::FILE,
+ FROM_HERE,
+ NewRunnableMethod(this,
+ &UserImageLoader::LoadImage,
+ username,
+ filename));
}
void UserImageLoader::LoadImage(const std::string& username,
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 2a8afdd..738a4c2 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -173,8 +173,8 @@ void DeleteWizardControllerAndLaunchBrowser(WizardController* controller) {
delete controller;
// Launch browser after controller is deleted and its windows are closed.
chromeos::LoginUtils::Get()->EnableBrowserLaunch(true);
- ChromeThread::PostTask(
- ChromeThread::UI,
+ BrowserThread::PostTask(
+ BrowserThread::UI,
FROM_HERE,
NewRunnableFunction(&chromeos::LoginUtils::DoBrowserLaunch,
ProfileManager::GetDefaultProfile()));
@@ -579,8 +579,8 @@ void WizardController::OnUserImageSelected() {
// We're on the stack, so don't try and delete us now.
// We should launch browser only after we delete the controller and close
// its windows.
- ChromeThread::PostTask(
- ChromeThread::UI,
+ BrowserThread::PostTask(
+ BrowserThread::UI,
FROM_HERE,
NewRunnableFunction(&DeleteWizardControllerAndLaunchBrowser,
this));
diff --git a/chrome/browser/chromeos/network_state_notifier.cc b/chrome/browser/chromeos/network_state_notifier.cc
index 52c96b4..917ee70 100644
--- a/chrome/browser/chromeos/network_state_notifier.cc
+++ b/chrome/browser/chromeos/network_state_notifier.cc
@@ -23,7 +23,7 @@ NetworkStateNotifier* NetworkStateNotifier::Get() {
// static
TimeDelta NetworkStateNotifier::GetOfflineDuration() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// TODO(oshima): make this instance method so that
// we can mock this for ui_tests.
// http://crbug.com/4825 .
@@ -40,8 +40,8 @@ void NetworkStateNotifier::NetworkChanged(NetworkLibrary* cros) {
DCHECK(CrosLibrary::Get()->EnsureLoaded());
// Update the state 2 seconds later using UI thread.
// See http://crosbug.com/4558
- ChromeThread::PostDelayedTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostDelayedTask(
+ BrowserThread::UI, FROM_HERE,
task_factory_.NewRunnableMethod(
&NetworkStateNotifier::UpdateNetworkState,
RetrieveState()),
diff --git a/chrome/browser/chromeos/network_state_notifier_browsertest.cc b/chrome/browser/chromeos/network_state_notifier_browsertest.cc
index 4833d48..8db7f63 100644
--- a/chrome/browser/chromeos/network_state_notifier_browsertest.cc
+++ b/chrome/browser/chromeos/network_state_notifier_browsertest.cc
@@ -43,7 +43,7 @@ class NetworkStateNotifierTest : public CrosInProcessBrowserTest,
virtual void Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- EXPECT_TRUE(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
EXPECT_TRUE(NotificationType::NETWORK_STATE_CHANGED == type);
chromeos::NetworkStateDetails* state_details =
Details<chromeos::NetworkStateDetails>(details).ptr();
diff --git a/chrome/browser/chromeos/notifications/desktop_notifications_unittest.cc b/chrome/browser/chromeos/notifications/desktop_notifications_unittest.cc
index 6824f97..8c0a4be 100644
--- a/chrome/browser/chromeos/notifications/desktop_notifications_unittest.cc
+++ b/chrome/browser/chromeos/notifications/desktop_notifications_unittest.cc
@@ -77,7 +77,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/chromeos/notifications/desktop_notifications_unittest.h b/chrome/browser/chromeos/notifications/desktop_notifications_unittest.h
index fedd4f0..85c9ce8 100644
--- a/chrome/browser/chromeos/notifications/desktop_notifications_unittest.h
+++ b/chrome/browser/chromeos/notifications/desktop_notifications_unittest.h
@@ -91,7 +91,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/chromeos/offline/offline_load_page.cc b/chrome/browser/chromeos/offline/offline_load_page.cc
index ece8fb6..b228d50 100644
--- a/chrome/browser/chromeos/offline/offline_load_page.cc
+++ b/chrome/browser/chromeos/offline/offline_load_page.cc
@@ -40,7 +40,7 @@ namespace chromeos {
// static
void OfflineLoadPage::Show(int process_host_id, int render_view_id,
const GURL& url, Delegate* delegate) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (NetworkStateNotifier::is_connected()) {
// Check again in UI thread and proceed if it's connected.
delegate->OnBlockingPageComplete(true);
diff --git a/chrome/browser/chromeos/offline/offline_load_page_unittest.cc b/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
index 9f5fcfb..6ab8c15 100644
--- a/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
+++ b/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
@@ -46,8 +46,8 @@ class OfflineLoadPageTest : public RenderViewHostTestHarness,
};
OfflineLoadPageTest()
- : 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() {
@@ -83,8 +83,8 @@ class OfflineLoadPageTest : public RenderViewHostTestHarness,
private:
UserResponse user_response_;
- ChromeThread ui_thread_;
- ChromeThread io_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread io_thread_;
};
diff --git a/chrome/browser/chromeos/offline/offline_load_service.cc b/chrome/browser/chromeos/offline/offline_load_service.cc
index a000357..3c6efa6 100644
--- a/chrome/browser/chromeos/offline/offline_load_service.cc
+++ b/chrome/browser/chromeos/offline/offline_load_service.cc
@@ -42,12 +42,12 @@ OfflineLoadService* OfflineLoadService::Get() {
void OfflineLoadService::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (type.value == NotificationType::TAB_CLOSED) {
registrar_.Remove(this, NotificationType::TAB_CLOSED, source);
NavigationController* tab = Source<NavigationController>(source).ptr();
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this,
&OfflineLoadService::RemoveTabContents,
tab->tab_contents()));
@@ -57,7 +57,7 @@ void OfflineLoadService::Observe(NotificationType type,
bool OfflineLoadService::ShouldProceed(int process_host_id,
int render_view_id,
const GURL& url) const {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
TabContents* tab_contents = tab_util::GetTabContentsByID(
process_host_id, render_view_id);
DCHECK(tab_contents);
@@ -70,7 +70,7 @@ bool OfflineLoadService::ShouldProceed(int process_host_id,
void OfflineLoadService::Proceeded(int process_host_id,
int render_view_id,
const GURL& url) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
TabContents* tab_contents = tab_util::GetTabContentsByID(
process_host_id, render_view_id);
DCHECK(tab_contents);
@@ -78,8 +78,8 @@ void OfflineLoadService::Proceeded(int process_host_id,
DLOG(INFO) << "Proceeded: url=" << url.spec()
<< ", tab_contents=" << tab_contents;
tabs_.insert(tab_contents);
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&OfflineLoadService::RegisterNotification,
&tab_contents->controller()));
@@ -89,13 +89,13 @@ void OfflineLoadService::Proceeded(int process_host_id,
}
void OfflineLoadService::RemoveTabContents(TabContents* tab_contents) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
tabs_.erase(tabs_.find(tab_contents));
}
void OfflineLoadService::RegisterNotification(
NavigationController* navigation_controller) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
registrar_.Add(this, NotificationType::TAB_CLOSED,
Source<NavigationController>(
navigation_controller));
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc
index a7fa754..7142d89 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl.cc
@@ -566,7 +566,7 @@ void ProxyConfigServiceImpl::OnUISetProxyConfig(bool persist_to_device) {
// |cached_config_|.
Task* task = NewRunnableMethod(this,
&ProxyConfigServiceImpl::IOSetProxyConfig, reference_config_);
- if (!ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, task)) {
+ if (!BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, task)) {
LOG(INFO) << "Couldn't post task to IO thread to set new proxy config";
delete task;
}
@@ -582,11 +582,11 @@ void ProxyConfigServiceImpl::OnUISetProxyConfig(bool persist_to_device) {
}
void ProxyConfigServiceImpl::CheckCurrentlyOnIOThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
void ProxyConfigServiceImpl::CheckCurrentlyOnUIThread() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
void ProxyConfigServiceImpl::IOSetProxyConfig(const ProxyConfig& new_config) {
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.h b/chrome/browser/chromeos/proxy_config_service_impl.h
index e8e184d..5e562d2 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.h
+++ b/chrome/browser/chromeos/proxy_config_service_impl.h
@@ -212,10 +212,10 @@ class ProxyConfigServiceImpl
// Posted from UI thread to IO thread to carry the new config information.
void IOSetProxyConfig(const ProxyConfig& new_config);
- // Checks that method is called on ChromeThread::IO thread.
+ // Checks that method is called on BrowserThread::IO thread.
void CheckCurrentlyOnIOThread();
- // Checks that method is called on ChromeThread::UI thread.
+ // Checks that method is called on BrowserThread::UI thread.
void CheckCurrentlyOnUIThread();
// Data members.
diff --git a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
index c68e42e..f827fee 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
@@ -222,8 +222,8 @@ const struct {
class ProxyConfigServiceImplTest : public PlatformTest {
protected:
ProxyConfigServiceImplTest()
- : ui_thread_(ChromeThread::UI, &message_loop_),
- io_thread_(ChromeThread::IO, &message_loop_) {
+ : ui_thread_(BrowserThread::UI, &message_loop_),
+ io_thread_(BrowserThread::IO, &message_loop_) {
chromeos::CrosLibrary::Get()->GetTestApi()->SetUseStubImpl();
}
@@ -311,8 +311,8 @@ class ProxyConfigServiceImplTest : public PlatformTest {
private:
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread io_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread io_thread_;
scoped_refptr<ProxyConfigServiceImpl> config_service_;
};