Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5891)

Unified Diff: chrome/browser/history/top_sites_factory.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/history/thumbnail_database_unittest.cc ('k') | chrome/browser/history/top_sites_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites_factory.cc
diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc
index 838e4585afa73ddbbfdd153768ab09fd6d9aafeb..a102fccb6fd7524d2c10cfb93c58edb20f48a6cb 100644
--- a/chrome/browser/history/top_sites_factory.cc
+++ b/chrome/browser/history/top_sites_factory.cc
@@ -4,16 +4,18 @@
#include "chrome/browser/history/top_sites_factory.h"
+#include "base/bind.h"
#include "base/macros.h"
#include "base/memory/singleton.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/top_sites_impl.h"
+#include "chrome/browser/history/history_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/locale_settings.h"
+#include "components/history/core/browser/top_sites_impl.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/browser/browser_thread.h"
#include "grit/theme_resources.h"
@@ -95,7 +97,8 @@ scoped_refptr<history::TopSites> TopSitesFactory::BuildTopSites(
scoped_refptr<history::TopSitesImpl> top_sites(new history::TopSitesImpl(
profile->GetPrefs(), HistoryServiceFactory::GetForProfile(
profile, ServiceAccessType::EXPLICIT_ACCESS),
- prefs::kNtpMostVisitedURLsBlacklist, prepopulated_page_list));
+ prefs::kNtpMostVisitedURLsBlacklist, prepopulated_page_list,
+ base::Bind(CanAddURLToHistory)));
top_sites->Init(context->GetPath().Append(chrome::kTopSitesFilename),
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::DB));
« no previous file with comments | « chrome/browser/history/thumbnail_database_unittest.cc ('k') | chrome/browser/history/top_sites_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698