Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_NTP_TILES_POPULAR_SITES_H_ | 5 #ifndef COMPONENTS_NTP_TILES_POPULAR_SITES_H_ |
| 6 #define COMPONENTS_NTP_TILES_POPULAR_SITES_H_ | 6 #define COMPONENTS_NTP_TILES_POPULAR_SITES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 const GURL& large_icon_url, | 30 const GURL& large_icon_url, |
| 31 const GURL& thumbnail_url); | 31 const GURL& thumbnail_url); |
| 32 Site(const Site& other); | 32 Site(const Site& other); |
| 33 ~Site(); | 33 ~Site(); |
| 34 | 34 |
| 35 base::string16 title; | 35 base::string16 title; |
| 36 GURL url; | 36 GURL url; |
| 37 GURL favicon_url; | 37 GURL favicon_url; |
| 38 GURL large_icon_url; | 38 GURL large_icon_url; |
| 39 GURL thumbnail_url; | 39 GURL thumbnail_url; |
| 40 int default_resource_id; // 0 if there is none. Used for popular defaults. | |
|
sfiera
2017/02/16 18:54:16
<0
fhorschig
2017/02/17 16:24:04
Correct.
| |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 using SitesVector = std::vector<Site>; | 43 using SitesVector = std::vector<Site>; |
| 43 using FinishedCallback = base::Callback<void(bool /* success */)>; | 44 using FinishedCallback = base::Callback<void(bool /* success */)>; |
| 44 | 45 |
| 45 virtual ~PopularSites() = default; | 46 virtual ~PopularSites() = default; |
| 46 | 47 |
| 47 // May start the process of retrieving popular sites. If an actual download | 48 // May start the process of retrieving popular sites. If an actual download |
| 48 // gets triggered, returns true and invokes |callback| with the result, on the | 49 // gets triggered, returns true and invokes |callback| with the result, on the |
| 49 // same thread as the caller. Never invokes |callback| before returning | 50 // same thread as the caller. Never invokes |callback| before returning |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 66 virtual GURL GetLastURLFetched() const = 0; | 67 virtual GURL GetLastURLFetched() const = 0; |
| 67 virtual GURL GetURLToFetch() = 0; | 68 virtual GURL GetURLToFetch() = 0; |
| 68 virtual std::string GetCountryToFetch() = 0; | 69 virtual std::string GetCountryToFetch() = 0; |
| 69 virtual std::string GetVersionToFetch() = 0; | 70 virtual std::string GetVersionToFetch() = 0; |
| 70 virtual const base::ListValue* GetCachedJson() = 0; | 71 virtual const base::ListValue* GetCachedJson() = 0; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 } // namespace ntp_tiles | 74 } // namespace ntp_tiles |
| 74 | 75 |
| 75 #endif // COMPONENTS_NTP_TILES_POPULAR_SITES_H_ | 76 #endif // COMPONENTS_NTP_TILES_POPULAR_SITES_H_ |
| OLD | NEW |