| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // Returns the key used in url_blacklist_ for the passed |url|. | 81 // Returns the key used in url_blacklist_ for the passed |url|. |
| 82 std::string GetDictionaryKeyForURL(const std::string& url); | 82 std::string GetDictionaryKeyForURL(const std::string& url); |
| 83 | 83 |
| 84 // Sends pages_value_ to the javascript side to and resets page_value_. | 84 // Sends pages_value_ to the javascript side to and resets page_value_. |
| 85 void SendPagesValue(); | 85 void SendPagesValue(); |
| 86 | 86 |
| 87 content::NotificationRegistrar registrar_; | 87 content::NotificationRegistrar registrar_; |
| 88 | 88 |
| 89 // Our consumer for the history service. | 89 // Our consumer for the history service. |
| 90 CancelableRequestConsumerTSimple<PageUsageData*> cancelable_consumer_; | |
| 91 CancelableRequestConsumer topsites_consumer_; | 90 CancelableRequestConsumer topsites_consumer_; |
| 92 | 91 |
| 93 // The most visited URLs, in priority order. | 92 // The most visited URLs, in priority order. |
| 94 // Only used for matching up clicks on the page to which most visited entry | 93 // Only used for matching up clicks on the page to which most visited entry |
| 95 // was clicked on for metrics purposes. | 94 // was clicked on for metrics purposes. |
| 96 std::vector<GURL> most_visited_urls_; | 95 std::vector<GURL> most_visited_urls_; |
| 97 | 96 |
| 98 // We pre-fetch the first set of result pages. This variable is false until | 97 // We pre-fetch the first set of result pages. This variable is false until |
| 99 // we get the first getMostVisited() call. | 98 // we get the first getMostVisited() call. |
| 100 bool got_first_most_visited_request_; | 99 bool got_first_most_visited_request_; |
| 101 | 100 |
| 102 // Keep the results of the db query here. | 101 // Keep the results of the db query here. |
| 103 scoped_ptr<base::ListValue> pages_value_; | 102 scoped_ptr<base::ListValue> pages_value_; |
| 104 | 103 |
| 105 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); | 104 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ | 107 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ |
| OLD | NEW |