summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranujk.sharma <anujk.sharma@samsung.com>2015-04-29 00:07:15 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-29 07:07:54 +0000
commit83968f9ee9f0293cc64bf9a20b5c7d8cbf33d71b (patch)
tree7bbae2afe1a6decafc7ff547a81935a6b200b3cf
parent4dcf216bc69bbc1b68afc3370bdc22114b110f42 (diff)
downloadchromium_src-83968f9ee9f0293cc64bf9a20b5c7d8cbf33d71b.zip
chromium_src-83968f9ee9f0293cc64bf9a20b5c7d8cbf33d71b.tar.gz
chromium_src-83968f9ee9f0293cc64bf9a20b5c7d8cbf33d71b.tar.bz2
favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/se*-ss*
BUG=466848 Review URL: https://codereview.chromium.org/1106593002 Cr-Commit-Position: refs/heads/master@{#327443}
-rw-r--r--chrome/browser/search/hotword_service.cc2
-rw-r--r--chrome/browser/search/instant_io_context.cc12
-rw-r--r--chrome/browser/search/suggestions/image_fetcher_impl.cc2
-rw-r--r--chrome/browser/search_engines/search_provider_install_data.cc18
-rw-r--r--chrome/browser/search_engines/search_provider_install_state_message_filter.cc6
-rw-r--r--chrome/browser/service_process/service_process_control.cc30
-rw-r--r--chrome/browser/sessions/base_session_service_delegate_impl.cc2
-rw-r--r--chrome/browser/sessions/session_data_deleter.cc4
-rw-r--r--chrome/browser/signin/signin_header_helper.cc6
-rw-r--r--chrome/browser/signin/signin_names_io_thread.cc4
-rw-r--r--chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc20
-rw-r--r--chrome/browser/spellchecker/spellcheck_custom_dictionary.cc44
-rw-r--r--chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc24
-rw-r--r--chrome/browser/spellchecker/spellcheck_message_filter.cc2
-rw-r--r--chrome/browser/spellchecker/spellcheck_message_filter_mac.cc6
-rw-r--r--chrome/browser/spellchecker/spellcheck_service.cc12
-rw-r--r--chrome/browser/ssl/ssl_client_auth_observer.cc6
17 files changed, 100 insertions, 100 deletions
diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc
index 9455991..0cf3c60 100644
--- a/chrome/browser/search/hotword_service.cc
+++ b/chrome/browser/search/hotword_service.cc
@@ -183,7 +183,7 @@ void RecordHotwordEnabledMetric(HotwordService *service, Profile* profile) {
}
ExtensionService* GetExtensionService(Profile* profile) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
extensions::ExtensionSystem* extension_system =
extensions::ExtensionSystem::Get(profile);
diff --git a/chrome/browser/search/instant_io_context.cc b/chrome/browser/search/instant_io_context.cc
index 6ba1255..777f16f 100644
--- a/chrome/browser/search/instant_io_context.cc
+++ b/chrome/browser/search/instant_io_context.cc
@@ -17,7 +17,7 @@ namespace {
// Retrieves the Instant data from the |context|'s named user-data.
InstantIOContext* GetDataForResourceContext(
content::ResourceContext* context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
return base::UserDataAdapter<InstantIOContext>::Get(
context, InstantIOContext::kInstantIOContextKeyName);
}
@@ -38,7 +38,7 @@ const char InstantIOContext::kInstantIOContextKeyName[] = "instant_io_context";
InstantIOContext::InstantIOContext() {
// The InstantIOContext is created on the UI thread but is accessed
// on the IO thread.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
InstantIOContext::~InstantIOContext() {
@@ -57,21 +57,21 @@ void InstantIOContext::SetUserDataOnIO(
void InstantIOContext::AddInstantProcessOnIO(
scoped_refptr<InstantIOContext> instant_io_context,
int process_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
instant_io_context->process_ids_.insert(process_id);
}
// static
void InstantIOContext::RemoveInstantProcessOnIO(
scoped_refptr<InstantIOContext> instant_io_context, int process_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
instant_io_context->process_ids_.erase(process_id);
}
// static
void InstantIOContext::ClearInstantProcessesOnIO(
scoped_refptr<InstantIOContext> instant_io_context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
instant_io_context->process_ids_.clear();
}
@@ -95,6 +95,6 @@ bool InstantIOContext::ShouldServiceRequest(const net::URLRequest* request) {
}
bool InstantIOContext::IsInstantProcess(int process_id) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
return process_ids_.find(process_id) != process_ids_.end();
}
diff --git a/chrome/browser/search/suggestions/image_fetcher_impl.cc b/chrome/browser/search/suggestions/image_fetcher_impl.cc
index 7607af9..936beba 100644
--- a/chrome/browser/search/suggestions/image_fetcher_impl.cc
+++ b/chrome/browser/search/suggestions/image_fetcher_impl.cc
@@ -55,7 +55,7 @@ void ImageFetcherImpl::StartOrQueueNetworkRequest(
void ImageFetcherImpl::OnFetchComplete(const GURL& image_url,
const SkBitmap* bitmap) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
ImageRequestMap::iterator image_iter = pending_net_requests_.find(image_url);
DCHECK(image_iter != pending_net_requests_.end());
diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc
index ea12fb77..fdb0fcd 100644
--- a/chrome/browser/search_engines/search_provider_install_data.cc
+++ b/chrome/browser/search_engines/search_provider_install_data.cc
@@ -107,7 +107,7 @@ GoogleURLChangeNotifier::GoogleURLChangeNotifier(
}
void GoogleURLChangeNotifier::OnChange(const std::string& google_base_url) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (install_data_.get())
install_data_->OnGoogleURLChange(google_base_url);
}
@@ -143,7 +143,7 @@ GoogleURLObserver::GoogleURLObserver(
content::RenderProcessHost* host)
: google_url_tracker_(google_url_tracker),
change_notifier_(change_notifier) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
google_url_updated_subscription_ =
google_url_tracker_->RegisterCallback(base::Bind(
&GoogleURLObserver::OnGoogleURLUpdated, base::Unretained(this)));
@@ -197,11 +197,11 @@ SearchProviderInstallData::SearchProviderInstallData(
}
SearchProviderInstallData::~SearchProviderInstallData() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
}
void SearchProviderInstallData::CallWhenLoaded(const base::Closure& closure) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (provider_map_.get()) {
closure.Run();
@@ -230,7 +230,7 @@ void SearchProviderInstallData::CallWhenLoaded(const base::Closure& closure) {
SearchProviderInstallData::State SearchProviderInstallData::GetInstallState(
const GURL& requested_origin) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(provider_map_.get());
// First check to see if the origin is the default search provider.
@@ -260,7 +260,7 @@ void SearchProviderInstallData::OnGoogleURLChange(
void SearchProviderInstallData::OnTemplateURLsLoaded(
ScopedVector<TemplateURL> template_urls,
TemplateURL* default_provider) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
template_urls_ = template_urls.Pass();
@@ -272,7 +272,7 @@ void SearchProviderInstallData::OnTemplateURLsLoaded(
}
void SearchProviderInstallData::SetDefault(const TemplateURL* template_url) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!template_url) {
default_search_origin_.clear();
@@ -291,7 +291,7 @@ void SearchProviderInstallData::SetDefault(const TemplateURL* template_url) {
}
void SearchProviderInstallData::OnLoadFailed() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
provider_map_.reset(new SearchHostToURLsMap());
IOThreadSearchTermsData search_terms_data(google_base_url_);
@@ -301,7 +301,7 @@ void SearchProviderInstallData::OnLoadFailed() {
}
void SearchProviderInstallData::NotifyLoaded() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
std::vector<base::Closure> closure_queue;
closure_queue.swap(closure_queue_);
diff --git a/chrome/browser/search_engines/search_provider_install_state_message_filter.cc b/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
index e4effe2..ccd32f4 100644
--- a/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
+++ b/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
@@ -29,12 +29,12 @@ SearchProviderInstallStateMessageFilter(
weak_factory_(this) {
// This is initialized by RenderProcessHostImpl. Do not add any non-trivial
// initialization here. Instead do it lazily when required.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
bool SearchProviderInstallStateMessageFilter::OnMessageReceived(
const IPC::Message& message) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(SearchProviderInstallStateMessageFilter, message)
IPC_MESSAGE_HANDLER_DELAY_REPLY(
@@ -47,7 +47,7 @@ bool SearchProviderInstallStateMessageFilter::OnMessageReceived(
SearchProviderInstallStateMessageFilter::
~SearchProviderInstallStateMessageFilter() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
}
search_provider::InstallState
diff --git a/chrome/browser/service_process/service_process_control.cc b/chrome/browser/service_process/service_process_control.cc
index b5cdd41..abbef18 100644
--- a/chrome/browser/service_process/service_process_control.cc
+++ b/chrome/browser/service_process/service_process_control.cc
@@ -90,7 +90,7 @@ bool ServiceProcessControl::IsConnected() const {
void ServiceProcessControl::Launch(const base::Closure& success_task,
const base::Closure& failure_task) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::Closure failure = failure_task;
if (!success_task.is_null())
@@ -120,12 +120,12 @@ void ServiceProcessControl::Launch(const base::Closure& success_task,
}
void ServiceProcessControl::Disconnect() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
channel_.reset();
}
void ServiceProcessControl::OnProcessLaunched() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (launcher_->launched()) {
UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents",
SERVICE_EVENT_LAUNCHED, SERVICE_EVENT_MAX);
@@ -157,7 +157,7 @@ bool ServiceProcessControl::OnMessageReceived(const IPC::Message& message) {
}
void ServiceProcessControl::OnChannelConnected(int32 peer_pid) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents",
SERVICE_EVENT_CHANNEL_CONNECTED, SERVICE_EVENT_MAX);
@@ -175,7 +175,7 @@ void ServiceProcessControl::OnChannelConnected(int32 peer_pid) {
}
void ServiceProcessControl::OnChannelError() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents",
SERVICE_EVENT_CHANNEL_ERROR, SERVICE_EVENT_MAX);
@@ -185,7 +185,7 @@ void ServiceProcessControl::OnChannelError() {
}
bool ServiceProcessControl::Send(IPC::Message* message) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!channel_.get())
return false;
return channel_->Send(message);
@@ -203,7 +203,7 @@ void ServiceProcessControl::Observe(
void ServiceProcessControl::OnCloudPrintProxyInfo(
const cloud_print::CloudPrintProxyInfo& proxy_info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents",
SERVICE_EVENT_INFO_REPLY, SERVICE_EVENT_MAX);
if (!cloud_print_info_callback_.is_null()) {
@@ -216,14 +216,14 @@ void ServiceProcessControl::OnHistograms(
const std::vector<std::string>& pickled_histograms) {
UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents",
SERVICE_EVENT_HISTOGRAMS_REPLY, SERVICE_EVENT_MAX);
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::HistogramDeltaSerialization::DeserializeAndAddSamples(
pickled_histograms);
RunHistogramsCallback();
}
void ServiceProcessControl::RunHistogramsCallback() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!histograms_callback_.is_null()) {
histograms_callback_.Run();
histograms_callback_.Reset();
@@ -233,7 +233,7 @@ void ServiceProcessControl::RunHistogramsCallback() {
void ServiceProcessControl::OnPrinters(
const std::vector<std::string>& printers) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
UMA_HISTOGRAM_ENUMERATION(
"CloudPrint.ServiceEvents", SERVICE_PRINTERS_REPLY, SERVICE_EVENT_MAX);
UMA_HISTOGRAM_COUNTS_10000("CloudPrint.AvailablePrinters", printers.size());
@@ -245,7 +245,7 @@ void ServiceProcessControl::OnPrinters(
bool ServiceProcessControl::GetCloudPrintProxyInfo(
const CloudPrintProxyInfoCallback& cloud_print_info_callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!cloud_print_info_callback.is_null());
cloud_print_info_callback_.Reset();
UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents",
@@ -259,7 +259,7 @@ bool ServiceProcessControl::GetCloudPrintProxyInfo(
bool ServiceProcessControl::GetHistograms(
const base::Closure& histograms_callback,
const base::TimeDelta& timeout) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!histograms_callback.is_null());
histograms_callback_.Reset();
@@ -294,7 +294,7 @@ bool ServiceProcessControl::GetHistograms(
bool ServiceProcessControl::GetPrinters(
const PrintersCallback& printers_callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!printers_callback.is_null());
printers_callback_.Reset();
UMA_HISTOGRAM_ENUMERATION(
@@ -306,7 +306,7 @@ bool ServiceProcessControl::GetPrinters(
}
bool ServiceProcessControl::Shutdown() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
bool ret = Send(new ServiceMsg_Shutdown());
channel_.reset();
return ret;
@@ -328,7 +328,7 @@ ServiceProcessControl::Launcher::Launcher(
// After the command is executed, |task| is called with the process handle on
// the UI thread.
void ServiceProcessControl::Launcher::Run(const base::Closure& task) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
notify_task_ = task;
BrowserThread::PostTask(BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
base::Bind(&Launcher::DoRun, this));
diff --git a/chrome/browser/sessions/base_session_service_delegate_impl.cc b/chrome/browser/sessions/base_session_service_delegate_impl.cc
index cd584bf..6f7255c 100644
--- a/chrome/browser/sessions/base_session_service_delegate_impl.cc
+++ b/chrome/browser/sessions/base_session_service_delegate_impl.cc
@@ -13,7 +13,7 @@ BaseSessionServiceDelegateImpl::BaseSessionServiceDelegateImpl(
: should_use_delayed_save_(should_use_delayed_save) {}
base::SequencedWorkerPool* BaseSessionServiceDelegateImpl::GetBlockingPool() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
return content::BrowserThread::GetBlockingPool();
}
diff --git a/chrome/browser/sessions/session_data_deleter.cc b/chrome/browser/sessions/session_data_deleter.cc
index 2d6134d7..046c87f 100644
--- a/chrome/browser/sessions/session_data_deleter.cc
+++ b/chrome/browser/sessions/session_data_deleter.cc
@@ -105,7 +105,7 @@ void SessionDataDeleter::ClearSessionOnlyLocalStorage(
void SessionDataDeleter::DeleteSessionCookiesOnIOThread(
ProfileIOData* profile_io_data) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
net::URLRequestContext* request_context =
profile_io_data->GetMainRequestContext();
cookie_monster_ = request_context->cookie_store()->GetCookieMonster();
@@ -142,7 +142,7 @@ void SessionDataDeleter::DeleteSessionOnlyOriginCookies(
} // namespace
void DeleteSessionOnlyData(Profile* profile) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (browser_shutdown::IsTryingToQuit())
return;
diff --git a/chrome/browser/signin/signin_header_helper.cc b/chrome/browser/signin/signin_header_helper.cc
index 83e502b..4f9807c 100644
--- a/chrome/browser/signin/signin_header_helper.cc
+++ b/chrome/browser/signin/signin_header_helper.cc
@@ -125,7 +125,7 @@ signin::ManageAccountsParams BuildManageAccountsParams(
void ProcessMirrorHeaderUIThread(
int child_id, int route_id,
signin::ManageAccountsParams manage_accounts_params) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
signin::GAIAServiceType service_type = manage_accounts_params.service_type;
DCHECK_NE(signin::GAIA_SERVICE_TYPE_NONE, service_type);
@@ -200,7 +200,7 @@ bool AppendMirrorRequestHeaderIfPossible(
ProfileIOData* io_data,
int child_id,
int route_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
if (io_data->IsOffTheRecord())
return false;
@@ -279,7 +279,7 @@ void ProcessMirrorResponseHeaderIfExists(
#if defined(OS_IOS)
NOTREACHED();
#else
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
if (!gaia::IsGaiaSignonRealm(request->url().GetOrigin()))
return;
diff --git a/chrome/browser/signin/signin_names_io_thread.cc b/chrome/browser/signin/signin_names_io_thread.cc
index ae977dd..fc9c516 100644
--- a/chrome/browser/signin/signin_names_io_thread.cc
+++ b/chrome/browser/signin/signin_names_io_thread.cc
@@ -83,11 +83,11 @@ void SigninNamesOnIOThread::GoogleSignedOut(const std::string& account_id,
}
void SigninNamesOnIOThread::CheckOnIOThread() const {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}
void SigninNamesOnIOThread::CheckOnUIThread() const {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
void SigninNamesOnIOThread::PostTaskToIOThread(bool add,
diff --git a/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc b/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc
index f351079..47a8707 100644
--- a/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc
+++ b/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc
@@ -50,7 +50,7 @@ namespace speech {
namespace {
void TabClosedCallbackOnIOThread(int render_process_id, int render_view_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
SpeechRecognitionManager* manager = SpeechRecognitionManager::GetInstance();
// |manager| becomes NULL if a browser shutdown happens between the post of
@@ -76,14 +76,14 @@ class ChromeSpeechRecognitionManagerDelegate::OptionalRequestInfo
}
void Refresh() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
// UMA opt-in can be checked only from the UI thread, so switch to that.
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&OptionalRequestInfo::CheckUMAAndGetHardwareInfo, this));
}
void CheckUMAAndGetHardwareInfo() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// prefs::kMetricsReportingEnabled is not registered for OS_CHROMEOS.
#if !defined(OS_CHROMEOS)
if (g_browser_process->local_state()->GetBoolean(
@@ -96,7 +96,7 @@ class ChromeSpeechRecognitionManagerDelegate::OptionalRequestInfo
}
void GetHardwareInfo() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
base::AutoLock lock(lock_);
can_report_metrics_ = true;
base::string16 device_model =
@@ -191,7 +191,7 @@ class ChromeSpeechRecognitionManagerDelegate::TabWatcher
void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(type == content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED ||
type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED);
@@ -232,7 +232,7 @@ class ChromeSpeechRecognitionManagerDelegate::TabWatcher
~TabWatcher() override {
// Must be destroyed on the UI thread due to |registrar_| non thread-safety.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
// Helper function to find the iterator in |registered_web_contents_| which
@@ -276,7 +276,7 @@ ChromeSpeechRecognitionManagerDelegate
void ChromeSpeechRecognitionManagerDelegate::TabClosedCallback(
int render_process_id, int render_view_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Tell the S.R. Manager (which lives on the IO thread) to abort all the
// sessions for the given renderer view.
@@ -333,7 +333,7 @@ void ChromeSpeechRecognitionManagerDelegate::OnRecognitionEnd(int session_id) {
void ChromeSpeechRecognitionManagerDelegate::GetDiagnosticInformation(
bool* can_report_metrics,
std::string* hardware_info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!optional_request_info_.get()) {
optional_request_info_ = new OptionalRequestInfo();
// Since hardware info is optional with speech input requests, we start an
@@ -352,7 +352,7 @@ void ChromeSpeechRecognitionManagerDelegate::GetDiagnosticInformation(
void ChromeSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
const content::SpeechRecognitionSessionContext& context =
SpeechRecognitionManager::GetInstance()->GetSessionContext(session_id);
@@ -400,7 +400,7 @@ void ChromeSpeechRecognitionManagerDelegate::CheckRenderViewType(
base::Callback<void(bool ask_user, bool is_allowed)> callback,
int render_process_id,
int render_view_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const content::RenderViewHost* render_view_host =
content::RenderViewHost::FromID(render_process_id, render_view_id);
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index d99273b..f63a32b 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -57,7 +57,7 @@ enum ChangeSanitationResult {
// valid checksum, then returns ChecksumStatus::VALID. If the file has an
// invalid checksum, then returns ChecksumStatus::INVALID and clears |words|.
ChecksumStatus LoadFile(const base::FilePath& file_path, WordList& words) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
words.clear();
std::string contents;
base::ReadFileToString(file_path, &contents);
@@ -90,7 +90,7 @@ bool IsInvalidWord(const std::string& word) {
// thread.
void LoadDictionaryFileReliably(WordList& custom_words,
const base::FilePath& path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
// Load the contents and verify the checksum.
if (LoadFile(path, custom_words) == VALID_CHECKSUM)
return;
@@ -110,7 +110,7 @@ void LoadDictionaryFileReliably(WordList& custom_words,
void SaveDictionaryFileReliably(
const WordList& custom_words,
const base::FilePath& path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
std::stringstream content;
for (WordList::const_iterator it = custom_words.begin();
it != custom_words.end();
@@ -228,12 +228,12 @@ SpellcheckCustomDictionary::~SpellcheckCustomDictionary() {
}
const WordSet& SpellcheckCustomDictionary::GetWords() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return words_;
}
bool SpellcheckCustomDictionary::AddWord(const std::string& word) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Change dictionary_change;
dictionary_change.AddWord(word);
int result = dictionary_change.Sanitize(GetWords());
@@ -245,7 +245,7 @@ bool SpellcheckCustomDictionary::AddWord(const std::string& word) {
}
bool SpellcheckCustomDictionary::RemoveWord(const std::string& word) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Change dictionary_change;
dictionary_change.RemoveWord(word);
int result = dictionary_change.Sanitize(GetWords());
@@ -261,27 +261,27 @@ bool SpellcheckCustomDictionary::HasWord(const std::string& word) const {
}
void SpellcheckCustomDictionary::AddObserver(Observer* observer) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
observers_.AddObserver(observer);
}
void SpellcheckCustomDictionary::RemoveObserver(Observer* observer) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
observers_.RemoveObserver(observer);
}
bool SpellcheckCustomDictionary::IsLoaded() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return is_loaded_;
}
bool SpellcheckCustomDictionary::IsSyncing() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return !!sync_processor_.get();
}
void SpellcheckCustomDictionary::Load() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
BrowserThread::PostTaskAndReplyWithResult(
BrowserThread::FILE,
FROM_HERE,
@@ -296,7 +296,7 @@ syncer::SyncMergeResult SpellcheckCustomDictionary::MergeDataAndStartSyncing(
const syncer::SyncDataList& initial_sync_data,
scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
scoped_ptr<syncer::SyncErrorFactory> sync_error_handler) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!sync_processor_.get());
DCHECK(!sync_error_handler_.get());
DCHECK(sync_processor.get());
@@ -334,7 +334,7 @@ syncer::SyncMergeResult SpellcheckCustomDictionary::MergeDataAndStartSyncing(
}
void SpellcheckCustomDictionary::StopSyncing(syncer::ModelType type) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK_EQ(syncer::DICTIONARY, type);
sync_processor_.reset();
sync_error_handler_.reset();
@@ -342,7 +342,7 @@ void SpellcheckCustomDictionary::StopSyncing(syncer::ModelType type) {
syncer::SyncDataList SpellcheckCustomDictionary::GetAllSyncData(
syncer::ModelType type) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK_EQ(syncer::DICTIONARY, type);
syncer::SyncDataList data;
std::string word;
@@ -362,7 +362,7 @@ syncer::SyncDataList SpellcheckCustomDictionary::GetAllSyncData(
syncer::SyncError SpellcheckCustomDictionary::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const syncer::SyncChangeList& change_list) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Change dictionary_change;
for (syncer::SyncChangeList::const_iterator it = change_list.begin();
it != change_list.end();
@@ -395,7 +395,7 @@ syncer::SyncError SpellcheckCustomDictionary::ProcessSyncChanges(
// static
WordList SpellcheckCustomDictionary::LoadDictionaryFile(
const base::FilePath& path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
WordList words;
LoadDictionaryFileReliably(words, path);
if (!words.empty() && VALID_CHANGE != SanitizeWordsToAdd(WordSet(), words))
@@ -408,7 +408,7 @@ WordList SpellcheckCustomDictionary::LoadDictionaryFile(
void SpellcheckCustomDictionary::UpdateDictionaryFile(
const SpellcheckCustomDictionary::Change& dictionary_change,
const base::FilePath& path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
if (dictionary_change.empty())
return;
@@ -431,7 +431,7 @@ void SpellcheckCustomDictionary::UpdateDictionaryFile(
}
void SpellcheckCustomDictionary::OnLoaded(WordList custom_words) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Change dictionary_change(custom_words);
dictionary_change.Sanitize(GetWords());
Apply(dictionary_change);
@@ -442,7 +442,7 @@ void SpellcheckCustomDictionary::OnLoaded(WordList custom_words) {
void SpellcheckCustomDictionary::Apply(
const SpellcheckCustomDictionary::Change& dictionary_change) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!dictionary_change.to_add().empty()) {
words_.insert(dictionary_change.to_add().begin(),
dictionary_change.to_add().end());
@@ -457,7 +457,7 @@ void SpellcheckCustomDictionary::Apply(
void SpellcheckCustomDictionary::Save(
const SpellcheckCustomDictionary::Change& dictionary_change) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
BrowserThread::PostTask(
BrowserThread::FILE,
FROM_HERE,
@@ -468,7 +468,7 @@ void SpellcheckCustomDictionary::Save(
syncer::SyncError SpellcheckCustomDictionary::Sync(
const SpellcheckCustomDictionary::Change& dictionary_change) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
syncer::SyncError error;
if (!IsSyncing() || dictionary_change.empty())
return error;
@@ -527,7 +527,7 @@ syncer::SyncError SpellcheckCustomDictionary::Sync(
void SpellcheckCustomDictionary::Notify(
const SpellcheckCustomDictionary::Change& dictionary_change) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!IsLoaded() || dictionary_change.empty())
return;
FOR_EACH_OBSERVER(Observer,
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
index ad9fa56..daac459 100644
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
@@ -28,7 +28,7 @@ namespace {
// Close the file.
void CloseDictionary(base::File file) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
file.Close();
}
@@ -36,7 +36,7 @@ void CloseDictionary(base::File file) {
// returns false.
bool SaveDictionaryData(scoped_ptr<std::string> data,
const base::FilePath& path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
size_t bytes_written =
base::WriteFile(path, data->data(), data->length());
@@ -106,7 +106,7 @@ SpellcheckHunspellDictionary::~SpellcheckHunspellDictionary() {
}
void SpellcheckHunspellDictionary::Load() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
#if defined(OS_MACOSX)
if (spellcheck_mac::SpellCheckerAvailable() &&
@@ -132,7 +132,7 @@ void SpellcheckHunspellDictionary::Load() {
void SpellcheckHunspellDictionary::RetryDownloadDictionary(
net::URLRequestContextGetter* request_context_getter) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
request_context_getter_ = request_context_getter;
DownloadDictionary(GetDictionaryURL());
}
@@ -154,12 +154,12 @@ bool SpellcheckHunspellDictionary::IsUsingPlatformChecker() const {
}
void SpellcheckHunspellDictionary::AddObserver(Observer* observer) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
observers_.AddObserver(observer);
}
void SpellcheckHunspellDictionary::RemoveObserver(Observer* observer) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
observers_.RemoveObserver(observer);
}
@@ -174,7 +174,7 @@ bool SpellcheckHunspellDictionary::IsDownloadFailure() {
void SpellcheckHunspellDictionary::OnURLFetchComplete(
const net::URLFetcher* source) {
DCHECK(source);
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
scoped_ptr<net::URLFetcher> fetcher_destructor(fetcher_.release());
if ((source->GetResponseCode() / 100) != 2) {
@@ -224,7 +224,7 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
}
void SpellcheckHunspellDictionary::DownloadDictionary(GURL url) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(request_context_getter_);
download_status_ = DOWNLOAD_IN_PROGRESS;
@@ -248,7 +248,7 @@ void SpellcheckHunspellDictionary::DownloadDictionary(GURL url) {
// download is chrome::DIR_USER_DATA.
SpellcheckHunspellDictionary::DictionaryFile
SpellcheckHunspellDictionary::OpenDictionaryFile(const base::FilePath& path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DictionaryFile dictionary;
#if defined(OS_WIN)
@@ -291,7 +291,7 @@ SpellcheckHunspellDictionary::OpenDictionaryFile(const base::FilePath& path) {
SpellcheckHunspellDictionary::DictionaryFile
SpellcheckHunspellDictionary::InitializeDictionaryLocation(
const std::string& language) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
// Initialize the BDICT path. Initialization should be in the FILE thread
// because it checks if there is a "Dictionaries" directory and create it.
@@ -305,7 +305,7 @@ SpellcheckHunspellDictionary::InitializeDictionaryLocation(
void SpellcheckHunspellDictionary::InitializeDictionaryLocationComplete(
DictionaryFile file) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
dictionary_file_ = file.Pass();
if (!dictionary_file_.file.IsValid()) {
@@ -331,7 +331,7 @@ void SpellcheckHunspellDictionary::InitializeDictionaryLocationComplete(
void SpellcheckHunspellDictionary::SaveDictionaryDataComplete(
bool dictionary_saved) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (dictionary_saved) {
download_status_ = DOWNLOAD_NONE;
diff --git a/chrome/browser/spellchecker/spellcheck_message_filter.cc b/chrome/browser/spellchecker/spellcheck_message_filter.cc
index 30f7d5b..97415dc 100644
--- a/chrome/browser/spellchecker/spellcheck_message_filter.cc
+++ b/chrome/browser/spellchecker/spellcheck_message_filter.cc
@@ -112,7 +112,7 @@ void SpellCheckMessageFilter::OnCallSpellingService(
const base::string16& text,
std::vector<SpellCheckMarker> markers) {
DCHECK(!text.empty());
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// Erase invalid markers (with offsets out of boundaries of text length).
markers.erase(
std::remove_if(
diff --git a/chrome/browser/spellchecker/spellcheck_message_filter_mac.cc b/chrome/browser/spellchecker/spellcheck_message_filter_mac.cc
index 0689342..7c0fb69 100644
--- a/chrome/browser/spellchecker/spellcheck_message_filter_mac.cc
+++ b/chrome/browser/spellchecker/spellcheck_message_filter_mac.cc
@@ -96,7 +96,7 @@ void SpellingRequest::RequestCheck(
int document_tag,
const std::vector<SpellCheckMarker>& markers) {
DCHECK(!text.empty());
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
route_id_ = route_id;
identifier_ = identifier;
@@ -163,7 +163,7 @@ void SpellingRequest::OnRemoteCheckCompleted(
bool success,
const base::string16& text,
const std::vector<SpellCheckResult>& results) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
remote_success_ = success;
remote_results_ = results;
@@ -275,7 +275,7 @@ void SpellCheckMessageFilterMac::OnRequestTextCheck(
const base::string16& text,
std::vector<SpellCheckMarker> markers) {
DCHECK(!text.empty());
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// Initialize the spellcheck service if needed. The service will send the
// language code for text breaking to the renderer. (Text breaking is required
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index ffc2273..b9cecbd 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -37,7 +37,7 @@ SpellcheckService::EventType g_status_type =
SpellcheckService::SpellcheckService(content::BrowserContext* context)
: context_(context),
weak_ptr_factory_(this) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
PrefService* prefs = user_prefs::UserPrefs::Get(context);
pref_change_registrar_.Init(prefs);
@@ -144,7 +144,7 @@ void SpellcheckService::GetSpellCheckLanguagesFromAcceptLanguages(
// static
bool SpellcheckService::SignalStatusEvent(
SpellcheckService::EventType status_type) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!g_status_event)
return false;
@@ -160,7 +160,7 @@ void SpellcheckService::StartRecordingMetrics(bool spellcheck_enabled) {
}
void SpellcheckService::InitForRenderer(content::RenderProcessHost* process) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
content::BrowserContext* context = process->GetBrowserContext();
if (SpellcheckServiceFactory::GetForContext(context) != this)
@@ -250,19 +250,19 @@ void SpellcheckService::OnHunspellDictionaryDownloadFailure() {
// static
void SpellcheckService::AttachStatusEvent(base::WaitableEvent* status_event) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
g_status_event = status_event;
}
// static
SpellcheckService::EventType SpellcheckService::GetStatusEvent() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return g_status_type;
}
void SpellcheckService::InitForAllRenderers() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
for (content::RenderProcessHost::iterator i(
content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
diff --git a/chrome/browser/ssl/ssl_client_auth_observer.cc b/chrome/browser/ssl/ssl_client_auth_observer.cc
index acbdddd0..4a2dedb 100644
--- a/chrome/browser/ssl/ssl_client_auth_observer.cc
+++ b/chrome/browser/ssl/ssl_client_auth_observer.cc
@@ -67,7 +67,7 @@ void SSLClientAuthObserver::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DVLOG(1) << "SSLClientAuthObserver::Observe " << this;
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(type == chrome::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED);
CertDetails* cert_details = content::Details<CertDetails>(details).ptr();
@@ -84,13 +84,13 @@ void SSLClientAuthObserver::Observe(
}
void SSLClientAuthObserver::StartObserving() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
notification_registrar_.Add(
this, chrome::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED,
content::Source<content::BrowserContext>(browser_context_));
}
void SSLClientAuthObserver::StopObserving() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
notification_registrar_.RemoveAll();
}