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

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

Issue 1181353003: Revert of Revert of Abstract //content-level dependencies out of InMemoryURLIndex (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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..e193c74a1a43780f4d91f90d71242c5ce5f5f9ef 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 @@
content::BrowserContext* context) const {
// Do not force creation of the HistoryService if saving history is disabled.
Profile* profile = Profile::FromBrowserContext(context);
+ SchemeSet 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;
}
« no previous file with comments | « chrome/browser/autocomplete/in_memory_url_index.cc ('k') | chrome/browser/autocomplete/in_memory_url_index_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698