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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PRECACHE_MOST_VISITED_URLS_PROVIDER_H_
6 #define CHROME_BROWSER_PRECACHE_MOST_VISITED_URLS_PROVIDER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
11 #include "components/precache/core/url_list_provider.h"
19 // A URLListProvider that provides a list of the user's most visited URLs.
20 class MostVisitedURLsProvider
: public URLListProvider
{
22 explicit MostVisitedURLsProvider(history::TopSites
* top_sites
);
23 ~MostVisitedURLsProvider();
25 // Returns a list of the user's most visited URLs via a callback. May be
26 // called from any thread. The callback may be run before the call to GetURLs
28 void GetURLs(const GetURLsCallback
& callback
) override
;
31 scoped_refptr
<history::TopSites
> top_sites_
;
33 DISALLOW_COPY_AND_ASSIGN(MostVisitedURLsProvider
);
36 } // namespace precache
38 #endif // CHROME_BROWSER_PRECACHE_MOST_VISITED_URLS_PROVIDER_H_