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

Unified Diff: chrome/browser/prerender/prerender_manager.cc

Issue 1104043002: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/prerender/, prefetch and printing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding files 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
Index: chrome/browser/prerender/prerender_manager.cc
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 0c144f4dc847090615d7490ff3ee6db93076bec3..30fde0f587061809c98e221d689357f384da7b2a 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -194,7 +194,7 @@ PrerenderManager::PrerenderManager(Profile* profile)
// There are some assumptions that the PrerenderManager is on the UI thread.
// Any other checks simply make sure that the PrerenderManager is accessed on
// the same thread that it was created on.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Certain experiments override our default config_ values.
switch (PrerenderManager::GetMode()) {
@@ -555,7 +555,7 @@ void PrerenderManager::RecordPageLoadTimeNotSwappedIn(
Origin origin,
base::TimeDelta page_load_time,
const GURL& url) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
histograms_->RecordPageLoadTimeNotSwappedIn(origin, page_load_time, url);
}
@@ -565,7 +565,7 @@ void PrerenderManager::RecordPerceivedPageLoadTime(
base::TimeDelta perceived_page_load_time,
double fraction_plt_elapsed_at_swap_in,
const GURL& url) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!IsEnabled())
return;
@@ -1265,7 +1265,7 @@ void PrerenderManager::AddProfileNetworkBytesIfEnabled(int64 bytes) {
void PrerenderManager::AddPrerenderProcessHost(
content::RenderProcessHost* process_host) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(prerender_process_hosts_.find(process_host) ==
prerender_process_hosts_.end());
prerender_process_hosts_.insert(process_host);
@@ -1274,7 +1274,7 @@ void PrerenderManager::AddPrerenderProcessHost(
bool PrerenderManager::MayReuseProcessHost(
content::RenderProcessHost* process_host) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Isolate prerender processes to make the resource monitoring check more
// accurate.
return (prerender_process_hosts_.find(process_host) ==
@@ -1283,7 +1283,7 @@ bool PrerenderManager::MayReuseProcessHost(
void PrerenderManager::RenderProcessHostDestroyed(
content::RenderProcessHost* host) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
size_t erased = prerender_process_hosts_.erase(host);
DCHECK_EQ(1u, erased);
}
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698