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

Side by Side Diff: chrome/browser/android/most_visited_sites.h

Issue 701353004: [Most Visited] Only log impression metrics on initial NTP load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | chrome/browser/android/most_visited_sites.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ 5 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_
6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // The observer to be notified when the list of most visited sites changes. 106 // The observer to be notified when the list of most visited sites changes.
107 base::android::ScopedJavaGlobalRef<jobject> observer_; 107 base::android::ScopedJavaGlobalRef<jobject> observer_;
108 108
109 // The maximum number of most visited sites to return. 109 // The maximum number of most visited sites to return.
110 int num_sites_; 110 int num_sites_;
111 111
112 // Whether the user is in a control group for the purposes of logging. 112 // Whether the user is in a control group for the purposes of logging.
113 bool is_control_group_; 113 bool is_control_group_;
114 114
115 // Keeps track of whether the initial NTP load has been done.
116 bool initial_load_done_;
117
115 // Counters for UMA metrics. 118 // Counters for UMA metrics.
116 119
117 // Number of tiles using a local thumbnail image for this NTP session. 120 // Number of tiles using a local thumbnail image for this NTP session.
118 int num_local_thumbs_; 121 int num_local_thumbs_;
119 // Number of tiles for which a server thumbnail is provided. 122 // Number of tiles for which a server thumbnail is provided.
120 int num_server_thumbs_; 123 int num_server_thumbs_;
121 // Number of tiles for which no thumbnail is found/specified and a gray tile 124 // Number of tiles for which no thumbnail is found/specified and a gray tile
122 // is used as the main tile. 125 // is used as the main tile.
123 int num_empty_thumbs_; 126 int num_empty_thumbs_;
124 127
125 // Copy of the server suggestions (if enabled). Used for logging. 128 // Copy of the server suggestions (if enabled). Used for logging.
126 suggestions::SuggestionsProfile server_suggestions_; 129 suggestions::SuggestionsProfile server_suggestions_;
127 130
128 content::NotificationRegistrar registrar_; 131 content::NotificationRegistrar registrar_;
129 132
130 MostVisitedSource mv_source_; 133 MostVisitedSource mv_source_;
131 134
132 // For callbacks may be run after destruction. 135 // For callbacks may be run after destruction.
133 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; 136 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_;
134 137
135 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); 138 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites);
136 }; 139 };
137 140
138 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ 141 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698