diff options
author | anujk.sharma <anujk.sharma@samsung.com> | 2015-04-27 21:57:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-28 04:57:10 +0000 |
commit | 21999efe098e256c5b2099f450d155e6d48a4cd8 (patch) | |
tree | de911d4c51ade853c081854a0f1dab329bf0d15f | |
parent | 5923893a1b4035961f822bf8f3432e4eb5f83696 (diff) | |
download | chromium_src-21999efe098e256c5b2099f450d155e6d48a4cd8.zip chromium_src-21999efe098e256c5b2099f450d155e6d48a4cd8.tar.gz chromium_src-21999efe098e256c5b2099f450d155e6d48a4cd8.tar.bz2 |
favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/media_galleries , metrics and nacl_host modules
BUG=466848
Review URL: https://codereview.chromium.org/1102233002
Cr-Commit-Position: refs/heads/master@{#327233}
7 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc index 9584bed..79dc4f0 100644 --- a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc +++ b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc @@ -54,7 +54,7 @@ void DidOpenSnapshot( const storage::AsyncFileUtil::CreateOrOpenCallback& callback, const scoped_refptr<storage::ShareableFileReference>& file_ref, base::File file) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); if (!file.IsValid()) { callback.Run(file.Pass(), base::Closure()); return; @@ -104,7 +104,7 @@ void NativeMediaFileUtil::CreatedSnapshotFileForCreateOrOpen( const base::File::Info& file_info, const base::FilePath& platform_path, const scoped_refptr<storage::ShareableFileReference>& file_ref) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); if (result != base::File::FILE_OK) { callback.Run(base::File(), base::Closure()); return; diff --git a/chrome/browser/metrics/chromeos_metrics_provider.cc b/chrome/browser/metrics/chromeos_metrics_provider.cc index 8ea28df..211eec3 100644 --- a/chrome/browser/metrics/chromeos_metrics_provider.cc +++ b/chrome/browser/metrics/chromeos_metrics_provider.cc @@ -177,7 +177,7 @@ void ChromeOSMetricsProvider::InitTaskGetHardwareClass( } void ChromeOSMetricsProvider::InitTaskGetHardwareClassOnFileThread() { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); + DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); chromeos::system::StatisticsProvider::GetInstance()->GetMachineStatistic( "hardware_class", &hardware_class_); } diff --git a/chrome/browser/metrics/field_trial_synchronizer.cc b/chrome/browser/metrics/field_trial_synchronizer.cc index cc9775a..43f53ad 100644 --- a/chrome/browser/metrics/field_trial_synchronizer.cc +++ b/chrome/browser/metrics/field_trial_synchronizer.cc @@ -38,7 +38,7 @@ void FieldTrialSynchronizer::NotifyAllRenderers( const std::string& group_name) { // To iterate over RenderProcessHosts, or to send messages to the hosts, we // need to be on the UI thread. - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); for (content::RenderProcessHost::iterator it( content::RenderProcessHost::AllHostsIterator()); diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index 27dc825..ec13045 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc @@ -346,7 +346,7 @@ ThreadWatcherList::CrashDataThresholds::CrashDataThresholds() // static void ThreadWatcherList::StartWatchingAll( const base::CommandLine& command_line) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); uint32 unresponsive_threshold; CrashOnHangThreadMap crash_on_hang_threads; ParseCommandLine(command_line, diff --git a/chrome/browser/metrics/thread_watcher_android.cc b/chrome/browser/metrics/thread_watcher_android.cc index 74aab6a..67b92f0 100644 --- a/chrome/browser/metrics/thread_watcher_android.cc +++ b/chrome/browser/metrics/thread_watcher_android.cc @@ -24,7 +24,7 @@ bool g_application_has_stopped = false; void OnApplicationStateChange( base::android::ApplicationState application_state) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (application_state == base::android::APPLICATION_STATE_HAS_STOPPED_ACTIVITIES) { g_application_has_stopped = true; diff --git a/chrome/browser/metrics/variations/variations_service.cc b/chrome/browser/metrics/variations/variations_service.cc index 9d7618e..2ad9b02 100644 --- a/chrome/browser/metrics/variations/variations_service.cc +++ b/chrome/browser/metrics/variations/variations_service.cc @@ -321,7 +321,7 @@ bool VariationsService::CreateTrialsFromSeed() { } void VariationsService::StartRepeatedVariationsSeedFetch() { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // Initialize the Variations server URL. variations_server_url_ = @@ -494,7 +494,7 @@ void VariationsService::StoreSeed(const std::string& seed_data, } void VariationsService::FetchVariationsSeed() { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); const web_resource::ResourceRequestAllowedNotifier::State state = resource_request_allowed_notifier_->GetResourceRequestsAllowedState(); diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc index 56ddb9d..1ed15da 100644 --- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc +++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc @@ -59,7 +59,7 @@ const char* const kAllowedNonSfiOrigins[] = { void OnKeepaliveOnUIThread( const content::BrowserPpapiHost::OnKeepaliveInstanceData& instance_data, const base::FilePath& profile_data_directory) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // Only one instance will exist for NaCl embeds, even when more than one // embed of the same plugin exists on the same page. |