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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 1000373002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[f-p]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 years, 9 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 | « content/browser/indexed_db/indexed_db_quota_client.cc ('k') | content/browser/loader/resource_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 29a99dd23a1953fee72cc49aaa08b29606691ace..61e458d5a7c4d8a7165d50b85d15f440c4dc6674 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -405,7 +405,7 @@ void LogResourceRequestTimeOnUI(
int render_process_id,
int render_frame_id,
const GURL& url) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
RenderFrameHostImpl* host =
RenderFrameHostImpl::FromID(render_process_id, render_frame_id);
if (host != NULL) {
@@ -436,7 +436,7 @@ ResourceDispatcherHostImpl::ResourceDispatcherHostImpl()
filter_(NULL),
delegate_(NULL),
allow_cross_origin_auth_prompt_(false) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!g_resource_dispatcher_host);
g_resource_dispatcher_host = this;
@@ -498,7 +498,7 @@ void ResourceDispatcherHostImpl::ResumeResponseDeferredAtStart(
void ResourceDispatcherHostImpl::CancelRequestsForContext(
ResourceContext* context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(context);
CHECK(ContainsKey(active_resource_contexts_, context));
@@ -692,7 +692,7 @@ void ResourceDispatcherHostImpl::ClearLoginDelegateForRequest(
}
void ResourceDispatcherHostImpl::Shutdown() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
BrowserThread::PostTask(BrowserThread::IO,
FROM_HERE,
base::Bind(&ResourceDispatcherHostImpl::OnShutdown,
@@ -903,7 +903,7 @@ void ResourceDispatcherHostImpl::OnInit() {
}
void ResourceDispatcherHostImpl::OnShutdown() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
is_shutdown_ = true;
pending_loaders_.clear();
@@ -2135,7 +2135,7 @@ void ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread(
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"466285 ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread"));
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
for (const auto& load_info : *info_map) {
RenderViewHostImpl* view = RenderViewHostImpl::FromID(
load_info.first.child_id, load_info.first.route_id);
@@ -2203,7 +2203,7 @@ void ResourceDispatcherHostImpl::UpdateLoadInfo() {
void ResourceDispatcherHostImpl::BlockRequestsForRoute(int child_id,
int route_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
GlobalRoutingID key(child_id, route_id);
DCHECK(blocked_loaders_map_.find(key) == blocked_loaders_map_.end()) <<
"BlockRequestsForRoute called multiple time for the same RVH";
@@ -2281,7 +2281,7 @@ bool ResourceDispatcherHostImpl::IsTransferredNavigation(
ResourceLoader* ResourceDispatcherHostImpl::GetLoader(
const GlobalRequestID& id) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
LoaderMap::const_iterator i = pending_loaders_.find(id);
if (i == pending_loaders_.end())
« no previous file with comments | « content/browser/indexed_db/indexed_db_quota_client.cc ('k') | content/browser/loader/resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698