Index: chrome/browser/history/top_sites_service.h |
diff --git a/chrome/browser/history/top_sites_impl.h b/chrome/browser/history/top_sites_service.h |
similarity index 94% |
copy from chrome/browser/history/top_sites_impl.h |
copy to chrome/browser/history/top_sites_service.h |
index cea6f84d8ab24aff6df8483b7a7a4ccfcdb4b0c0..1f563c3ac17bdf0817628e8e28cbb17c1fc64fcd 100644 |
--- a/chrome/browser/history/top_sites_impl.h |
+++ b/chrome/browser/history/top_sites_service.h |
@@ -1,9 +1,9 @@ |
-// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
sdefresne
2014/12/19 15:11:41
Do not change copyright notice when moving files.
|
+// Copyright 2014 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ |
-#define CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ |
+#ifndef CHROME_BROWSER_HISTORY_TOP_SITES_SERVICE_H_ |
+#define CHROME_BROWSER_HISTORY_TOP_SITES_SERVICE_H_ |
#include <list> |
#include <set> |
@@ -20,8 +20,8 @@ |
#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 "chrome/browser/history/top_sites_provider.h" |
#include "components/history/core/browser/history_types.h" |
#include "components/history/core/browser/page_usage_data.h" |
#include "components/history/core/common/thumbnail_score.h" |
@@ -46,9 +46,9 @@ 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 TopSitesService : public KeyedService, public TopSitesProvider { |
sdefresne
2014/12/19 15:11:41
TopSitesImpl should not be the KeyedService, it sh
Jitu( very slow this week)
2014/12/26 14:04:27
Done.
|
public: |
- explicit TopSitesImpl(Profile* profile); |
+ explicit TopSitesService(Profile* profile); |
// Initializes TopSitesImpl. |
void Init(const base::FilePath& db_name); |
@@ -84,7 +84,7 @@ class TopSitesImpl : public TopSites { |
bool AddForcedURL(const GURL& url, const base::Time& time) override; |
protected: |
- ~TopSitesImpl() override; |
+ ~TopSitesService() override; |
private: |
friend class TopSitesImplTest; |
@@ -150,8 +150,7 @@ class TopSitesImpl : public TopSites { |
// Add prepopulated pages: 'welcome to Chrome' and themes gallery to |urls|. |
// Returns true if any pages were added. |
- bool AddPrepopulatedPages(MostVisitedURLList* urls, |
- size_t num_forced_urls); |
+ bool AddPrepopulatedPages(MostVisitedURLList* urls, size_t num_forced_urls); |
// Add all the forced URLs from |cache_| into |new_list|, making sure not to |
// add any URL that's already in |new_list|'s non-forced URLs. The forced URLs |
@@ -230,7 +229,7 @@ class TopSitesImpl : public TopSites { |
// Timer that asks history for the top sites. This is used to make sure our |
// data stays in sync with history. |
- base::OneShotTimer<TopSitesImpl> timer_; |
+ base::OneShotTimer<TopSitesService> timer_; |
// The time we started |timer_| at. Only valid if |timer_| is running. |
base::TimeTicks timer_start_time_; |
@@ -257,9 +256,9 @@ class TopSitesImpl : public TopSites { |
// Are we loaded? |
bool loaded_; |
- DISALLOW_COPY_AND_ASSIGN(TopSitesImpl); |
+ DISALLOW_COPY_AND_ASSIGN(TopSitesService); |
}; |
} // namespace history |
-#endif // CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ |
+#endif // CHROME_BROWSER_HISTORY_TOP_SITES_SERVICE_H_ |