OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_IMPL_H_ | 5 #ifndef COMPONENTS_NTP_TILES_POPULAR_SITES_IMPL_H_ |
6 #define COMPONENTS_NTP_TILES_POPULAR_SITES_IMPL_H_ | 6 #define COMPONENTS_NTP_TILES_POPULAR_SITES_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 ParseJSONCallback parse_json); | 60 ParseJSONCallback parse_json); |
61 | 61 |
62 ~PopularSitesImpl() override; | 62 ~PopularSitesImpl() override; |
63 | 63 |
64 // PopularSites implementation. | 64 // PopularSites implementation. |
65 bool MaybeStartFetch(bool force_download, | 65 bool MaybeStartFetch(bool force_download, |
66 const FinishedCallback& callback) override; | 66 const FinishedCallback& callback) override; |
67 const SitesVector& sites() const override; | 67 const SitesVector& sites() const override; |
68 GURL GetLastURLFetched() const override; | 68 GURL GetLastURLFetched() const override; |
69 GURL GetURLToFetch() override; | 69 GURL GetURLToFetch() override; |
| 70 std::string GetDirectoryToFetch() override; |
70 std::string GetCountryToFetch() override; | 71 std::string GetCountryToFetch() override; |
71 std::string GetVersionToFetch() override; | 72 std::string GetVersionToFetch() override; |
72 const base::ListValue* GetCachedJson() override; | 73 const base::ListValue* GetCachedJson() override; |
73 | 74 |
74 // Register preferences used by this class. | 75 // Register preferences used by this class. |
75 static void RegisterProfilePrefs( | 76 static void RegisterProfilePrefs( |
76 user_prefs::PrefRegistrySyncable* user_prefs); | 77 user_prefs::PrefRegistrySyncable* user_prefs); |
77 | 78 |
78 private: | 79 private: |
79 // Fetch the popular sites at the given URL, overwriting any cache in prefs | 80 // Fetch the popular sites at the given URL, overwriting any cache in prefs |
(...skipping 24 matching lines...) Expand all Loading... |
104 GURL pending_url_; | 105 GURL pending_url_; |
105 | 106 |
106 base::WeakPtrFactory<PopularSitesImpl> weak_ptr_factory_; | 107 base::WeakPtrFactory<PopularSitesImpl> weak_ptr_factory_; |
107 | 108 |
108 DISALLOW_COPY_AND_ASSIGN(PopularSitesImpl); | 109 DISALLOW_COPY_AND_ASSIGN(PopularSitesImpl); |
109 }; | 110 }; |
110 | 111 |
111 } // namespace ntp_tiles | 112 } // namespace ntp_tiles |
112 | 113 |
113 #endif // COMPONENTS_NTP_TILES_POPULAR_SITES_IMPL_H_ | 114 #endif // COMPONENTS_NTP_TILES_POPULAR_SITES_IMPL_H_ |
OLD | NEW |