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

Unified Diff: chrome/browser/net/chrome_http_user_agent_settings.cc

Issue 1117613003: [chrome/browser/net] 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/net/chrome_http_user_agent_settings.cc
diff --git a/chrome/browser/net/chrome_http_user_agent_settings.cc b/chrome/browser/net/chrome_http_user_agent_settings.cc
index dca7cfadf1234d2fb06e3ff373531e5319de3cef..73c0df8bddf95bd640e4ed299dd31577d4aeddbf 100644
--- a/chrome/browser/net/chrome_http_user_agent_settings.cc
+++ b/chrome/browser/net/chrome_http_user_agent_settings.cc
@@ -11,7 +11,7 @@
#include "net/http/http_util.h"
ChromeHttpUserAgentSettings::ChromeHttpUserAgentSettings(PrefService* prefs) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
pref_accept_language_.Init(prefs::kAcceptLanguages, prefs);
last_pref_accept_language_ = *pref_accept_language_;
last_http_accept_language_ =
@@ -22,16 +22,16 @@ ChromeHttpUserAgentSettings::ChromeHttpUserAgentSettings(PrefService* prefs) {
}
ChromeHttpUserAgentSettings::~ChromeHttpUserAgentSettings() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}
void ChromeHttpUserAgentSettings::CleanupOnUIThread() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
pref_accept_language_.Destroy();
}
std::string ChromeHttpUserAgentSettings::GetAcceptLanguage() const {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
std::string new_pref_accept_language = *pref_accept_language_;
if (new_pref_accept_language != last_pref_accept_language_) {
last_http_accept_language_ =
@@ -42,7 +42,7 @@ std::string ChromeHttpUserAgentSettings::GetAcceptLanguage() const {
}
std::string ChromeHttpUserAgentSettings::GetUserAgent() const {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
return ::GetUserAgent();
}
« no previous file with comments | « chrome/browser/net/chrome_extensions_network_delegate.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698