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

Unified Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc

Issue 2882513005: Propagate opener to BackgroundsContents. (Closed)
Patch Set: Tweaked the comment in DriveWebContentsManager::ShouldCreateWebContents Created 3 years, 6 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/page_load_metrics/metrics_web_contents_observer.cc
diff --git a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
index 044495e8c15477c6feb9d26f3b8e58b564fdebe0..d56e391d04b3dcc5e53741f207c8f6d068abdabc 100644
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
@@ -178,11 +178,10 @@ void MetricsWebContentsObserver::WillStartNavigationRequest(
// WebContent's opener. This is more accurate than using referrers due to
// referrer sanitizing and origin referrers. Note that this could potentially
// be inaccurate if the opener has since navigated.
- content::WebContents* opener = web_contents()->GetOpener();
- const GURL& opener_url =
- !has_navigated_ && opener
- ? web_contents()->GetOpener()->GetLastCommittedURL()
- : GURL::EmptyGURL();
+ content::RenderFrameHost* opener = web_contents()->GetOpener();
+ const GURL& opener_url = !has_navigated_ && opener
+ ? opener->GetLastCommittedURL()
+ : GURL::EmptyGURL();
const GURL& currently_committed_url =
committed_load_ ? committed_load_->url() : opener_url;
has_navigated_ = true;
« no previous file with comments | « chrome/browser/extensions/app_background_page_apitest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698