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

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

Issue 10993064: Make using WebContentsUserData simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 | Annotate | Revision Log
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 "content/public/browser/navigation_details.h" 8 #include "content/public/browser/navigation_details.h"
9 #include "content/public/browser/navigation_entry.h" 9 #include "content/public/browser/navigation_entry.h"
10 10
11 int NavigationMetricsRecorder::kUserDataKey; 11 DEFINE_WEB_CONTENTS_USER_DATA_KEY(NavigationMetricsRecorder)
12 12
13 namespace { 13 namespace {
14 14
15 enum Scheme { 15 enum Scheme {
16 SCHEME_UNKNOWN, 16 SCHEME_UNKNOWN,
17 SCHEME_HTTP, 17 SCHEME_HTTP,
18 SCHEME_HTTPS, 18 SCHEME_HTTPS,
19 SCHEME_FILE, 19 SCHEME_FILE,
20 SCHEME_FTP, 20 SCHEME_FTP,
21 SCHEME_DATA, 21 SCHEME_DATA,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 NavigationMetricsRecorder::~NavigationMetricsRecorder() { 64 NavigationMetricsRecorder::~NavigationMetricsRecorder() {
65 } 65 }
66 66
67 void NavigationMetricsRecorder::DidNavigateMainFrame( 67 void NavigationMetricsRecorder::DidNavigateMainFrame(
68 const content::LoadCommittedDetails& details, 68 const content::LoadCommittedDetails& details,
69 const content::FrameNavigateParams& params) { 69 const content::FrameNavigateParams& params) {
70 RecordMainFrameNavigation(details); 70 RecordMainFrameNavigation(details);
71 } 71 }
72 72
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698