diff options
Diffstat (limited to 'chrome')
20 files changed, 112 insertions, 112 deletions
diff --git a/chrome/browser/net/chrome_extensions_network_delegate.cc b/chrome/browser/net/chrome_extensions_network_delegate.cc index 77e2518..bbbc56b 100644 --- a/chrome/browser/net/chrome_extensions_network_delegate.cc +++ b/chrome/browser/net/chrome_extensions_network_delegate.cc @@ -33,7 +33,7 @@ void NotifyEPMRequestStatus(RequestStatus status, uint64 request_id, int process_id, int render_frame_id) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); Profile* profile = reinterpret_cast<Profile*>(profile_id); if (!g_browser_process->profile_manager()->IsValidProfile(profile)) return; diff --git a/chrome/browser/net/chrome_http_user_agent_settings.cc b/chrome/browser/net/chrome_http_user_agent_settings.cc index dca7cfa..73c0df8 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(); } diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index 27ff3ef..248fd5a 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc @@ -111,7 +111,7 @@ void ForceGoogleSafeSearchCallbackWrapper( void RecordPrecacheStatsOnUIThread(const GURL& url, const base::Time& fetch_time, int64 size, bool was_cached, void* profile_id) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); Profile* profile = reinterpret_cast<Profile*>(profile_id); if (!g_browser_process->profile_manager()->IsValidProfile(profile)) { @@ -336,7 +336,7 @@ void ChromeNetworkDelegate::InitializePrefsOnUIThread( BooleanPrefMember* force_google_safe_search, BooleanPrefMember* force_youtube_safety_mode, PrefService* pref_service) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); enable_referrers->Init(prefs::kEnableReferrers, pref_service); enable_referrers->MoveToThread( BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); diff --git a/chrome/browser/net/chrome_url_request_context_getter.cc b/chrome/browser/net/chrome_url_request_context_getter.cc index ab3ed5d..5f6f524 100644 --- a/chrome/browser/net/chrome_url_request_context_getter.cc +++ b/chrome/browser/net/chrome_url_request_context_getter.cc @@ -179,7 +179,7 @@ ChromeURLRequestContextGetter::~ChromeURLRequestContextGetter() {} // Lazily create a URLRequestContext using our factory. net::URLRequestContext* ChromeURLRequestContextGetter::GetURLRequestContext() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (factory_.get()) { DCHECK(!url_request_context_); @@ -195,7 +195,7 @@ ChromeURLRequestContextGetter::GetURLRequestContext() { } void ChromeURLRequestContextGetter::Invalidate() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); factory_.reset(); url_request_context_ = NULL; } diff --git a/chrome/browser/net/cookie_store_util.cc b/chrome/browser/net/cookie_store_util.cc index d6c8a50..eb0bfe7 100644 --- a/chrome/browser/net/cookie_store_util.cc +++ b/chrome/browser/net/cookie_store_util.cc @@ -34,7 +34,7 @@ class ChromeCookieMonsterDelegate : public net::CookieMonsterDelegate { : profile_getter_( base::Bind(&GetProfileOnUI, g_browser_process->profile_manager(), profile)) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(profile); } diff --git a/chrome/browser/net/crl_set_fetcher.cc b/chrome/browser/net/crl_set_fetcher.cc index 09f9a9c..4118952 100644 --- a/chrome/browser/net/crl_set_fetcher.cc +++ b/chrome/browser/net/crl_set_fetcher.cc @@ -36,7 +36,7 @@ base::FilePath CRLSetFetcher::GetCRLSetFilePath() const { void CRLSetFetcher::StartInitialLoad(ComponentUpdateService* cus, const base::FilePath& path) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (path.empty()) return; SetCRLSetFilePath(path); @@ -50,7 +50,7 @@ void CRLSetFetcher::StartInitialLoad(ComponentUpdateService* cus, } void CRLSetFetcher::DeleteFromDisk(const base::FilePath& path) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (path.empty()) return; @@ -63,7 +63,7 @@ void CRLSetFetcher::DeleteFromDisk(const base::FilePath& path) { } void CRLSetFetcher::DoInitialLoadFromDisk() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE); LoadFromDisk(GetCRLSetFilePath(), &crl_set_); @@ -87,7 +87,7 @@ void CRLSetFetcher::LoadFromDisk(base::FilePath path, scoped_refptr<net::CRLSet>* out_crl_set) { TRACE_EVENT0("CRLSetFetcher", "LoadFromDisk"); - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE); std::string crl_set_bytes; { @@ -113,7 +113,7 @@ void CRLSetFetcher::LoadFromDisk(base::FilePath path, void CRLSetFetcher::SetCRLSetIfNewer( scoped_refptr<net::CRLSet> crl_set) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); scoped_refptr<net::CRLSet> old_crl_set(net::SSLConfigService::GetCRLSet()); if (old_crl_set.get() && old_crl_set->sequence() > crl_set->sequence()) { @@ -137,7 +137,7 @@ static const uint8 kPublicKeySHA256[32] = { }; void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); update_client::CrxComponent component; component.pk_hash.assign(kPublicKeySHA256, @@ -158,7 +158,7 @@ void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { } void CRLSetFetcher::DoDeleteFromDisk() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE); DeleteFile(GetCRLSetFilePath(), false /* not recursive */); } diff --git a/chrome/browser/net/net_error_tab_helper.cc b/chrome/browser/net/net_error_tab_helper.cc index 82d2fe1..f19d4fa 100644 --- a/chrome/browser/net/net_error_tab_helper.cc +++ b/chrome/browser/net/net_error_tab_helper.cc @@ -46,7 +46,7 @@ bool IsDnsError(int net_error) { void OnDnsProbeFinishedOnIOThread( const base::Callback<void(DnsProbeStatus)>& callback, DnsProbeStatus result) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); BrowserThread::PostTask( BrowserThread::UI, @@ -59,7 +59,7 @@ void OnDnsProbeFinishedOnIOThread( void StartDnsProbeOnIOThread( const base::Callback<void(DnsProbeStatus)>& callback, IOThread* io_thread) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); DnsProbeService* probe_service = io_thread->globals()->dns_probe_service.get(); @@ -80,7 +80,7 @@ void NetErrorTabHelper::set_state_for_testing(TestingState state) { void NetErrorTabHelper::DidStartNavigationToPendingEntry( const GURL& url, content::NavigationController::ReloadType reload_type) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (!is_error_page_) return; @@ -97,7 +97,7 @@ void NetErrorTabHelper::DidStartProvisionalLoadForFrame( const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (render_frame_host->GetParent()) return; @@ -109,7 +109,7 @@ void NetErrorTabHelper::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, PageTransition transition_type) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (render_frame_host->GetParent()) return; @@ -133,7 +133,7 @@ void NetErrorTabHelper::DidFailProvisionalLoad( const GURL& validated_url, int error_code, const base::string16& error_description) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (render_frame_host->GetParent()) return; @@ -151,7 +151,7 @@ NetErrorTabHelper::NetErrorTabHelper(WebContents* contents) dns_error_page_committed_(false), dns_probe_status_(chrome_common_net::DNS_PROBE_POSSIBLE), weak_factory_(this) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); // If this helper is under test, it won't have a WebContents. if (contents) @@ -171,7 +171,7 @@ void NetErrorTabHelper::OnMainFrameDnsError() { } void NetErrorTabHelper::StartDnsProbe() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(dns_error_active_); DCHECK_NE(chrome_common_net::DNS_PROBE_STARTED, dns_probe_status_); @@ -187,7 +187,7 @@ void NetErrorTabHelper::StartDnsProbe() { } void NetErrorTabHelper::OnDnsProbeFinished(DnsProbeStatus result) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_EQ(chrome_common_net::DNS_PROBE_STARTED, dns_probe_status_); DCHECK(chrome_common_net::DnsProbeStatusIsFinished(result)); diff --git a/chrome/browser/net/net_log_temp_file.cc b/chrome/browser/net/net_log_temp_file.cc index 35a170f..0d2400f 100644 --- a/chrome/browser/net/net_log_temp_file.cc +++ b/chrome/browser/net/net_log_temp_file.cc @@ -27,7 +27,7 @@ NetLogTempFile::~NetLogTempFile() { } void NetLogTempFile::ProcessCommand(Command command) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); if (!EnsureInit()) return; @@ -51,7 +51,7 @@ void NetLogTempFile::ProcessCommand(Command command) { } base::DictionaryValue* NetLogTempFile::GetState() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); base::DictionaryValue* dict = new base::DictionaryValue; EnsureInit(); @@ -110,7 +110,7 @@ net::NetLogCaptureMode NetLogTempFile::GetCaptureModeForLogType( } bool NetLogTempFile::EnsureInit() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); if (state_ != STATE_UNINITIALIZED) return true; @@ -127,7 +127,7 @@ bool NetLogTempFile::EnsureInit() { } void NetLogTempFile::StartNetLog(LogType log_type) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); if (state_ == STATE_LOGGING) return; @@ -152,7 +152,7 @@ void NetLogTempFile::StartNetLog(LogType log_type) { } void NetLogTempFile::StopNetLog() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); if (state_ != STATE_LOGGING) return; @@ -162,7 +162,7 @@ void NetLogTempFile::StopNetLog() { } bool NetLogTempFile::GetFilePath(base::FilePath* path) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); if (log_type_ == LOG_TYPE_NONE || state_ == STATE_LOGGING) return false; @@ -181,7 +181,7 @@ bool NetLogTempFile::GetFilePath(base::FilePath* path) { } bool NetLogTempFile::GetNetExportLog() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); base::FilePath temp_dir; if (!GetNetExportLogDirectory(&temp_dir)) return false; @@ -191,12 +191,12 @@ bool NetLogTempFile::GetNetExportLog() { } bool NetLogTempFile::GetNetExportLogDirectory(base::FilePath* path) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); return base::GetTempDir(path); } bool NetLogTempFile::NetExportLogExists() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING)); + DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING); DCHECK(!log_path_.empty()); return base::PathExists(log_path_); } diff --git a/chrome/browser/net/net_pref_observer.cc b/chrome/browser/net/net_pref_observer.cc index 8027bdb..09c36d3 100644 --- a/chrome/browser/net/net_pref_observer.cc +++ b/chrome/browser/net/net_pref_observer.cc @@ -15,7 +15,7 @@ using content::BrowserThread; NetPrefObserver::NetPrefObserver(PrefService* prefs) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(prefs); base::Closure prefs_callback = base::Bind(&NetPrefObserver::ApplySettings, @@ -26,11 +26,11 @@ NetPrefObserver::NetPrefObserver(PrefService* prefs) { } NetPrefObserver::~NetPrefObserver() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); } void NetPrefObserver::ApplySettings() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (spdy_disabled_.IsManaged()) net::HttpStreamFactory::set_spdy_enabled(!*spdy_disabled_); diff --git a/chrome/browser/net/nss_context.cc b/chrome/browser/net/nss_context.cc index 1aad384..4e480677 100644 --- a/chrome/browser/net/nss_context.cc +++ b/chrome/browser/net/nss_context.cc @@ -18,7 +18,7 @@ void DidGetCertDBOnIOThread( scoped_refptr<base::MessageLoopProxy> response_message_loop, const base::Callback<void(net::NSSCertDatabase*)>& callback, net::NSSCertDatabase* cert_db) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); response_message_loop->PostTask(FROM_HERE, base::Bind(callback, cert_db)); } @@ -28,7 +28,7 @@ void GetCertDBOnIOThread( content::ResourceContext* context, scoped_refptr<base::MessageLoopProxy> response_message_loop, const base::Callback<void(net::NSSCertDatabase*)>& callback) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); // Note that the callback will be used only if the cert database hasn't yet // been initialized. @@ -45,7 +45,7 @@ void GetCertDBOnIOThread( void GetNSSCertDatabaseForProfile( Profile* profile, const base::Callback<void(net::NSSCertDatabase*)>& callback) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, diff --git a/chrome/browser/net/nss_context_chromeos.cc b/chrome/browser/net/nss_context_chromeos.cc index 414d196..d68f02d 100644 --- a/chrome/browser/net/nss_context_chromeos.cc +++ b/chrome/browser/net/nss_context_chromeos.cc @@ -21,7 +21,7 @@ class NSSCertDatabaseChromeOSManager : public base::SupportsUserData::Data { GetNSSCertDatabaseCallback; explicit NSSCertDatabaseChromeOSManager(const std::string& username_hash) : username_hash_(username_hash), weak_ptr_factory_(this) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); crypto::ScopedPK11Slot private_slot(crypto::GetPrivateSlotForChromeOSUser( username_hash, base::Bind(&NSSCertDatabaseChromeOSManager::DidGetPrivateSlot, @@ -31,12 +31,12 @@ class NSSCertDatabaseChromeOSManager : public base::SupportsUserData::Data { } ~NSSCertDatabaseChromeOSManager() override { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); } net::NSSCertDatabaseChromeOS* GetNSSCertDatabase( const GetNSSCertDatabaseCallback& callback) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); if (nss_cert_database_) return nss_cert_database_.get(); @@ -49,7 +49,7 @@ class NSSCertDatabaseChromeOSManager : public base::SupportsUserData::Data { typedef std::vector<GetNSSCertDatabaseCallback> ReadyCallbackList; void DidGetPrivateSlot(crypto::ScopedPK11Slot private_slot) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); nss_cert_database_.reset(new net::NSSCertDatabaseChromeOS( crypto::GetPublicSlotForChromeOSUser(username_hash_), private_slot.Pass())); @@ -79,7 +79,7 @@ net::NSSCertDatabaseChromeOS* GetNSSCertDatabaseChromeOS( content::ResourceContext* context, const NSSCertDatabaseChromeOSManager::GetNSSCertDatabaseCallback& callback) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); NSSCertDatabaseChromeOSManager* manager = static_cast<NSSCertDatabaseChromeOSManager*>( context->GetUserData(kDatabaseManagerKey)); @@ -116,14 +116,14 @@ void SetSystemSlotOfDBForResourceContext(content::ResourceContext* context, crypto::ScopedPK11Slot GetPublicNSSKeySlotForResourceContext( content::ResourceContext* context) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); return crypto::GetPublicSlotForChromeOSUser(GetUsername(context)); } crypto::ScopedPK11Slot GetPrivateNSSKeySlotForResourceContext( content::ResourceContext* context, const base::Callback<void(crypto::ScopedPK11Slot)>& callback) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); return crypto::GetPrivateSlotForChromeOSUser(GetUsername(context), callback); } @@ -136,7 +136,7 @@ net::NSSCertDatabase* GetNSSCertDatabaseForResourceContext( void EnableNSSSystemKeySlotForResourceContext( content::ResourceContext* context) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); base::Callback<void(crypto::ScopedPK11Slot)> callback = base::Bind(&SetSystemSlotOfDBForResourceContext, context); crypto::ScopedPK11Slot system_slot = crypto::GetSystemNSSKeySlot(callback); diff --git a/chrome/browser/net/nss_context_linux.cc b/chrome/browser/net/nss_context_linux.cc index 9021a90..8e61715 100644 --- a/chrome/browser/net/nss_context_linux.cc +++ b/chrome/browser/net/nss_context_linux.cc @@ -14,14 +14,14 @@ net::NSSCertDatabase* g_nss_cert_database = NULL; crypto::ScopedPK11Slot GetPublicNSSKeySlotForResourceContext( content::ResourceContext* context) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); return crypto::ScopedPK11Slot(crypto::GetPersistentNSSKeySlot()); } crypto::ScopedPK11Slot GetPrivateNSSKeySlotForResourceContext( content::ResourceContext* context, const base::Callback<void(crypto::ScopedPK11Slot)>& callback) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); return crypto::ScopedPK11Slot(crypto::GetPersistentNSSKeySlot()); } diff --git a/chrome/browser/net/prediction_options.cc b/chrome/browser/net/prediction_options.cc index a63c5d6b..5e45788 100644 --- a/chrome/browser/net/prediction_options.cc +++ b/chrome/browser/net/prediction_options.cc @@ -68,28 +68,28 @@ void MigrateNetworkPredictionUserPrefs(PrefService* pref_service) { } bool CanPrefetchAndPrerenderIO(ProfileIOData* profile_io_data) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(profile_io_data); return CanPrefetchAndPrerender( profile_io_data->network_prediction_options()->GetValue()); } bool CanPrefetchAndPrerenderUI(PrefService* prefs) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(prefs); return CanPrefetchAndPrerender( prefs->GetInteger(prefs::kNetworkPredictionOptions)); } bool CanPreresolveAndPreconnectIO(ProfileIOData* profile_io_data) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(profile_io_data); return CanPreresolveAndPreconnect( profile_io_data->network_prediction_options()->GetValue()); } bool CanPreresolveAndPreconnectUI(PrefService* prefs) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(prefs); return CanPreresolveAndPreconnect( prefs->GetInteger(prefs::kNetworkPredictionOptions)); diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc index 539bf89..8d51f3f 100644 --- a/chrome/browser/net/predictor.cc +++ b/chrome/browser/net/predictor.cc @@ -156,7 +156,7 @@ Predictor::Predictor(bool preconnect_enabled, bool predictor_enabled) next_trim_time_(base::TimeTicks::Now() + TimeDelta::FromHours(kDurationBetweenTrimmingsHours)), observer_(NULL) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); } Predictor::~Predictor() { @@ -187,7 +187,7 @@ void Predictor::InitNetworkPredictor(PrefService* user_prefs, IOThread* io_thread, net::URLRequestContextGetter* getter, ProfileIOData* profile_io_data) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); user_prefs_ = user_prefs; url_request_context_getter_ = getter; @@ -217,7 +217,7 @@ void Predictor::InitNetworkPredictor(PrefService* user_prefs, } void Predictor::AnticipateOmniboxUrl(const GURL& url, bool preconnectable) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (!predictor_enabled_) return; if (!url.is_valid() || !url.has_host()) @@ -311,7 +311,7 @@ void Predictor::PreconnectUrlAndSubresources(const GURL& url, UrlList Predictor::GetPredictedUrlListAtStartup( PrefService* user_prefs, PrefService* local_state) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); UrlList urls; // Recall list of URLs we learned about during last session. // This may catch secondary hostnames, pulled in by the homepages. It will @@ -365,17 +365,17 @@ UrlList Predictor::GetPredictedUrlListAtStartup( } void Predictor::set_max_queueing_delay(int max_queueing_delay_ms) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); g_max_queueing_delay_ms = max_queueing_delay_ms; } void Predictor::set_max_parallel_resolves(size_t max_parallel_resolves) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); g_max_parallel_resolves = max_parallel_resolves; } void Predictor::ShutdownOnUIThread() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, @@ -387,7 +387,7 @@ void Predictor::ShutdownOnUIThread() { // --------------------- Start IO methods. ------------------------------------ void Predictor::Shutdown() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(!shutdown_); shutdown_ = true; @@ -395,7 +395,7 @@ void Predictor::Shutdown() { } void Predictor::DiscardAllResults() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); // Delete anything listed so far in this session that shows in about:dns. referrers_.clear(); @@ -436,7 +436,7 @@ void Predictor::DiscardAllResults() { // Overloaded Resolve() to take a vector of names. void Predictor::ResolveList(const UrlList& urls, UrlInfo::ResolutionMotivation motivation) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); for (UrlList::const_iterator it = urls.begin(); it < urls.end(); ++it) { AppendToResolutionQueue(*it, motivation); @@ -447,7 +447,7 @@ void Predictor::ResolveList(const UrlList& urls, // to the queue. void Predictor::Resolve(const GURL& url, UrlInfo::ResolutionMotivation motivation) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (!url.has_host()) return; AppendToResolutionQueue(url, motivation); @@ -455,7 +455,7 @@ void Predictor::Resolve(const GURL& url, void Predictor::LearnFromNavigation(const GURL& referring_url, const GURL& target_url) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (!predictor_enabled_ || !CanPreresolveAndPreconnect()) return; DCHECK_EQ(referring_url, Predictor::CanonicalizeUrl(referring_url)); @@ -473,7 +473,7 @@ void Predictor::LearnFromNavigation(const GURL& referring_url, void Predictor::PredictorGetHtmlInfo(Predictor* predictor, std::string* output) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); output->append("<html><head><title>About DNS</title>" // We'd like the following no-cache... but it doesn't work. @@ -512,7 +512,7 @@ struct RightToLeftStringSorter { }; void Predictor::GetHtmlReferrerLists(std::string* output) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (referrers_.empty()) return; @@ -565,7 +565,7 @@ void Predictor::GetHtmlReferrerLists(std::string* output) { } void Predictor::GetHtmlInfo(std::string* output) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (initial_observer_.get()) initial_observer_->GetFirstResolutionsHtml(output); // Show list of subresource predictions and stats. @@ -607,7 +607,7 @@ void Predictor::GetHtmlInfo(std::string* output) { } void Predictor::TrimReferrersNow() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); // Just finish up work if an incremental trim is in progress. if (urls_being_trimmed_.empty()) LoadUrlsForTrimming(); @@ -615,7 +615,7 @@ void Predictor::TrimReferrersNow() { } void Predictor::SerializeReferrers(base::ListValue* referral_list) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); referral_list->Clear(); referral_list->Append(new base::FundamentalValue(kPredictorReferrerVersion)); for (Referrers::const_iterator it = referrers_.begin(); @@ -633,7 +633,7 @@ void Predictor::SerializeReferrers(base::ListValue* referral_list) { } void Predictor::DeserializeReferrers(const base::ListValue& referral_list) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); int format_version = -1; if (referral_list.GetSize() > 0 && referral_list.GetInteger(0, &format_version) && @@ -668,7 +668,7 @@ void Predictor::DeserializeReferrersThenDelete( } void Predictor::DiscardInitialNavigationHistory() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (initial_observer_.get()) initial_observer_->DiscardInitialNavigationHistory(); } @@ -678,7 +678,7 @@ void Predictor::FinalizeInitializationOnIOThread( base::ListValue* referral_list, IOThread* io_thread, ProfileIOData* profile_io_data) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); profile_io_data_ = profile_io_data; initial_observer_.reset(new InitialObserver()); @@ -711,7 +711,7 @@ void Predictor::FinalizeInitializationOnIOThread( //----------------------------------------------------------------------------- void Predictor::LearnAboutInitialNavigation(const GURL& url) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (!predictor_enabled_ || NULL == initial_observer_.get() || !CanPreresolveAndPreconnect()) { return; @@ -733,7 +733,7 @@ void Predictor::DnsPrefetchList(const NameList& hostnames) { urls.push_back(GURL("http://" + *it + ":80")); } - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); DnsPrefetchMotivatedList(urls, UrlInfo::PAGE_SCAN_MOTIVATED); } @@ -767,7 +767,7 @@ static void SaveDnsPrefetchStateForNextStartupAndTrimOnIOThread( base::ListValue* referral_list, base::WaitableEvent* completion, Predictor* predictor) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (NULL == predictor) { completion->Signal(); @@ -821,7 +821,7 @@ void Predictor::SaveDnsPrefetchStateForNextStartupAndTrim( base::ListValue* startup_list, base::ListValue* referral_list, base::WaitableEvent* completion) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (initial_observer_.get()) initial_observer_->GetInitialDnsResolutionList(startup_list); @@ -900,7 +900,7 @@ bool Predictor::CanPrefetchAndPrerender() const { if (BrowserThread::CurrentlyOn(BrowserThread::UI)) { return chrome_browser_net::CanPrefetchAndPrerenderUI(user_prefs_); } else { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); return chrome_browser_net::CanPrefetchAndPrerenderIO(profile_io_data_); } } @@ -909,7 +909,7 @@ bool Predictor::CanPreresolveAndPreconnect() const { if (BrowserThread::CurrentlyOn(BrowserThread::UI)) { return chrome_browser_net::CanPreresolveAndPreconnectUI(user_prefs_); } else { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); return chrome_browser_net::CanPreresolveAndPreconnectIO(profile_io_data_); } } @@ -927,7 +927,7 @@ void Predictor::PrepareFrameSubresources(const GURL& original_url, // subresources. GURL url = GetHSTSRedirectOnIOThread(original_url); - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_EQ(url.GetWithEmptyPath(), url); Referrers::iterator it = referrers_.find(url); if (referrers_.end() == it) { @@ -980,7 +980,7 @@ void Predictor::PrepareFrameSubresources(const GURL& original_url, void Predictor::OnLookupFinished(LookupRequest* request, const GURL& url, bool found) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); LookupFinished(request, url, found); pending_lookups_.erase(request); @@ -991,7 +991,7 @@ void Predictor::OnLookupFinished(LookupRequest* request, const GURL& url, void Predictor::LookupFinished(LookupRequest* request, const GURL& url, bool found) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); UrlInfo* info = &results_[url]; DCHECK(info->HasUrl(url)); if (info->is_marked_to_delete()) { @@ -1018,7 +1018,7 @@ bool Predictor::WouldLikelyProxyURL(const GURL& url) { UrlInfo* Predictor::AppendToResolutionQueue( const GURL& url, UrlInfo::ResolutionMotivation motivation) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(url.has_host()); if (shutdown_) @@ -1057,7 +1057,7 @@ UrlInfo* Predictor::AppendToResolutionQueue( } bool Predictor::CongestionControlPerformed(UrlInfo* info) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); // Note: queue_duration is ONLY valid after we go to assigned state. if (info->queue_duration() < max_dns_queue_delay_) return false; @@ -1075,7 +1075,7 @@ bool Predictor::CongestionControlPerformed(UrlInfo* info) { } void Predictor::StartSomeQueuedResolutions() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); while (!work_queue_.IsEmpty() && pending_lookups_.size() < max_concurrent_dns_lookups_) { @@ -1116,7 +1116,7 @@ void Predictor::StartSomeQueuedResolutions() { } void Predictor::TrimReferrers() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (!urls_being_trimmed_.empty()) return; // There is incremental trimming in progress already. @@ -1166,7 +1166,7 @@ void Predictor::IncrementalTrimReferrers(bool trim_all_now) { } GURL Predictor::GetHSTSRedirectOnIOThread(const GURL& url) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (!transport_security_state_) return url; @@ -1230,7 +1230,7 @@ Predictor::InitialObserver::~InitialObserver() { void Predictor::InitialObserver::Append(const GURL& url, Predictor* predictor) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); // TODO(rlp): Do we really need the predictor check here? if (NULL == predictor) @@ -1246,7 +1246,7 @@ void Predictor::InitialObserver::Append(const GURL& url, void Predictor::InitialObserver::GetInitialDnsResolutionList( base::ListValue* startup_list) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(startup_list); startup_list->Clear(); DCHECK_EQ(0u, startup_list->GetSize()); @@ -1262,7 +1262,7 @@ void Predictor::InitialObserver::GetInitialDnsResolutionList( void Predictor::InitialObserver::GetFirstResolutionsHtml( std::string* output) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); UrlInfo::UrlInfoTable resolution_list; { diff --git a/chrome/browser/net/predictor_browsertest.cc b/chrome/browser/net/predictor_browsertest.cc index c0ff959..345b4ec 100644 --- a/chrome/browser/net/predictor_browsertest.cc +++ b/chrome/browser/net/predictor_browsertest.cc @@ -64,14 +64,14 @@ class HostResolutionRequestRecorder : public net::HostResolverProc { } bool HasHostBeenRequested(const std::string& hostname) const { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); return std::find(requested_hostnames_.begin(), requested_hostnames_.end(), hostname) != requested_hostnames_.end(); } void WaitUntilHostHasBeenRequested(const std::string& hostname) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!is_waiting_for_hostname_); if (HasHostBeenRequested(hostname)) return; @@ -84,7 +84,7 @@ class HostResolutionRequestRecorder : public net::HostResolverProc { ~HostResolutionRequestRecorder() override {} void AddToHistory(const std::string& hostname) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); requested_hostnames_.push_back(hostname); if (is_waiting_for_hostname_ && waiting_for_hostname_ == hostname) { is_waiting_for_hostname_ = false; diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl.cc b/chrome/browser/net/pref_proxy_config_tracker_impl.cc index 61ae371..b7d0d3a 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); diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc index a50e520..96293f8 100644 --- a/chrome/browser/net/proxy_service_factory.cc +++ b/chrome/browser/net/proxy_service_factory.cc @@ -43,7 +43,7 @@ net::ProxyConfigService* ProxyServiceFactory::CreateProxyConfigService( PrefProxyConfigTracker* tracker) { // The linux gconf-based proxy settings getter relies on being initialized // from the UI thread. - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); scoped_ptr<net::ProxyConfigService> base_service; @@ -99,7 +99,7 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService( net::ProxyConfigService* proxy_config_service, const base::CommandLine& command_line, bool quick_check_enabled) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); #if defined(OS_IOS) bool use_v8 = false; #else diff --git a/chrome/browser/net/sdch_browsertest.cc b/chrome/browser/net/sdch_browsertest.cc index a3748af..591ad3a 100644 --- a/chrome/browser/net/sdch_browsertest.cc +++ b/chrome/browser/net/sdch_browsertest.cc @@ -534,7 +534,7 @@ class SdchBrowserTest : public InProcessBrowserTest, private: static void NukeSdchDictionariesOnIOThread( net::URLRequestContextGetter* context_getter) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); net::SdchManager* sdch_manager = context_getter->GetURLRequestContext()->sdch_manager(); DCHECK(sdch_manager); @@ -544,7 +544,7 @@ class SdchBrowserTest : public InProcessBrowserTest, void GetNumberOfDictionaryFetchesOnIOThread( net::URLRequestContextGetter* context_getter, int* result) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); net::SdchManager* manager( context_getter->GetURLRequestContext()->sdch_manager()); @@ -591,7 +591,7 @@ class SdchBrowserTest : public InProcessBrowserTest, void SubscribeToSdchNotifications( net::URLRequestContextGetter* context_getter) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); net::SdchManager* manager = context_getter->GetURLRequestContext()->sdch_manager(); @@ -602,7 +602,7 @@ class SdchBrowserTest : public InProcessBrowserTest, } void UnsubscribeFromAllSdchNotifications() { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); for (auto it = fetch_counts_.begin(); it != fetch_counts_.end(); ++it) it->first->RemoveObserver(this); @@ -617,7 +617,7 @@ class SdchBrowserTest : public InProcessBrowserTest, void OnGetDictionary(net::SdchManager* manager, const GURL& request_url, const GURL& dictionary_url) override { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DLOG(ERROR) << "Retrieving count of notifications from manager " << manager; DCHECK(fetch_counts_.end() != fetch_counts_.find(manager)); ++fetch_counts_[manager]; diff --git a/chrome/browser/net/ssl_config_service_manager_pref.cc b/chrome/browser/net/ssl_config_service_manager_pref.cc index 500c644..fc2b1a2 100644 --- a/chrome/browser/net/ssl_config_service_manager_pref.cc +++ b/chrome/browser/net/ssl_config_service_manager_pref.cc @@ -242,7 +242,7 @@ net::SSLConfigService* SSLConfigServiceManagerPref::Get() { void SSLConfigServiceManagerPref::OnPreferenceChanged( PrefService* prefs, const std::string& pref_name_in) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(prefs); if (pref_name_in == prefs::kCipherSuiteBlacklist) OnDisabledCipherSuitesChange(prefs); diff --git a/chrome/browser/net/url_request_mock_util.cc b/chrome/browser/net/url_request_mock_util.cc index 8b6f080..7c0d96f 100644 --- a/chrome/browser/net/url_request_mock_util.cc +++ b/chrome/browser/net/url_request_mock_util.cc @@ -22,7 +22,7 @@ namespace chrome_browser_net { void SetUrlRequestMocksEnabled(bool enabled) { // Since this involves changing the net::URLRequest ProtocolFactory, we need // to run on the IO thread. - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + DCHECK_CURRENTLY_ON(BrowserThread::IO); if (enabled) { // We have to look around for our helper files, but we only use |