OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // content::NotificationObserver implementation. | 64 // content::NotificationObserver implementation. |
65 virtual void Observe(int type, | 65 virtual void Observe(int type, |
66 const content::NotificationSource& source, | 66 const content::NotificationSource& source, |
67 const content::NotificationDetails& details) OVERRIDE; | 67 const content::NotificationDetails& details) OVERRIDE; |
68 | 68 |
69 const std::vector<GURL>& most_visited_urls() const { | 69 const std::vector<GURL>& most_visited_urls() const { |
70 return most_visited_urls_; | 70 return most_visited_urls_; |
71 } | 71 } |
72 | 72 |
73 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 73 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
74 | 74 |
75 private: | 75 private: |
76 struct MostVisitedPage; | 76 struct MostVisitedPage; |
77 | 77 |
78 // Send a request to the HistoryService to get the most visited pages. | 78 // Send a request to the HistoryService to get the most visited pages. |
79 void StartQueryForMostVisited(); | 79 void StartQueryForMostVisited(); |
80 | 80 |
81 // Sets pages_value_ from a format produced by TopSites. | 81 // Sets pages_value_ from a format produced by TopSites. |
82 void SetPagesValueFromTopSites(const history::MostVisitedURLList& data); | 82 void SetPagesValueFromTopSites(const history::MostVisitedURLList& data); |
83 | 83 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // Whether the user has viewed the 'most visited' pane. | 117 // Whether the user has viewed the 'most visited' pane. |
118 bool most_visited_viewed_; | 118 bool most_visited_viewed_; |
119 | 119 |
120 // Whether the user has performed a "tracked" action to leave the page or not. | 120 // Whether the user has performed a "tracked" action to leave the page or not. |
121 bool user_action_logged_; | 121 bool user_action_logged_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); | 123 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); |
124 }; | 124 }; |
125 | 125 |
126 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ | 126 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ |
OLD | NEW |