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

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc

Issue 1006753003: Add time from navigation_start to NTP LogEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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 #include "chrome/browser/ui/webui/ntp/ntp_user_data_logger.h" 5 #include "chrome/browser/ui/webui/ntp/ntp_user_data_logger.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/search/most_visited_iframe_source.h" 10 #include "chrome/browser/search/most_visited_iframe_source.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 number_of_thumbnail_errors_ = 0; 120 number_of_thumbnail_errors_ = 0;
121 UMA_HISTOGRAM_NTP_TILES("NewTabPage.NumberOfGrayTileFallbacks", 121 UMA_HISTOGRAM_NTP_TILES("NewTabPage.NumberOfGrayTileFallbacks",
122 number_of_gray_tile_fallbacks_); 122 number_of_gray_tile_fallbacks_);
123 number_of_gray_tile_fallbacks_ = 0; 123 number_of_gray_tile_fallbacks_ = 0;
124 UMA_HISTOGRAM_NTP_TILES("NewTabPage.NumberOfExternalTileFallbacks", 124 UMA_HISTOGRAM_NTP_TILES("NewTabPage.NumberOfExternalTileFallbacks",
125 number_of_external_tile_fallbacks_); 125 number_of_external_tile_fallbacks_);
126 number_of_external_tile_fallbacks_ = 0; 126 number_of_external_tile_fallbacks_ = 0;
127 } 127 }
128 } 128 }
129 129
130 void NTPUserDataLogger::LogEvent(NTPLoggingEventType event) { 130 void NTPUserDataLogger::LogEvent(NTPLoggingEventType event, uint64 time) {
131 switch (event) { 131 switch (event) {
132 case NTP_SERVER_SIDE_SUGGESTION: 132 case NTP_SERVER_SIDE_SUGGESTION:
133 has_server_side_suggestions_ = true; 133 has_server_side_suggestions_ = true;
134 break; 134 break;
135 case NTP_CLIENT_SIDE_SUGGESTION: 135 case NTP_CLIENT_SIDE_SUGGESTION:
136 // We should never get a mix of server and client side suggestions, 136 // We should never get a mix of server and client side suggestions,
137 // otherwise there could be a race condition depending on the order in 137 // otherwise there could be a race condition depending on the order in
138 // which the iframes call this method. 138 // which the iframes call this method.
139 DCHECK(!has_server_side_suggestions_); 139 DCHECK(!has_server_side_suggestions_);
140 break; 140 break;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 has_server_side_suggestions_(false), 231 has_server_side_suggestions_(false),
232 number_of_tiles_(0), 232 number_of_tiles_(0),
233 number_of_thumbnail_tiles_(0), 233 number_of_thumbnail_tiles_(0),
234 number_of_gray_tiles_(0), 234 number_of_gray_tiles_(0),
235 number_of_external_tiles_(0), 235 number_of_external_tiles_(0),
236 number_of_thumbnail_errors_(0), 236 number_of_thumbnail_errors_(0),
237 number_of_gray_tile_fallbacks_(0), 237 number_of_gray_tile_fallbacks_(0),
238 number_of_external_tile_fallbacks_(0), 238 number_of_external_tile_fallbacks_(0),
239 number_of_mouseovers_(0) { 239 number_of_mouseovers_(0) {
240 } 240 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698