OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_HISTORY_TOP_SITES_IMPL_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ |
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ | 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 virtual base::CancelableTaskTracker::TaskId StartQueryForMostVisited() | 81 virtual base::CancelableTaskTracker::TaskId StartQueryForMostVisited() |
82 OVERRIDE; | 82 OVERRIDE; |
83 virtual bool IsKnownURL(const GURL& url) OVERRIDE; | 83 virtual bool IsKnownURL(const GURL& url) OVERRIDE; |
84 virtual const std::string& GetCanonicalURLString( | 84 virtual const std::string& GetCanonicalURLString( |
85 const GURL& url) const OVERRIDE; | 85 const GURL& url) const OVERRIDE; |
86 virtual bool IsNonForcedFull() OVERRIDE; | 86 virtual bool IsNonForcedFull() OVERRIDE; |
87 virtual bool IsForcedFull() OVERRIDE; | 87 virtual bool IsForcedFull() OVERRIDE; |
88 virtual MostVisitedURLList GetPrepopulatePages() OVERRIDE; | 88 virtual MostVisitedURLList GetPrepopulatePages() OVERRIDE; |
89 virtual bool loaded() const OVERRIDE; | 89 virtual bool loaded() const OVERRIDE; |
90 virtual bool AddForcedURL(const GURL& url, const base::Time& time) OVERRIDE; | 90 virtual bool AddForcedURL(const GURL& url, const base::Time& time) OVERRIDE; |
91 virtual Profile* GetProfile() OVERRIDE; | |
sdefresne
2014/08/04 08:47:18
Remove.
nshaik
2014/08/05 06:38:03
Done.
| |
91 | 92 |
92 protected: | 93 protected: |
93 virtual ~TopSitesImpl(); | 94 virtual ~TopSitesImpl(); |
94 | 95 |
95 private: | 96 private: |
96 friend class TopSitesImplTest; | 97 friend class TopSitesImplTest; |
97 FRIEND_TEST_ALL_PREFIXES(TopSitesImplTest, DiffMostVisited); | 98 FRIEND_TEST_ALL_PREFIXES(TopSitesImplTest, DiffMostVisited); |
98 FRIEND_TEST_ALL_PREFIXES(TopSitesImplTest, DiffMostVisitedWithForced); | 99 FRIEND_TEST_ALL_PREFIXES(TopSitesImplTest, DiffMostVisitedWithForced); |
99 | 100 |
100 typedef base::Callback<void(const MostVisitedURLList&, | 101 typedef base::Callback<void(const MostVisitedURLList&, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 int num_results_to_request_from_history() const; | 199 int num_results_to_request_from_history() const; |
199 | 200 |
200 // Invoked when transitioning to LOADED. Notifies any queued up callbacks. | 201 // Invoked when transitioning to LOADED. Notifies any queued up callbacks. |
201 // Should be called from the UI thread. | 202 // Should be called from the UI thread. |
202 void MoveStateToLoaded(); | 203 void MoveStateToLoaded(); |
203 | 204 |
204 void ResetThreadSafeCache(); | 205 void ResetThreadSafeCache(); |
205 | 206 |
206 void ResetThreadSafeImageCache(); | 207 void ResetThreadSafeImageCache(); |
207 | 208 |
208 void NotifyTopSitesChanged(); | |
209 | |
210 // Stops and starts timer with a delay of |delta|. | 209 // Stops and starts timer with a delay of |delta|. |
211 void RestartQueryForTopSitesTimer(base::TimeDelta delta); | 210 void RestartQueryForTopSitesTimer(base::TimeDelta delta); |
212 | 211 |
213 // Callback from TopSites with the top sites/thumbnails. Should be called | 212 // Callback from TopSites with the top sites/thumbnails. Should be called |
214 // from the UI thread. | 213 // from the UI thread. |
215 void OnGotMostVisitedThumbnails( | 214 void OnGotMostVisitedThumbnails( |
216 const scoped_refptr<MostVisitedThumbnails>& thumbnails); | 215 const scoped_refptr<MostVisitedThumbnails>& thumbnails); |
217 | 216 |
218 // Called when history service returns a list of top URLs. | 217 // Called when history service returns a list of top URLs. |
219 void OnTopSitesAvailableFromHistory(const MostVisitedURLList* data); | 218 void OnTopSitesAvailableFromHistory(const MostVisitedURLList* data); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
264 | 263 |
265 // Are we loaded? | 264 // Are we loaded? |
266 bool loaded_; | 265 bool loaded_; |
267 | 266 |
268 DISALLOW_COPY_AND_ASSIGN(TopSitesImpl); | 267 DISALLOW_COPY_AND_ASSIGN(TopSitesImpl); |
269 }; | 268 }; |
270 | 269 |
271 } // namespace history | 270 } // namespace history |
272 | 271 |
273 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ | 272 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ |
OLD | NEW |