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

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

Issue 1396143002: Emit correct NewTabPage.SuggestionsType metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/ui/search/search_tab_helper_unittest.cc ('k') | chrome/common/instant_types.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 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_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h"
10 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "chrome/common/ntp_logging_events.h" 13 #include "chrome/common/ntp_logging_events.h"
13 #include "content/public/browser/web_contents_observer.h" 14 #include "content/public/browser/web_contents_observer.h"
14 #include "content/public/browser/web_contents_user_data.h" 15 #include "content/public/browser/web_contents_user_data.h"
15 16
16 namespace content { 17 namespace content {
17 class WebContents; 18 class WebContents;
18 } 19 }
19 20
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // content::WebContentsObserver override 57 // content::WebContentsObserver override
57 void NavigationEntryCommitted( 58 void NavigationEntryCommitted(
58 const content::LoadCommittedDetails& load_details) override; 59 const content::LoadCommittedDetails& load_details) override;
59 60
60 protected: 61 protected:
61 explicit NTPUserDataLogger(content::WebContents* contents); 62 explicit NTPUserDataLogger(content::WebContents* contents);
62 63
63 private: 64 private:
64 friend class content::WebContentsUserData<NTPUserDataLogger>; 65 friend class content::WebContentsUserData<NTPUserDataLogger>;
65 66
67 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest,
68 OnMostVisitedItemsChangedFromServer);
69 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest,
70 OnMostVisitedItemsChangedFromClient);
71
66 // True if at least one iframe came from a server-side suggestion. 72 // True if at least one iframe came from a server-side suggestion.
67 bool has_server_side_suggestions_; 73 bool has_server_side_suggestions_;
68 74
69 // True if at least one iframe came from a client-side suggestion. 75 // True if at least one iframe came from a client-side suggestion.
70 bool has_client_side_suggestions_; 76 bool has_client_side_suggestions_;
71 77
72 // Total number of tiles rendered, no matter if it's a thumbnail, a gray tile 78 // Total number of tiles rendered, no matter if it's a thumbnail, a gray tile
73 // or an external tile. 79 // or an external tile.
74 size_t number_of_tiles_; 80 size_t number_of_tiles_;
75 81
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // Are stats being logged during Chrome startup? 115 // Are stats being logged during Chrome startup?
110 bool during_startup_; 116 bool during_startup_;
111 117
112 // The URL of this New Tab Page - varies based on NTP version. 118 // The URL of this New Tab Page - varies based on NTP version.
113 GURL ntp_url_; 119 GURL ntp_url_;
114 120
115 DISALLOW_COPY_AND_ASSIGN(NTPUserDataLogger); 121 DISALLOW_COPY_AND_ASSIGN(NTPUserDataLogger);
116 }; 122 };
117 123
118 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ 124 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper_unittest.cc ('k') | chrome/common/instant_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698