Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2604)

Unified Diff: chrome/browser/search_engines/search_provider_install_data.cc

Issue 1106593002: [chrome/browser/se*-ss*] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search_engines/search_provider_install_data.cc
diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc
index ea12fb77d94f4c814167030336e0f9d9aa33d78a..fdb0fcdb22b1d220c0d1de51f8ff003f21fee1bd 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_);

Powered by Google App Engine
This is Rietveld 408576698