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

Side by Side Diff: chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc

Issue 2893633003: [PageLoadMetrics] Don't record an ads histogram if the page hasn't committed (Closed)
Patch Set: Address comments from PS2 Created 3 years, 7 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
« no previous file with comments | « chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/observers/page_load_metrics_observer_ test_harness.h" 5 #include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_ test_harness.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 content::RenderFrameHost* render_frame_host = web_contents()->GetMainFrame(); 180 content::RenderFrameHost* render_frame_host = web_contents()->GetMainFrame();
181 observer_->MediaStartedPlaying(video_type, 181 observer_->MediaStartedPlaying(video_type,
182 std::make_pair(render_frame_host, 0)); 182 std::make_pair(render_frame_host, 0));
183 } 183 }
184 184
185 const base::HistogramTester& 185 const base::HistogramTester&
186 PageLoadMetricsObserverTestHarness::histogram_tester() const { 186 PageLoadMetricsObserverTestHarness::histogram_tester() const {
187 return histogram_tester_; 187 return histogram_tester_;
188 } 188 }
189 189
190 MetricsWebContentsObserver* PageLoadMetricsObserverTestHarness::observer()
191 const {
192 return observer_;
193 }
194
190 const PageLoadExtraInfo 195 const PageLoadExtraInfo
191 PageLoadMetricsObserverTestHarness::GetPageLoadExtraInfoForCommittedLoad() { 196 PageLoadMetricsObserverTestHarness::GetPageLoadExtraInfoForCommittedLoad() {
192 return observer_->GetPageLoadExtraInfoForCommittedLoad(); 197 return observer_->GetPageLoadExtraInfoForCommittedLoad();
193 } 198 }
194 199
195 void PageLoadMetricsObserverTestHarness::NavigateWithPageTransitionAndCommit( 200 void PageLoadMetricsObserverTestHarness::NavigateWithPageTransitionAndCommit(
196 const GURL& url, 201 const GURL& url,
197 ui::PageTransition transition) { 202 ui::PageTransition transition) {
198 controller().LoadURL(url, content::Referrer(), transition, std::string()); 203 controller().LoadURL(url, content::Referrer(), transition, std::string());
199 content::WebContentsTester::For(web_contents())->CommitPendingNavigation(); 204 content::WebContentsTester::For(web_contents())->CommitPendingNavigation();
200 } 205 }
201 206
202 } // namespace page_load_metrics 207 } // namespace page_load_metrics
OLDNEW
« no previous file with comments | « chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698