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

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

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Eliminate Profile::FromBrowserContext in some places Created 4 years, 4 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 42a43e38626678e0eba17303b58217c42d3a9934..95849abd1c0a1637257eb9467ea15905234fbc93 100644
--- a/chrome/browser/autocomplete/in_memory_url_index_factory.cc
+++ b/chrome/browser/autocomplete/in_memory_url_index_factory.cc
@@ -45,13 +45,13 @@ KeyedService* InMemoryURLIndexFactory::BuildServiceInstanceFor(
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),
- TemplateURLServiceFactory::GetForProfile(profile),
- content::BrowserThread::GetBlockingPool(), profile->GetPath(),
- chrome_schemes_to_whitelist);
+ InMemoryURLIndex* in_memory_url_index =
+ new InMemoryURLIndex(BookmarkModelFactory::GetForBrowserContext(profile),
+ HistoryServiceFactory::GetForProfile(
+ profile, ServiceAccessType::IMPLICIT_ACCESS),
+ TemplateURLServiceFactory::GetForProfile(profile),
+ content::BrowserThread::GetBlockingPool(),
+ profile->GetPath(), chrome_schemes_to_whitelist);
in_memory_url_index->Init();
return in_memory_url_index;
}

Powered by Google App Engine
This is Rietveld 408576698