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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2321083002: [NoStatePrefetch] Add performance histograms. (Closed)
Patch Set: Review comments Created 4 years, 3 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 71fb48b244cb8e6fee0f474832a27def252e25e0..5db64a048332d98d5b99d917ce1bebf3693fafa5 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1243,10 +1243,9 @@ bool ChromeContentBrowserClient::MayReuseHost(
// If there is currently a prerender in progress for the host provided,
// it may not be shared. We require prerenders to be by themselves in a
// separate process so that we can monitor their resource usage.
- Profile* profile = Profile::FromBrowserContext(
- process_host->GetBrowserContext());
prerender::PrerenderManager* prerender_manager =
- prerender::PrerenderManagerFactory::GetForProfile(profile);
+ prerender::PrerenderManagerFactory::GetForBrowserContext(
+ process_host->GetBrowserContext());
if (prerender_manager &&
!prerender_manager->MayReuseProcessHost(process_host)) {
return false;
@@ -3143,10 +3142,9 @@ void ChromeContentBrowserClient::OverridePageVisibilityState(
WebContents::FromRenderFrameHost(render_frame_host);
DCHECK(web_contents);
- Profile* profile =
- Profile::FromBrowserContext(web_contents->GetBrowserContext());
prerender::PrerenderManager* prerender_manager =
- prerender::PrerenderManagerFactory::GetForProfile(profile);
+ prerender::PrerenderManagerFactory::GetForBrowserContext(
+ web_contents->GetBrowserContext());
if (prerender_manager &&
prerender_manager->IsWebContentsPrerendering(web_contents, nullptr)) {
*visibility_state = blink::WebPageVisibilityStatePrerender;
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | chrome/browser/extensions/activity_log/activity_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698