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

Side by Side Diff: chrome/browser/tab_contents/navigation_metrics_recorder.cc

Issue 719733003: Add Navigation.MainFrameSchemeDifferentPage which excludes same-page navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Spacing Created 6 years, 1 month 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 | « no previous file | components/navigation_metrics/navigation_metrics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tab_contents/navigation_metrics_recorder.h" 5 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "components/navigation_metrics/navigation_metrics.h" 8 #include "components/navigation_metrics/navigation_metrics.h"
9 #include "content/public/browser/navigation_details.h" 9 #include "content/public/browser/navigation_details.h"
10 #include "content/public/browser/navigation_entry.h" 10 #include "content/public/browser/navigation_entry.h"
(...skipping 11 matching lines...) Expand all
22 content::WebContents* web_contents) 22 content::WebContents* web_contents)
23 : content::WebContentsObserver(web_contents) { 23 : content::WebContentsObserver(web_contents) {
24 } 24 }
25 25
26 NavigationMetricsRecorder::~NavigationMetricsRecorder() { 26 NavigationMetricsRecorder::~NavigationMetricsRecorder() {
27 } 27 }
28 28
29 void NavigationMetricsRecorder::DidNavigateMainFrame( 29 void NavigationMetricsRecorder::DidNavigateMainFrame(
30 const content::LoadCommittedDetails& details, 30 const content::LoadCommittedDetails& details,
31 const content::FrameNavigateParams& params) { 31 const content::FrameNavigateParams& params) {
32 navigation_metrics::RecordMainFrameNavigation(details.entry->GetVirtualURL()); 32 navigation_metrics::RecordMainFrameNavigation(details.entry->GetVirtualURL(),
33 details.is_in_page);
33 } 34 }
34 35
35 void NavigationMetricsRecorder::DidStartLoading( 36 void NavigationMetricsRecorder::DidStartLoading(
36 content::RenderViewHost* render_view_host) { 37 content::RenderViewHost* render_view_host) {
37 #if defined(OS_WIN) && defined(USE_ASH) 38 #if defined(OS_WIN) && defined(USE_ASH)
38 if (render_view_host && base::win::GetVersion() >= base::win::VERSION_WIN8) { 39 if (render_view_host && base::win::GetVersion() >= base::win::VERSION_WIN8) {
39 content::RenderWidgetHostView* rwhv = render_view_host->GetView(); 40 content::RenderWidgetHostView* rwhv = render_view_host->GetView();
40 if (rwhv) { 41 if (rwhv) {
41 gfx::NativeView native_view = rwhv->GetNativeView(); 42 gfx::NativeView native_view = rwhv->GetNativeView();
42 if (native_view) { 43 if (native_view) {
43 chrome::HostDesktopType desktop = 44 chrome::HostDesktopType desktop =
44 chrome::GetHostDesktopTypeForNativeView(native_view); 45 chrome::GetHostDesktopTypeForNativeView(native_view);
45 UMA_HISTOGRAM_ENUMERATION("Win8.PageLoad", 46 UMA_HISTOGRAM_ENUMERATION("Win8.PageLoad",
46 chrome::GetWin8Environment(desktop), 47 chrome::GetWin8Environment(desktop),
47 chrome::WIN_8_ENVIRONMENT_MAX); 48 chrome::WIN_8_ENVIRONMENT_MAX);
48 } 49 }
49 } 50 }
50 } 51 }
51 #endif 52 #endif
52 } 53 }
53 54
54 55
OLDNEW
« no previous file with comments | « no previous file | components/navigation_metrics/navigation_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698