| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |