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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 1092223006: [chrome/browser/profiles] 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/profiles/profile_downloader.cc ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index e82ef90fe95e4ceb690678c58367cb17f3f49ecc..827c441ed01908000d7a54ef477667732eb3eabb 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -111,12 +111,12 @@ ProfileImplIOData::Handle::Handle(Profile* profile)
: io_data_(new ProfileImplIOData),
profile_(profile),
initialized_(false) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(profile);
}
ProfileImplIOData::Handle::~Handle() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (io_data_->predictor_ != NULL) {
// io_data_->predictor_ might be NULL if Init() was never called
// (i.e. we shut down before ProfileImpl::DoFinalInit() got called).
@@ -154,7 +154,7 @@ void ProfileImplIOData::Handle::Init(
storage::SpecialStoragePolicy* special_storage_policy,
scoped_ptr<domain_reliability::DomainReliabilityMonitor>
domain_reliability_monitor) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!io_data_->lazy_params_);
DCHECK(predictor);
@@ -207,14 +207,14 @@ void ProfileImplIOData::Handle::Init(
content::ResourceContext*
ProfileImplIOData::Handle::GetResourceContext() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
return GetResourceContextNoInit();
}
content::ResourceContext*
ProfileImplIOData::Handle::GetResourceContextNoInit() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Don't call LazyInitialize here, since the resource context is created at
// the beginning of initalization and is used by some members while they're
// being initialized (i.e. AppCacheService).
@@ -227,7 +227,7 @@ ProfileImplIOData::Handle::CreateMainRequestContextGetter(
content::URLRequestInterceptorScopedVector request_interceptors,
PrefService* local_state,
IOThread* io_thread) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
DCHECK(!main_request_context_getter_.get());
main_request_context_getter_ = ChromeURLRequestContextGetter::Create(
@@ -249,7 +249,7 @@ ProfileImplIOData::Handle::CreateMainRequestContextGetter(
scoped_refptr<ChromeURLRequestContextGetter>
ProfileImplIOData::Handle::GetMediaRequestContextGetter() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
if (!media_request_context_getter_.get()) {
media_request_context_getter_ =
@@ -260,7 +260,7 @@ ProfileImplIOData::Handle::GetMediaRequestContextGetter() const {
scoped_refptr<ChromeURLRequestContextGetter>
ProfileImplIOData::Handle::GetExtensionsRequestContextGetter() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
if (!extensions_request_context_getter_.get()) {
extensions_request_context_getter_ =
@@ -275,7 +275,7 @@ ProfileImplIOData::Handle::CreateIsolatedAppRequestContextGetter(
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Check that the partition_path is not the same as the base profile path. We
// expect isolated partition, which will never go to the default profile path.
CHECK(partition_path != profile_->GetPath());
@@ -309,7 +309,7 @@ scoped_refptr<ChromeURLRequestContextGetter>
ProfileImplIOData::Handle::GetIsolatedMediaRequestContextGetter(
const base::FilePath& partition_path,
bool in_memory) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// We must have a non-default path, or this will act like the default media
// context.
CHECK(partition_path != profile_->GetPath());
@@ -338,14 +338,14 @@ ProfileImplIOData::Handle::GetIsolatedMediaRequestContextGetter(
DevToolsNetworkController*
ProfileImplIOData::Handle::GetDevToolsNetworkController() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return io_data_->network_controller();
}
void ProfileImplIOData::Handle::ClearNetworkingHistorySince(
base::Time time,
const base::Closure& completion) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
BrowserThread::PostTask(
@@ -358,7 +358,7 @@ void ProfileImplIOData::Handle::ClearNetworkingHistorySince(
}
void ProfileImplIOData::Handle::LazyInitialize() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (initialized_)
return;
@@ -807,7 +807,7 @@ ProfileImplIOData::AcquireIsolatedMediaRequestContext(
void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
base::Time time,
const base::Closure& completion) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(initialized());
DCHECK(transport_security_state());
« no previous file with comments | « chrome/browser/profiles/profile_downloader.cc ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698