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

Unified Diff: chrome/browser/profiles/off_the_record_profile_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 | « no previous file | chrome/browser/profiles/profile_downloader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index 9cf6632ff9f309dd8f6bbb861ca6bc4e48385615..d5c483355b37d97c21bc9d4e65748db91ceec030 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -48,25 +48,25 @@ OffTheRecordProfileIOData::Handle::Handle(Profile* profile)
: io_data_(new OffTheRecordProfileIOData(profile->GetProfileType())),
profile_(profile),
initialized_(false) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(profile);
}
OffTheRecordProfileIOData::Handle::~Handle() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass());
}
content::ResourceContext*
OffTheRecordProfileIOData::Handle::GetResourceContext() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
return GetResourceContextNoInit();
}
content::ResourceContext*
OffTheRecordProfileIOData::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).
@@ -80,7 +80,7 @@ OffTheRecordProfileIOData::Handle::CreateMainRequestContextGetter(
// TODO(oshima): Re-enable when ChromeOS only accesses the profile on the UI
// thread.
#if !defined(OS_CHROMEOS)
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
#endif // defined(OS_CHROMEOS)
LazyInitialize();
DCHECK(!main_request_context_getter_.get());
@@ -91,7 +91,7 @@ OffTheRecordProfileIOData::Handle::CreateMainRequestContextGetter(
scoped_refptr<ChromeURLRequestContextGetter>
OffTheRecordProfileIOData::Handle::GetExtensionsRequestContextGetter() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
if (!extensions_request_context_getter_.get()) {
extensions_request_context_getter_ =
@@ -104,7 +104,7 @@ scoped_refptr<ChromeURLRequestContextGetter>
OffTheRecordProfileIOData::Handle::GetIsolatedAppRequestContextGetter(
const base::FilePath& partition_path,
bool in_memory) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!partition_path.empty());
LazyInitialize();
@@ -122,7 +122,7 @@ OffTheRecordProfileIOData::Handle::CreateIsolatedAppRequestContextGetter(
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!partition_path.empty());
LazyInitialize();
@@ -149,7 +149,7 @@ OffTheRecordProfileIOData::Handle::CreateIsolatedAppRequestContextGetter(
DevToolsNetworkController*
OffTheRecordProfileIOData::Handle::GetDevToolsNetworkController() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return io_data_->network_controller();
}
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698