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_ANDROID_MOST_VISITED_SITES_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 | 109 |
110 using SuggestionsVector = std::vector<scoped_ptr<Suggestion>>; | 110 using SuggestionsVector = std::vector<scoped_ptr<Suggestion>>; |
111 | 111 |
112 ~MostVisitedSites() override; | 112 ~MostVisitedSites() override; |
113 void QueryMostVisitedURLs(); | 113 void QueryMostVisitedURLs(); |
114 | 114 |
115 // Initialize the query to Top Sites. Called if the SuggestionsService is not | 115 // Initialize the query to Top Sites. Called if the SuggestionsService is not |
116 // enabled, or if it returns no data. | 116 // enabled, or if it returns no data. |
117 void InitiateTopSitesQuery(); | 117 void InitiateTopSitesQuery(); |
118 | 118 |
119 // If there is a whitelist entry point for the URL return the large icon path | |
Bernhard Bauer
2016/03/17 15:49:00
Nit: comma after URL, and a period at the end.
atanasova
2016/03/17 16:02:08
Done.
| |
120 base::FilePath GetWhitelistLargeIconPath(const GURL& url); | |
121 | |
119 // Callback for when data is available from TopSites. | 122 // Callback for when data is available from TopSites. |
120 void OnMostVisitedURLsAvailable( | 123 void OnMostVisitedURLsAvailable( |
121 const history::MostVisitedURLList& visited_list); | 124 const history::MostVisitedURLList& visited_list); |
122 | 125 |
123 // Callback for when data is available from the SuggestionsService. | 126 // Callback for when data is available from the SuggestionsService. |
124 void OnSuggestionsProfileAvailable( | 127 void OnSuggestionsProfileAvailable( |
125 const suggestions::SuggestionsProfile& suggestions_profile); | 128 const suggestions::SuggestionsProfile& suggestions_profile); |
126 | 129 |
127 // Takes the personal suggestions and creates whitelist entry point | 130 // Takes the personal suggestions and creates whitelist entry point |
128 // suggestions if necessary. | 131 // suggestions if necessary. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 | 236 |
234 SuggestionsVector current_suggestions_; | 237 SuggestionsVector current_suggestions_; |
235 | 238 |
236 // For callbacks may be run after destruction. | 239 // For callbacks may be run after destruction. |
237 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; | 240 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; |
238 | 241 |
239 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); | 242 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); |
240 }; | 243 }; |
241 | 244 |
242 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 245 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
OLD | NEW |