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

Unified Diff: chrome/browser/search/instant_io_context.cc

Issue 1106593002: [chrome/browser/se*-ss*] 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/search/hotword_service.cc ('k') | chrome/browser/search/suggestions/image_fetcher_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/instant_io_context.cc
diff --git a/chrome/browser/search/instant_io_context.cc b/chrome/browser/search/instant_io_context.cc
index 6ba12551aecbdafef672b7193026a158babb5bf6..777f16fa58170cbe44952ae1d72d89d75aaf5e9b 100644
--- a/chrome/browser/search/instant_io_context.cc
+++ b/chrome/browser/search/instant_io_context.cc
@@ -17,7 +17,7 @@ namespace {
// Retrieves the Instant data from the |context|'s named user-data.
InstantIOContext* GetDataForResourceContext(
content::ResourceContext* context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
return base::UserDataAdapter<InstantIOContext>::Get(
context, InstantIOContext::kInstantIOContextKeyName);
}
@@ -38,7 +38,7 @@ const char InstantIOContext::kInstantIOContextKeyName[] = "instant_io_context";
InstantIOContext::InstantIOContext() {
// The InstantIOContext is created on the UI thread but is accessed
// on the IO thread.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
InstantIOContext::~InstantIOContext() {
@@ -57,21 +57,21 @@ void InstantIOContext::SetUserDataOnIO(
void InstantIOContext::AddInstantProcessOnIO(
scoped_refptr<InstantIOContext> instant_io_context,
int process_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
instant_io_context->process_ids_.insert(process_id);
}
// static
void InstantIOContext::RemoveInstantProcessOnIO(
scoped_refptr<InstantIOContext> instant_io_context, int process_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
instant_io_context->process_ids_.erase(process_id);
}
// static
void InstantIOContext::ClearInstantProcessesOnIO(
scoped_refptr<InstantIOContext> instant_io_context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
instant_io_context->process_ids_.clear();
}
@@ -95,6 +95,6 @@ bool InstantIOContext::ShouldServiceRequest(const net::URLRequest* request) {
}
bool InstantIOContext::IsInstantProcess(int process_id) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
return process_ids_.find(process_id) != process_ids_.end();
}
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/search/suggestions/image_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698