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

Side by Side Diff: chrome/browser/page_load_metrics/page_load_metrics_initialize.cc

Issue 2894973002: Provide WebContents::CreateParams to tab helpers. (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" 5 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" 9 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h"
10 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 Profile* profile = 146 Profile* profile =
147 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 147 Profile::FromBrowserContext(web_contents_->GetBrowserContext());
148 if (!profile) 148 if (!profile)
149 return false; 149 return false;
150 return search::IsInstantNTPURL(url, profile); 150 return search::IsInstantNTPURL(url, profile);
151 } 151 }
152 152
153 } // namespace 153 } // namespace
154 154
155 void InitializePageLoadMetricsForWebContents( 155 void InitializePageLoadMetricsForWebContents(
156 content::WebContents* web_contents) { 156 content::WebContents* web_contents,
157 const base::Optional<content::WebContents::CreateParams>& create_params) {
157 page_load_metrics::MetricsWebContentsObserver::CreateForWebContents( 158 page_load_metrics::MetricsWebContentsObserver::CreateForWebContents(
158 web_contents, base::MakeUnique<PageLoadMetricsEmbedder>(web_contents)); 159 web_contents, create_params,
160 base::MakeUnique<PageLoadMetricsEmbedder>(web_contents));
159 } 161 }
160 162
161 } // namespace chrome 163 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/page_load_metrics/page_load_metrics_initialize.h ('k') | chrome/browser/prerender/prerender_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698