OLD | NEW |
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 Loading... |
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 |
OLD | NEW |