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

Unified Diff: chrome/browser/net/pref_proxy_config_tracker_impl.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
« no previous file with comments | « chrome/browser/net/predictor_browsertest.cc ('k') | chrome/browser/net/proxy_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/pref_proxy_config_tracker_impl.cc
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl.cc b/chrome/browser/net/pref_proxy_config_tracker_impl.cc
index 61ae371f5f53f41e7cc7fc9c09db50ce7606718b..b7d0d3aa20eed9e84df81d8d4ed24ac25734946e 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl.cc
@@ -73,7 +73,7 @@ void ChromeProxyConfigService::OnLazyPoll() {
void ChromeProxyConfigService::UpdateProxyConfig(
ProxyPrefs::ConfigState config_state,
const net::ProxyConfig& config) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
pref_config_read_pending_ = false;
pref_config_state_ = config_state;
@@ -101,7 +101,7 @@ void ChromeProxyConfigService::UpdateProxyConfig(
void ChromeProxyConfigService::OnProxyConfigChanged(
const net::ProxyConfig& config,
ConfigAvailability availability) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
// Check whether there is a proxy configuration defined by preferences. In
// this case that proxy configuration takes precedence and the change event
@@ -115,7 +115,7 @@ void ChromeProxyConfigService::OnProxyConfigChanged(
}
void ChromeProxyConfigService::RegisterObserver() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!registered_observer_ && base_service_.get()) {
base_service_->AddObserver(this);
registered_observer_ = true;
@@ -154,7 +154,7 @@ PrefProxyConfigTrackerImpl::CreateTrackingProxyConfigService(
}
void PrefProxyConfigTrackerImpl::DetachFromPrefService() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Stop notifications.
proxy_prefs_.RemoveAll();
pref_service_ = NULL;
@@ -219,7 +219,7 @@ void PrefProxyConfigTrackerImpl::RegisterProfilePrefs(
ProxyPrefs::ConfigState PrefProxyConfigTrackerImpl::ReadPrefConfig(
const PrefService* pref_service,
net::ProxyConfig* config) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Clear the configuration and source.
*config = net::ProxyConfig();
@@ -252,7 +252,7 @@ ProxyPrefs::ConfigState PrefProxyConfigTrackerImpl::ReadPrefConfig(
ProxyPrefs::ConfigState PrefProxyConfigTrackerImpl::GetProxyConfig(
net::ProxyConfig* config) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (config_state_ != ProxyPrefs::CONFIG_UNSET)
*config = pref_config_;
return config_state_;
@@ -337,7 +337,7 @@ bool PrefProxyConfigTrackerImpl::PrefConfigToNetConfig(
}
void PrefProxyConfigTrackerImpl::OnProxyPrefChanged() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
net::ProxyConfig new_config;
ProxyPrefs::ConfigState config_state = ReadPrefConfig(pref_service_,
&new_config);
« no previous file with comments | « chrome/browser/net/predictor_browsertest.cc ('k') | chrome/browser/net/proxy_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698