Chromium Code Reviews| Index: chrome/browser/history/most_visited_urls_provider.h |
| diff --git a/chrome/browser/history/most_visited_urls_provider.h b/chrome/browser/history/most_visited_urls_provider.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8e6e95204b30b12cd2d938374cb94dda9f1487f0 |
| --- /dev/null |
| +++ b/chrome/browser/history/most_visited_urls_provider.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
bengr
2013/10/23 19:03:36
2012 -> 2013. Remove the '(c)' too.
sclittle
2013/10/24 22:11:38
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_HISTORY_MOST_VISITED_URLS_PROVIDER_H_ |
| +#define CHROME_BROWSER_HISTORY_MOST_VISITED_URLS_PROVIDER_H_ |
| + |
| +#include <list> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/callback.h" |
| +#include "base/compiler_specific.h" |
| +#include "base/memory/ref_counted.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "chrome/browser/history/history_types.h" |
| +#include "components/precache/core/interesting_urls_provider.h" |
| +#include "url/gurl.h" |
| + |
| +namespace history { |
| + |
| +class TopSites; |
| + |
| +// An InterestingURLsProvider that provides a list of the user's most visited |
|
bengr
2013/10/23 19:03:36
How about "RepresentativeURLsProvider"? I'm not su
sclittle
2013/10/24 22:11:38
Renamed to URLListProvider.
|
| +// URLs. |
| +class MostVisitedURLsProvider |
| + : public precache::InterestingURLsProvider, |
| + public base::SupportsWeakPtr<MostVisitedURLsProvider> { |
| + public: |
| + explicit MostVisitedURLsProvider(TopSites* top_sites); |
| + ~MostVisitedURLsProvider(); |
| + |
| + virtual void GetInterestingURLs( |
| + const base::Callback<void(const std::list<GURL>&)>& callback) OVERRIDE; |
| + |
| + private: |
| + void OnMostVisitedURLsReceived( |
| + base::Callback<void(const std::list<GURL>&)> callback, |
| + const MostVisitedURLList& most_visited_urls); |
| + |
| + scoped_refptr<TopSites> top_sites_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MostVisitedURLsProvider); |
| +}; |
| + |
| +} // namespace history |
| + |
| +#endif // CHROME_BROWSER_HISTORY_MOST_VISITED_URLS_PROVIDER_H_ |