summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/chromeos
diff options
context:
space:
mode:
authorjyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-02 06:41:18 +0000
committerjyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-02 06:41:18 +0000
commita4a46be32d27e4961512f35b85f9b25ced8bee29 (patch)
tree356805526e43d60654b529ed044c17a332ff52f8 /chrome/browser/ui/webui/chromeos
parent66e8fe6e3b21d65778b3d600fdda5e07b2b66727 (diff)
downloadchromium_src-a4a46be32d27e4961512f35b85f9b25ced8bee29.zip
chromium_src-a4a46be32d27e4961512f35b85f9b25ced8bee29.tar.gz
chromium_src-a4a46be32d27e4961512f35b85f9b25ced8bee29.tar.bz2
Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in chrome/browser/ui.
This is a follow-up to https://src.chromium.org/viewvc/chrome?revision=256913&view=revision that makes error messages more descriptive. It was automatically produced with git grep -l 'DCHECK(.*CurrentlyOn' chrome/browser/ui |xargs sed -i -e 's/DCHECK(BrowserThread::CurrentlyOn(\([^)]*\)))/DCHECK_CURRENTLY_ON(\1)/' -e 's/DCHECK(content::BrowserThread::CurrentlyOn(\([^)]*\)))/DCHECK_CURRENTLY_ON(\1)/' TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/220123003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261086 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui/chromeos')
-rw-r--r--chrome/browser/ui/webui/chromeos/cryptohome_web_ui_handler.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/drive_internals_ui.cc66
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc6
-rw-r--r--chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc4
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc6
5 files changed, 42 insertions, 42 deletions
diff --git a/chrome/browser/ui/webui/chromeos/cryptohome_web_ui_handler.cc b/chrome/browser/ui/webui/chromeos/cryptohome_web_ui_handler.cc
index 9587dbf..733db37 100644
--- a/chrome/browser/ui/webui/chromeos/cryptohome_web_ui_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/cryptohome_web_ui_handler.cc
@@ -50,7 +50,7 @@ void CryptohomeWebUIHandler::OnPageLoaded(const base::ListValue* args) {
void CryptohomeWebUIHandler::DidGetNSSUtilInfoOnUIThread(
bool is_tpm_token_ready) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::FundamentalValue is_tpm_token_ready_value(is_tpm_token_ready);
SetCryptohomeProperty("is-tpm-token-ready", is_tpm_token_ready_value);
diff --git a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
index 31e5ddd..e5398f5 100644
--- a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
@@ -120,7 +120,7 @@ void GetFreeDiskSpace(const base::FilePath& home_path,
// Formats |entry| into text.
std::string FormatEntry(const base::FilePath& path,
const drive::ResourceEntry& entry) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
using base::StringAppendF;
@@ -313,7 +313,7 @@ class DriveInternalsWebUIHandler : public content::WebUIMessageHandler {
void DriveInternalsWebUIHandler::OnGetAboutResource(
google_apis::GDataErrorCode status,
scoped_ptr<google_apis::AboutResource> parsed_about_resource) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (status != google_apis::HTTP_SUCCESS) {
LOG(ERROR) << "Failed to get about resource";
@@ -337,7 +337,7 @@ void DriveInternalsWebUIHandler::OnGetAboutResource(
void DriveInternalsWebUIHandler::OnGetAppList(
google_apis::GDataErrorCode status,
scoped_ptr<google_apis::AppList> parsed_app_list) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (status != google_apis::HTTP_SUCCESS) {
LOG(ERROR) << "Failed to get app list";
@@ -393,7 +393,7 @@ void DriveInternalsWebUIHandler::RegisterMessages() {
drive::DriveIntegrationService*
DriveInternalsWebUIHandler::GetIntegrationService() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Profile* profile = Profile::FromWebUI(web_ui());
drive::DriveIntegrationService* service =
@@ -404,14 +404,14 @@ DriveInternalsWebUIHandler::GetIntegrationService() {
}
drive::DriveServiceInterface* DriveInternalsWebUIHandler::GetDriveService() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Profile* profile = Profile::FromWebUI(web_ui());
return drive::util::GetDriveServiceByProfile(profile);
}
drive::DebugInfoCollector* DriveInternalsWebUIHandler::GetDebugInfoCollector() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
drive::DriveIntegrationService* integration_service = GetIntegrationService();
return integration_service ?
@@ -419,7 +419,7 @@ drive::DebugInfoCollector* DriveInternalsWebUIHandler::GetDebugInfoCollector() {
}
void DriveInternalsWebUIHandler::OnPageLoaded(const base::ListValue* args) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
drive::DriveIntegrationService* integration_service =
GetIntegrationService();
@@ -455,7 +455,7 @@ void DriveInternalsWebUIHandler::OnPageLoaded(const base::ListValue* args) {
}
void DriveInternalsWebUIHandler::UpdateDriveRelatedPreferencesSection() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const char* kDriveRelatedPreferences[] = {
prefs::kDisableDrive,
@@ -481,7 +481,7 @@ void DriveInternalsWebUIHandler::UpdateDriveRelatedPreferencesSection() {
void DriveInternalsWebUIHandler::UpdateConnectionStatusSection(
drive::DriveServiceInterface* drive_service) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(drive_service);
std::string status;
@@ -514,7 +514,7 @@ void DriveInternalsWebUIHandler::UpdateConnectionStatusSection(
void DriveInternalsWebUIHandler::UpdateAboutResourceSection(
drive::DriveServiceInterface* drive_service) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(drive_service);
drive_service->GetAboutResource(
@@ -524,7 +524,7 @@ void DriveInternalsWebUIHandler::UpdateAboutResourceSection(
void DriveInternalsWebUIHandler::UpdateAppListSection(
drive::DriveServiceInterface* drive_service) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(drive_service);
drive_service->GetAppList(
@@ -534,7 +534,7 @@ void DriveInternalsWebUIHandler::UpdateAppListSection(
void DriveInternalsWebUIHandler::UpdateLocalMetadataSection(
drive::DebugInfoCollector* debug_info_collector) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(debug_info_collector);
debug_info_collector->GetMetadata(
@@ -544,7 +544,7 @@ void DriveInternalsWebUIHandler::UpdateLocalMetadataSection(
void DriveInternalsWebUIHandler::OnGetFilesystemMetadataForLocal(
const drive::FileSystemMetadata& metadata) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::DictionaryValue local_metadata;
local_metadata.SetDouble("account-largest-changestamp-local",
@@ -554,7 +554,7 @@ void DriveInternalsWebUIHandler::OnGetFilesystemMetadataForLocal(
}
void DriveInternalsWebUIHandler::ClearAccessToken(const base::ListValue* args) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
drive::DriveServiceInterface* drive_service = GetDriveService();
if (drive_service)
@@ -563,7 +563,7 @@ void DriveInternalsWebUIHandler::ClearAccessToken(const base::ListValue* args) {
void DriveInternalsWebUIHandler::ClearRefreshToken(
const base::ListValue* args) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
drive::DriveServiceInterface* drive_service = GetDriveService();
if (drive_service)
@@ -572,7 +572,7 @@ void DriveInternalsWebUIHandler::ClearRefreshToken(
void DriveInternalsWebUIHandler::ResetDriveFileSystem(
const base::ListValue* args) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
drive::DriveIntegrationService* integration_service =
GetIntegrationService();
@@ -584,21 +584,21 @@ void DriveInternalsWebUIHandler::ResetDriveFileSystem(
}
void DriveInternalsWebUIHandler::ResetFinished(bool success) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
web_ui()->CallJavascriptFunction("updateResetStatus",
base::FundamentalValue(success));
}
void DriveInternalsWebUIHandler::ListFileEntries(const base::ListValue* args) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
UpdateFileSystemContentsSection();
}
void DriveInternalsWebUIHandler::UpdateDeltaUpdateStatusSection(
drive::DebugInfoCollector* debug_info_collector) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(debug_info_collector);
debug_info_collector->GetMetadata(
@@ -609,7 +609,7 @@ void DriveInternalsWebUIHandler::UpdateDeltaUpdateStatusSection(
void DriveInternalsWebUIHandler::OnGetFilesystemMetadataForDeltaUpdate(
const drive::FileSystemMetadata& metadata) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Profile* profile = Profile::FromWebUI(web_ui());
drive::DriveNotificationManager* drive_notification_manager =
@@ -635,7 +635,7 @@ void DriveInternalsWebUIHandler::OnGetFilesystemMetadataForDeltaUpdate(
void DriveInternalsWebUIHandler::UpdateInFlightOperationsSection(
drive::JobListInterface* job_list) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(job_list);
std::vector<drive::JobInfo> info_list = job_list->GetJobInfoList();
@@ -658,7 +658,7 @@ void DriveInternalsWebUIHandler::UpdateInFlightOperationsSection(
}
void DriveInternalsWebUIHandler::UpdateGCacheContentsSection() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Start updating the GCache contents section.
Profile* profile = Profile::FromWebUI(web_ui());
@@ -678,7 +678,7 @@ void DriveInternalsWebUIHandler::UpdateGCacheContentsSection() {
}
void DriveInternalsWebUIHandler::UpdateFileSystemContentsSection() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
drive::DebugInfoCollector* debug_info_collector = GetDebugInfoCollector();
if (!debug_info_collector)
@@ -701,7 +701,7 @@ void DriveInternalsWebUIHandler::UpdateFileSystemContentsSection() {
}
void DriveInternalsWebUIHandler::UpdateLocalStorageUsageSection() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Propagate the amount of local free space in bytes.
base::FilePath home_path;
@@ -720,7 +720,7 @@ void DriveInternalsWebUIHandler::UpdateLocalStorageUsageSection() {
void DriveInternalsWebUIHandler::UpdateCacheContentsSection(
drive::DebugInfoCollector* debug_info_collector) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(debug_info_collector);
debug_info_collector->IterateFileCache(
@@ -730,7 +730,7 @@ void DriveInternalsWebUIHandler::UpdateCacheContentsSection(
}
void DriveInternalsWebUIHandler::UpdateEventLogSection() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
drive::DriveIntegrationService* integration_service =
GetIntegrationService();
@@ -761,7 +761,7 @@ void DriveInternalsWebUIHandler::UpdateEventLogSection() {
}
void DriveInternalsWebUIHandler::UpdatePathConfigurationsSection() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Profile* const profile = Profile::FromWebUI(web_ui());
@@ -791,7 +791,7 @@ void DriveInternalsWebUIHandler::UpdatePathConfigurationsSection() {
void DriveInternalsWebUIHandler::OnGetGCacheContents(
base::ListValue* gcache_contents,
base::DictionaryValue* gcache_summary) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(gcache_contents);
DCHECK(gcache_summary);
@@ -804,7 +804,7 @@ void DriveInternalsWebUIHandler::OnGetResourceEntryByPath(
const base::FilePath& path,
drive::FileError error,
scoped_ptr<drive::ResourceEntry> entry) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (error == drive::FILE_ERROR_OK) {
DCHECK(entry.get());
@@ -817,7 +817,7 @@ void DriveInternalsWebUIHandler::OnReadDirectoryByPath(
const base::FilePath& parent_path,
drive::FileError error,
scoped_ptr<drive::ResourceEntryVector> entries) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (error == drive::FILE_ERROR_OK) {
DCHECK(entries.get());
@@ -851,7 +851,7 @@ void DriveInternalsWebUIHandler::OnReadDirectoryByPath(
void DriveInternalsWebUIHandler::UpdateCacheEntry(
const std::string& local_id,
const drive::FileCacheEntry& cache_entry) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Convert |cache_entry| into a dictionary.
base::DictionaryValue value;
@@ -866,7 +866,7 @@ void DriveInternalsWebUIHandler::UpdateCacheEntry(
void DriveInternalsWebUIHandler::OnGetFreeDiskSpace(
base::DictionaryValue* local_storage_summary) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(local_storage_summary);
web_ui()->CallJavascriptFunction(
@@ -874,7 +874,7 @@ void DriveInternalsWebUIHandler::OnGetFreeDiskSpace(
}
void DriveInternalsWebUIHandler::OnPeriodicUpdate(const base::ListValue* args) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
drive::DriveIntegrationService* integration_service =
GetIntegrationService();
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index baef5d8..50640da 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -108,7 +108,7 @@ const char kSourceAccountPicker[] = "account-picker";
// The Task posted to PostTaskAndReply in StartClearingDnsCache on the IO
// thread.
void ClearDnsCache(IOThread* io_thread) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (browser_shutdown::IsTryingToQuit())
return;
@@ -963,7 +963,7 @@ void SigninScreenHandler::ShowSigninScreenForCreds(
}
void SigninScreenHandler::OnCookiesCleared(base::Closure on_clear_callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
cookies_cleared_ = true;
on_clear_callback.Run();
}
@@ -1007,7 +1007,7 @@ void SigninScreenHandler::Observe(int type,
}
void SigninScreenHandler::OnDnsCleared() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
dns_clear_task_running_ = false;
dns_cleared_ = true;
ShowSigninScreenIfReady();
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
index edd4a0d..0a8a692 100644
--- a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
@@ -66,13 +66,13 @@ class MobileSetupDialogDelegate : public WebDialogDelegate {
// static
void MobileSetupDialog::Show(const std::string& service_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
MobileSetupDialogDelegate::GetInstance()->ShowDialog(service_path);
}
// static
MobileSetupDialogDelegate* MobileSetupDialogDelegate::GetInstance() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return Singleton<MobileSetupDialogDelegate>::get();
}
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index 06a809c..d51fa03 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -469,7 +469,7 @@ void SimUnlockHandler::CancelDialog() {
void SimUnlockHandler::EnterCode(const std::string& code,
SimUnlockCode code_type) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
pending_pin_operation_ = true;
@@ -703,7 +703,7 @@ void SimUnlockHandler::HandleSimStatusInitialize(const base::ListValue* args) {
}
void SimUnlockHandler::InitializeSimStatus() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// TODO(armansito): For now, we're initializing the device path to the first
// available cellular device. We should try to obtain a specific device here,
// as there can be multiple cellular devices present.
@@ -718,7 +718,7 @@ void SimUnlockHandler::InitializeSimStatus() {
}
void SimUnlockHandler::ProceedToPukInput() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
ProcessSimCardState(GetCellularDevice());
}