Chromium Code Reviews| Index: chrome/browser/history/top_sites_impl.h |
| diff --git a/chrome/browser/history/top_sites_impl.h b/chrome/browser/history/top_sites_impl.h |
| index 81fd263ebcb715ae25c3e5880dfdbeaf3bc515c3..6616c788524aa0f06d28772b0975bd776bd9df77 100644 |
| --- a/chrome/browser/history/top_sites_impl.h |
| +++ b/chrome/browser/history/top_sites_impl.h |
| @@ -20,11 +20,12 @@ |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| #include "chrome/browser/history/history_service.h" |
| -#include "chrome/browser/history/top_sites.h" |
| -#include "chrome/browser/history/top_sites_backend.h" |
| #include "components/history/core/browser/history_types.h" |
| #include "components/history/core/browser/page_usage_data.h" |
| +#include "components/history/core/browser/top_sites.h" |
| +#include "components/history/core/browser/top_sites_backend.h" |
| #include "components/history/core/common/thumbnail_score.h" |
| +#include "content/public/browser/notification_observer.h" |
| #include "third_party/skia/include/core/SkColor.h" |
| #include "ui/gfx/image/image.h" |
| #include "url/gurl.h" |
| @@ -35,6 +36,7 @@ namespace base { |
| class FilePath; |
| class RefCountedBytes; |
| class RefCountedMemory; |
| +class SingleThreadTaskRunner; |
| } |
| namespace history { |
| @@ -46,12 +48,14 @@ class TopSitesImplTest; |
| // thread. All other methods must be invoked on the UI thread. All mutations |
| // to internal state happen on the UI thread and are scheduled to update the |
| // db using TopSitesBackend. |
| -class TopSitesImpl : public TopSites { |
| +class TopSitesImpl : public TopSites, public content::NotificationObserver { |
| public: |
| - explicit TopSitesImpl(Profile* profile); |
| + TopSitesImpl(Profile* profile, |
| + const PrepopulatedPageList& prepopulated_pages); |
| // Initializes TopSitesImpl. |
| - void Init(const base::FilePath& db_name); |
| + void Init(const base::FilePath& db_name, |
| + const scoped_refptr<base::SingleThreadTaskRunner>& db_task_runner); |
| bool SetPageThumbnail(const GURL& url, |
| const gfx::Image& thumbnail, |
| @@ -78,7 +82,7 @@ class TopSitesImpl : public TopSites { |
| const std::string& GetCanonicalURLString(const GURL& url) const override; |
| bool IsNonForcedFull() override; |
| bool IsForcedFull() override; |
| - MostVisitedURLList GetPrepopulatePages() override; |
| + PrepopulatedPageList GetPrepopulatedPages() override; |
|
droger
2015/01/27 10:08:36
Could you return a const reference here?
sdefresne
2015/01/27 13:55:16
GetPrepopulatedPages() is a virtual method defined
sdefresne
2015/01/27 13:55:16
GetPrepopulatedPages() is a virtual method defined
|
| bool loaded() const override; |
| bool AddForcedURL(const GURL& url, const base::Time& time) override; |
| @@ -254,7 +258,7 @@ class TopSitesImpl : public TopSites { |
| TempImages temp_images_; |
| // URL List of prepopulated page. |
| - std::vector<GURL> prepopulated_page_urls_; |
| + PrepopulatedPageList prepopulated_pages_; |
| // Are we loaded? |
| bool loaded_; |