Index: components/history/core/browser/top_sites_impl.h |
diff --git a/chrome/browser/history/top_sites_impl.h b/components/history/core/browser/top_sites_impl.h |
similarity index 95% |
rename from chrome/browser/history/top_sites_impl.h |
rename to components/history/core/browser/top_sites_impl.h |
index 60e40b66c45fe1b093714569e26c73a0d53f4d08..e28ceb59d4c68e00fc9c489ef98a1a1bcca2dcbe 100644 |
--- a/chrome/browser/history/top_sites_impl.h |
+++ b/components/history/core/browser/top_sites_impl.h |
@@ -2,8 +2,8 @@ |
// 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 COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_IMPL_H_ |
+#define COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_IMPL_H_ |
#include <list> |
#include <set> |
@@ -53,10 +53,15 @@ class TopSitesImplTest; |
// db using TopSitesBackend. |
class TopSitesImpl : public TopSites, public HistoryServiceObserver { |
public: |
+ // Called to check whether an URL can be added to the history. Must be |
+ // callable multiple time and during the whole lifetime of TopSitesImpl. |
+ using CanAddURLToHistoryFn = base::Callback<bool(const GURL&)>; |
+ |
TopSitesImpl(PrefService* pref_service, |
HistoryService* history_service, |
const char* blacklist_pref_name, |
- const PrepopulatedPageList& prepopulated_pages); |
+ const PrepopulatedPageList& prepopulated_pages, |
+ const CanAddURLToHistoryFn& can_add_url_to_history); |
// Initializes TopSitesImpl. |
void Init(const base::FilePath& db_name, |
@@ -294,6 +299,9 @@ class TopSitesImpl : public TopSites, public HistoryServiceObserver { |
// must outlive TopSitesImpl. |
HistoryService* history_service_; |
+ // Can URL be added to the history? |
+ CanAddURLToHistoryFn can_add_url_to_history_; |
+ |
// Are we loaded? |
bool loaded_; |
@@ -309,4 +317,4 @@ class TopSitesImpl : public TopSites, public HistoryServiceObserver { |
} // namespace history |
-#endif // CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ |
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_IMPL_H_ |