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

Unified Diff: chrome/browser/autocomplete/in_memory_url_index_factory.cc

Issue 1186103002: Abstract //content-level dependencies out of InMemoryURLIndex (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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
Index: chrome/browser/autocomplete/in_memory_url_index_factory.cc
diff --git a/chrome/browser/autocomplete/in_memory_url_index_factory.cc b/chrome/browser/autocomplete/in_memory_url_index_factory.cc
index cb8e0419195a059c972e00ac4553c917c7dac9fa..6642000f4d05b7013d9c047249acbcf60cf53a53 100644
--- a/chrome/browser/autocomplete/in_memory_url_index_factory.cc
+++ b/chrome/browser/autocomplete/in_memory_url_index_factory.cc
@@ -14,6 +14,8 @@
#include "chrome/common/pref_names.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/keyed_service/core/service_access_type.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/common/url_constants.h"
// static
InMemoryURLIndex* InMemoryURLIndexFactory::GetForProfile(Profile* profile) {
@@ -41,12 +43,15 @@ KeyedService* InMemoryURLIndexFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
// Do not force creation of the HistoryService if saving history is disabled.
Profile* profile = Profile::FromBrowserContext(context);
+ std::set<std::string> chrome_schemes_to_whitelist;
+ chrome_schemes_to_whitelist.insert(content::kChromeUIScheme);
InMemoryURLIndex* in_memory_url_index = new InMemoryURLIndex(
BookmarkModelFactory::GetForProfile(profile),
HistoryServiceFactory::GetForProfile(profile,
ServiceAccessType::IMPLICIT_ACCESS),
- profile->GetPath(),
- profile->GetPrefs()->GetString(prefs::kAcceptLanguages));
+ content::BrowserThread::GetBlockingPool(), profile->GetPath(),
+ profile->GetPrefs()->GetString(prefs::kAcceptLanguages),
+ chrome_schemes_to_whitelist);
in_memory_url_index->Init();
return in_memory_url_index;
}

Powered by Google App Engine
This is Rietveld 408576698