summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 11:55:26 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 11:55:26 +0000
commit0c7d74fa3286ec04c080a2ffdc5d015c10fe7c37 (patch)
treeb6803b94d704e6986642e36da11532eecffceb9d /chrome/browser
parenta2e6df2c24bd6ecfcd95a0cda680a27a3403bec7 (diff)
downloadchromium_src-0c7d74fa3286ec04c080a2ffdc5d015c10fe7c37.zip
chromium_src-0c7d74fa3286ec04c080a2ffdc5d015c10fe7c37.tar.gz
chromium_src-0c7d74fa3286ec04c080a2ffdc5d015c10fe7c37.tar.bz2
Rename ChromeThread to BrowserThread Part16:
- Rename entries starting from shell_integration.cc. More 30 files covered. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3708001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/shell_integration.cc24
-rw-r--r--chrome/browser/shell_integration_linux.cc6
-rw-r--r--chrome/browser/shell_integration_unittest.cc2
-rw-r--r--chrome/browser/shell_integration_win.cc6
-rw-r--r--chrome/browser/spellcheck_host.cc36
-rw-r--r--chrome/browser/spellcheck_host.h2
-rw-r--r--chrome/browser/transport_security_persister.cc18
-rw-r--r--chrome/browser/ui_thread_helpers.h2
-rw-r--r--chrome/browser/ui_thread_helpers_linux.cc2
-rw-r--r--chrome/browser/ui_thread_helpers_win.cc2
-rw-r--r--chrome/browser/upgrade_detector.cc22
-rw-r--r--chrome/browser/user_style_sheet_watcher.cc10
-rw-r--r--chrome/browser/user_style_sheet_watcher.h2
-rw-r--r--chrome/browser/user_style_sheet_watcher_unittest.cc4
-rw-r--r--chrome/browser/utility_process_host.cc6
-rw-r--r--chrome/browser/utility_process_host.h4
-rw-r--r--chrome/browser/visitedlink_master.cc16
-rw-r--r--chrome/browser/visitedlink_unittest.cc12
18 files changed, 88 insertions, 88 deletions
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index c51ed25..445153d 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -75,16 +75,16 @@ ShellIntegration::DefaultBrowserWorker::DefaultBrowserWorker(
void ShellIntegration::DefaultBrowserWorker::StartCheckDefaultBrowser() {
observer_->SetDefaultBrowserUIState(STATE_PROCESSING);
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(
this, &DefaultBrowserWorker::ExecuteCheckDefaultBrowser));
}
void ShellIntegration::DefaultBrowserWorker::StartSetAsDefaultBrowser() {
observer_->SetDefaultBrowserUIState(STATE_PROCESSING);
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(
this, &DefaultBrowserWorker::ExecuteSetAsDefaultBrowser));
}
@@ -99,31 +99,31 @@ void ShellIntegration::DefaultBrowserWorker::ObserverDestroyed() {
// DefaultBrowserWorker, private:
void ShellIntegration::DefaultBrowserWorker::ExecuteCheckDefaultBrowser() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DefaultBrowserState state = ShellIntegration::IsDefaultBrowser();
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
this, &DefaultBrowserWorker::CompleteCheckDefaultBrowser, state));
}
void ShellIntegration::DefaultBrowserWorker::CompleteCheckDefaultBrowser(
DefaultBrowserState state) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
UpdateUI(state);
}
void ShellIntegration::DefaultBrowserWorker::ExecuteSetAsDefaultBrowser() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
ShellIntegration::SetAsDefaultBrowser();
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
this, &DefaultBrowserWorker::CompleteSetAsDefaultBrowser));
}
void ShellIntegration::DefaultBrowserWorker::CompleteSetAsDefaultBrowser() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (observer_) {
// Set as default completed, check again to make sure it stuck...
StartCheckDefaultBrowser();
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index 427d4ad..cc4aeab 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -213,7 +213,7 @@ bool ShellIntegration::SetAsDefaultBrowser() {
// static
ShellIntegration::DefaultBrowserState ShellIntegration::IsDefaultBrowser() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<base::Environment> env(base::Environment::Create());
@@ -249,7 +249,7 @@ bool ShellIntegration::IsFirefoxDefaultBrowser() {
// static
bool ShellIntegration::GetDesktopShortcutTemplate(
base::Environment* env, std::string* output) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
std::vector<FilePath> search_paths;
@@ -370,7 +370,7 @@ void ShellIntegration::CreateDesktopShortcut(
const ShortcutInfo& shortcut_info, const std::string& shortcut_template) {
// TODO(phajdan.jr): Report errors from this function, possibly as infobars.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
FilePath shortcut_filename = GetDesktopShortcutFilename(shortcut_info.url);
if (shortcut_filename.empty())
diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc
index 9ea7021..e8087f6 100644
--- a/chrome/browser/shell_integration_unittest.cc
+++ b/chrome/browser/shell_integration_unittest.cc
@@ -77,7 +77,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) {
const char kTestData2[] = "a different testing string";
MessageLoop message_loop;
- ChromeThread file_thread(ChromeThread::FILE, &message_loop);
+ BrowserThread file_thread(BrowserThread::FILE, &message_loop);
{
ScopedTempDir temp_dir;
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 46c05a9..a1a8e98 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -96,7 +96,7 @@ class MigrateChromiumShortcutsTask : public Task {
void MigrateChromiumShortcutsTask::Run() {
// This should run on the file thread.
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
MigrateWin7Shortcuts();
}
@@ -410,6 +410,6 @@ void ShellIntegration::MigrateChromiumShortcuts() {
if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7)
return;
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE, new MigrateChromiumShortcutsTask());
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE, new MigrateChromiumShortcutsTask());
}
diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc
index ceead6b..2d4bef545 100644
--- a/chrome/browser/spellcheck_host.cc
+++ b/chrome/browser/spellcheck_host.cc
@@ -53,7 +53,7 @@ SpellCheckHost::SpellCheckHost(SpellCheckHostObserver* observer,
use_platform_spellchecker_(false),
request_context_getter_(request_context_getter) {
DCHECK(observer_);
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
FilePath personal_file_directory;
PathService::Get(chrome::DIR_USER_DATA, &personal_file_directory);
@@ -79,12 +79,12 @@ void SpellCheckHost::Initialize() {
return;
}
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this, &SpellCheckHost::InitializeDictionaryLocation));
}
void SpellCheckHost::UnsetObserver() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
observer_ = NULL;
request_context_getter_ = NULL;
@@ -92,10 +92,10 @@ void SpellCheckHost::UnsetObserver() {
}
void SpellCheckHost::AddWord(const std::string& word) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
custom_words_.push_back(word);
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this,
&SpellCheckHost::WriteWordToCustomDictionary, word));
NotificationService::current()->Notify(
@@ -146,7 +146,7 @@ int SpellCheckHost::GetSpellCheckLanguages(
}
void SpellCheckHost::InitializeDictionaryLocation() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
#if defined(OS_WIN)
// Check if the dictionary exists in the fallback location. If so, use it
@@ -162,7 +162,7 @@ void SpellCheckHost::InitializeDictionaryLocation() {
}
void SpellCheckHost::InitializeInternal() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (!observer_)
return;
@@ -177,7 +177,7 @@ void SpellCheckHost::InitializeInternal() {
request_context_getter_) {
// We download from the ui thread because we need to know that
// |request_context_getter_| is still valid before initiating the download.
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &SpellCheckHost::DownloadDictionary));
return;
}
@@ -194,27 +194,27 @@ void SpellCheckHost::InitializeInternal() {
custom_words_.push_back(list_of_words[i]);
}
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&SpellCheckHost::InformObserverOfInitialization));
}
void SpellCheckHost::InitializeOnFileThread() {
- DCHECK(!ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::FILE));
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this, &SpellCheckHost::Initialize));
}
void SpellCheckHost::InformObserverOfInitialization() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (observer_)
observer_->SpellCheckHostInitialized();
}
void SpellCheckHost::DownloadDictionary() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!request_context_getter_) {
InitializeOnFileThread();
@@ -235,7 +235,7 @@ void SpellCheckHost::DownloadDictionary() {
}
void SpellCheckHost::WriteWordToCustomDictionary(const std::string& word) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Stored in UTF-8.
std::string word_to_add(word + "\n");
@@ -252,7 +252,7 @@ void SpellCheckHost::OnURLFetchComplete(const URLFetcher* source,
const ResponseCookies& cookies,
const std::string& data) {
DCHECK(source);
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
fetcher_.reset();
if ((response_code / 100) != 2) {
@@ -273,12 +273,12 @@ void SpellCheckHost::OnURLFetchComplete(const URLFetcher* source,
}
data_ = data;
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this, &SpellCheckHost::SaveDictionaryData));
}
void SpellCheckHost::SaveDictionaryData() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
size_t bytes_written =
file_util::WriteFile(bdict_file_path_, data_.data(), data_.length());
@@ -299,7 +299,7 @@ void SpellCheckHost::SaveDictionaryData() {
file_util::Delete(bdict_file_path_, false);
// To avoid trying to load a partially saved dictionary, shortcut the
// Initialize() call.
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&SpellCheckHost::InformObserverOfInitialization));
return;
diff --git a/chrome/browser/spellcheck_host.h b/chrome/browser/spellcheck_host.h
index 452ea6a..de25a71 100644
--- a/chrome/browser/spellcheck_host.h
+++ b/chrome/browser/spellcheck_host.h
@@ -21,7 +21,7 @@ class SpellCheckHostObserver;
class URLRequestContextGetter;
class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost,
- ChromeThread::DeleteOnFileThread>,
+ BrowserThread::DeleteOnFileThread>,
public URLFetcher::Delegate {
public:
SpellCheckHost(SpellCheckHostObserver* observer,
diff --git a/chrome/browser/transport_security_persister.cc b/chrome/browser/transport_security_persister.cc
index 5ffaf80..7e80f37 100644
--- a/chrome/browser/transport_security_persister.cc
+++ b/chrome/browser/transport_security_persister.cc
@@ -22,7 +22,7 @@ TransportSecurityPersister::~TransportSecurityPersister() {
void TransportSecurityPersister::Initialize(
net::TransportSecurityState* state, const FilePath& profile_path) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
transport_security_state_ = state;
state_file_ =
profile_path.Append(FILE_PATH_LITERAL("TransportSecurity"));
@@ -30,24 +30,24 @@ void TransportSecurityPersister::Initialize(
Task* task = NewRunnableMethod(this,
&TransportSecurityPersister::Load);
- ChromeThread::PostDelayedTask(ChromeThread::FILE, FROM_HERE, task, 1000);
+ BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE, task, 1000);
}
void TransportSecurityPersister::Load() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
std::string state;
if (!file_util::ReadFileToString(state_file_, &state))
return;
- ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableMethod(this,
&TransportSecurityPersister::CompleteLoad,
state));
}
void TransportSecurityPersister::CompleteLoad(const std::string& state) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
bool dirty = false;
if (!transport_security_state_->Deserialise(state, &dirty)) {
@@ -60,7 +60,7 @@ void TransportSecurityPersister::CompleteLoad(const std::string& state) {
void TransportSecurityPersister::StateIsDirty(
net::TransportSecurityState* state) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(state == transport_security_state_);
if (!save_coalescer_.empty())
@@ -72,20 +72,20 @@ void TransportSecurityPersister::StateIsDirty(
}
void TransportSecurityPersister::Save() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
std::string state;
if (!transport_security_state_->Serialise(&state))
return;
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this,
&TransportSecurityPersister::CompleteSave,
state));
}
void TransportSecurityPersister::CompleteSave(const std::string& state) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
file_util::WriteFile(state_file_, state.data(), state.size());
}
diff --git a/chrome/browser/ui_thread_helpers.h b/chrome/browser/ui_thread_helpers.h
index 90e2c4e..f748469 100644
--- a/chrome/browser/ui_thread_helpers.h
+++ b/chrome/browser/ui_thread_helpers.h
@@ -14,7 +14,7 @@ class Location;
namespace ui_thread_helpers {
-// This can be used in place of ChromeThread::PostTask(ChromeThread::UI, ...).
+// This can be used in place of BrowserThread::PostTask(BrowserThread::UI, ...).
// The purpose of this function is to be able to execute Chrome work alongside
// native work when a message loop is running nested or, in the case of Mac,
// in a different mode. Currently this is used for updating the HostZoomMap
diff --git a/chrome/browser/ui_thread_helpers_linux.cc b/chrome/browser/ui_thread_helpers_linux.cc
index 41721c3..9ee9822 100644
--- a/chrome/browser/ui_thread_helpers_linux.cc
+++ b/chrome/browser/ui_thread_helpers_linux.cc
@@ -12,7 +12,7 @@ namespace ui_thread_helpers {
bool PostTaskWhileRunningMenu(const tracked_objects::Location& from_here,
Task* task) {
// TODO(rsesek): Implementing Linux behavior may fix http://crbug.com/48240
- return ChromeThread::PostTask(ChromeThread::UI, from_here, task);
+ return BrowserThread::PostTask(BrowserThread::UI, from_here, task);
}
} // namespace ui_thread_helpers
diff --git a/chrome/browser/ui_thread_helpers_win.cc b/chrome/browser/ui_thread_helpers_win.cc
index 170ecdb..b7d9b3ba 100644
--- a/chrome/browser/ui_thread_helpers_win.cc
+++ b/chrome/browser/ui_thread_helpers_win.cc
@@ -11,7 +11,7 @@ namespace ui_thread_helpers {
bool PostTaskWhileRunningMenu(const tracked_objects::Location& from_here,
Task* task) {
- return ChromeThread::PostTask(ChromeThread::UI, from_here, task);
+ return BrowserThread::PostTask(BrowserThread::UI, from_here, task);
}
} // namespace ui_thread_helpers
diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc
index f19a6f6..d09896a 100644
--- a/chrome/browser/upgrade_detector.cc
+++ b/chrome/browser/upgrade_detector.cc
@@ -63,11 +63,11 @@ const int kNotifyUserAfterMs = 0;
// because we don't want to block the UI thread while launching a background
// process and reading its output; on the Mac, checking for an upgrade
// requires reading a file.
-const ChromeThread::ID kDetectUpgradeTaskID =
+const BrowserThread::ID kDetectUpgradeTaskID =
#if defined(OS_POSIX)
- ChromeThread::FILE;
+ BrowserThread::FILE;
#else
- ChromeThread::UI;
+ BrowserThread::UI;
#endif
// This task checks the currently running version of Chrome against the
@@ -82,13 +82,13 @@ class DetectUpgradeTask : public Task {
virtual ~DetectUpgradeTask() {
if (upgrade_detected_task_) {
// This has to get deleted on the same thread it was created.
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
- new DeleteTask<Task>(upgrade_detected_task_));
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ new DeleteTask<Task>(upgrade_detected_task_));
}
}
virtual void Run() {
- DCHECK(ChromeThread::CurrentlyOn(kDetectUpgradeTaskID));
+ DCHECK(BrowserThread::CurrentlyOn(kDetectUpgradeTaskID));
using installer::Version;
scoped_ptr<Version> installed_version;
@@ -137,8 +137,8 @@ class DetectUpgradeTask : public Task {
// restart in this case as well. See http://crbug.com/46547
if (!installed_version.get() ||
installed_version->IsHigherThan(running_version.get())) {
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
- upgrade_detected_task_);
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ upgrade_detected_task_);
upgrade_detected_task_ = NULL;
}
}
@@ -179,12 +179,12 @@ void UpgradeDetector::CheckForUpgrade() {
method_factory_.RevokeAll();
Task* callback_task =
method_factory_.NewRunnableMethod(&UpgradeDetector::UpgradeDetected);
- ChromeThread::PostTask(kDetectUpgradeTaskID, FROM_HERE,
- new DetectUpgradeTask(callback_task));
+ BrowserThread::PostTask(kDetectUpgradeTaskID, FROM_HERE,
+ new DetectUpgradeTask(callback_task));
}
void UpgradeDetector::UpgradeDetected() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Stop the recurring timer (that is checking for changes).
detect_upgrade_timer_.Stop();
diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc
index a8789fd..458f0d5 100644
--- a/chrome/browser/user_style_sheet_watcher.cc
+++ b/chrome/browser/user_style_sheet_watcher.cc
@@ -86,7 +86,7 @@ void UserStyleSheetLoader::OnFilePathChanged(const FilePath& path) {
}
void UserStyleSheetLoader::LoadStyleSheet(const FilePath& style_sheet_file) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// We keep the user style sheet in a subdir so we can watch for changes
// to the file.
FilePath style_sheet_dir = style_sheet_file.DirName();
@@ -110,13 +110,13 @@ void UserStyleSheetLoader::LoadStyleSheet(const FilePath& style_sheet_file) {
style_sheet_url = GURL(kDataUrlPrefix + css_base64);
}
}
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &UserStyleSheetLoader::SetStyleSheet,
style_sheet_url));
}
void UserStyleSheetLoader::SetStyleSheet(const GURL& url) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
has_loaded_ = true;
user_style_sheet_ = url;
@@ -138,8 +138,8 @@ UserStyleSheetWatcher::~UserStyleSheetWatcher() {
void UserStyleSheetWatcher::Init() {
// Make sure we run on the file thread.
- if (!ChromeThread::CurrentlyOn(ChromeThread::FILE)) {
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this, &UserStyleSheetWatcher::Init));
return;
}
diff --git a/chrome/browser/user_style_sheet_watcher.h b/chrome/browser/user_style_sheet_watcher.h
index a322837..82f8c43 100644
--- a/chrome/browser/user_style_sheet_watcher.h
+++ b/chrome/browser/user_style_sheet_watcher.h
@@ -21,7 +21,7 @@ class UserStyleSheetLoader;
// whenever the file changes.
class UserStyleSheetWatcher
: public base::RefCountedThreadSafe<UserStyleSheetWatcher,
- ChromeThread::DeleteOnUIThread>,
+ BrowserThread::DeleteOnUIThread>,
public NotificationObserver {
public:
explicit UserStyleSheetWatcher(const FilePath& profile_path);
diff --git a/chrome/browser/user_style_sheet_watcher_unittest.cc b/chrome/browser/user_style_sheet_watcher_unittest.cc
index 78c31f2..0cc008a 100644
--- a/chrome/browser/user_style_sheet_watcher_unittest.cc
+++ b/chrome/browser/user_style_sheet_watcher_unittest.cc
@@ -26,8 +26,8 @@ TEST(UserStyleSheetWatcherTest, StyleLoad) {
scoped_refptr<UserStyleSheetWatcher> style_sheet_watcher =
new UserStyleSheetWatcher(dir.path());
MessageLoop loop;
- ChromeThread ui_thread(ChromeThread::UI, &loop);
- ChromeThread file_thread(ChromeThread::FILE, &loop);
+ BrowserThread ui_thread(BrowserThread::UI, &loop);
+ BrowserThread file_thread(BrowserThread::FILE, &loop);
style_sheet_watcher->Init();
loop.RunAllPending();
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc
index 74afd4d..22495f8 100644
--- a/chrome/browser/utility_process_host.cc
+++ b/chrome/browser/utility_process_host.cc
@@ -18,7 +18,7 @@
UtilityProcessHost::UtilityProcessHost(ResourceDispatcherHost* rdh,
Client* client,
- ChromeThread::ID client_thread_id)
+ BrowserThread::ID client_thread_id)
: BrowserChildProcessHost(UTILITY_PROCESS, rdh),
client_(client),
client_thread_id_(client_thread_id),
@@ -154,13 +154,13 @@ bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) {
}
void UtilityProcessHost::OnMessageReceived(const IPC::Message& message) {
- ChromeThread::PostTask(
+ BrowserThread::PostTask(
client_thread_id_, FROM_HERE,
NewRunnableMethod(client_.get(), &Client::OnMessageReceived, message));
}
void UtilityProcessHost::OnProcessCrashed() {
- ChromeThread::PostTask(
+ BrowserThread::PostTask(
client_thread_id_, FROM_HERE,
NewRunnableMethod(client_.get(), &Client::OnProcessCrashed));
}
diff --git a/chrome/browser/utility_process_host.h b/chrome/browser/utility_process_host.h
index 8aadf35..cbe3aca 100644
--- a/chrome/browser/utility_process_host.h
+++ b/chrome/browser/utility_process_host.h
@@ -104,7 +104,7 @@ class UtilityProcessHost : public BrowserChildProcessHost {
};
UtilityProcessHost(ResourceDispatcherHost* rdh, Client* client,
- ChromeThread::ID client_thread_id);
+ BrowserThread::ID client_thread_id);
virtual ~UtilityProcessHost();
// Start a process to unpack the extension at the given path. The process
@@ -163,7 +163,7 @@ class UtilityProcessHost : public BrowserChildProcessHost {
// A pointer to our client interface, who will be informed of progress.
scoped_refptr<Client> client_;
- ChromeThread::ID client_thread_id_;
+ BrowserThread::ID client_thread_id_;
// True when running in batch mode, i.e., StartBatchMode() has been called
// and the utility process will run until EndBatchMode().
bool is_batch_mode_;
diff --git a/chrome/browser/visitedlink_master.cc b/chrome/browser/visitedlink_master.cc
index 6eec909..52509e4 100644
--- a/chrome/browser/visitedlink_master.cc
+++ b/chrome/browser/visitedlink_master.cc
@@ -529,8 +529,8 @@ bool VisitedLinkMaster::WriteFullTable() {
hash_table_, table_length_ * sizeof(Fingerprint));
// The hash table may have shrunk, so make sure this is the end.
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE, new AsyncSetEndOfFile(file_));
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE, new AsyncSetEndOfFile(file_));
return true;
}
@@ -728,8 +728,8 @@ void VisitedLinkMaster::FreeURLTable() {
if (!file_)
return;
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE, new AsyncCloseHandle(file_));
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE, new AsyncCloseHandle(file_));
}
bool VisitedLinkMaster::ResizeTableIfNecessary() {
@@ -909,8 +909,8 @@ void VisitedLinkMaster::WriteToFile(FILE* file,
posted_asynchronous_operation_ = true;
#endif
- ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
new AsyncWriter(file, offset, data, data_size));
}
@@ -986,8 +986,8 @@ void VisitedLinkMaster::TableBuilder::OnComplete(bool success) {
// Marshal to the main thread to notify the VisitedLinkMaster that the
// rebuild is complete.
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &TableBuilder::OnCompleteMainThread));
}
diff --git a/chrome/browser/visitedlink_unittest.cc b/chrome/browser/visitedlink_unittest.cc
index f07e80f..d5eece3 100644
--- a/chrome/browser/visitedlink_unittest.cc
+++ b/chrome/browser/visitedlink_unittest.cc
@@ -74,8 +74,8 @@ class TrackingVisitedLinkEventListener : public VisitedLinkMaster::Listener {
class VisitedLinkTest : public testing::Test {
protected:
VisitedLinkTest()
- : ui_thread_(ChromeThread::UI, &message_loop_),
- file_thread_(ChromeThread::FILE, &message_loop_) {}
+ : ui_thread_(BrowserThread::UI, &message_loop_),
+ file_thread_(BrowserThread::FILE, &message_loop_) {}
// Initialize the history system. This should be called before InitVisited().
bool InitHistory() {
history_service_ = new HistoryService;
@@ -177,8 +177,8 @@ class VisitedLinkTest : public testing::Test {
ScopedTempDir temp_dir_;
MessageLoop message_loop_;
- ChromeThread ui_thread_;
- ChromeThread file_thread_;
+ BrowserThread ui_thread_;
+ BrowserThread file_thread_;
// Filenames for the services;
FilePath history_dir_;
@@ -582,7 +582,7 @@ class VisitedLinkEventsTest : public RenderViewHostTestHarness {
public:
VisitedLinkEventsTest()
: RenderViewHostTestHarness(),
- file_thread_(ChromeThread::FILE, &message_loop_) {}
+ file_thread_(BrowserThread::FILE, &message_loop_) {}
~VisitedLinkEventsTest() {
// This ends up using the file thread to schedule the delete.
profile_.reset();
@@ -613,7 +613,7 @@ class VisitedLinkEventsTest : public RenderViewHostTestHarness {
private:
scoped_ptr<VisitedLinkEventListener> event_listener_;
- ChromeThread file_thread_;
+ BrowserThread file_thread_;
DISALLOW_COPY_AND_ASSIGN(VisitedLinkEventsTest);
};