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

Side by Side Diff: chrome/test/base/testing_profile.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 Profile* profile = Profile::FromBrowserContext(context); 192 Profile* profile = Profile::FromBrowserContext(context);
193 return make_scoped_ptr(new history::HistoryService( 193 return make_scoped_ptr(new history::HistoryService(
194 ChromeHistoryClientFactory::GetForProfile(profile), 194 ChromeHistoryClientFactory::GetForProfile(profile),
195 scoped_ptr<history::VisitDelegate>( 195 scoped_ptr<history::VisitDelegate>(
196 new history::ContentVisitDelegate(profile)))); 196 new history::ContentVisitDelegate(profile))));
197 } 197 }
198 198
199 scoped_ptr<KeyedService> BuildInMemoryURLIndex( 199 scoped_ptr<KeyedService> BuildInMemoryURLIndex(
200 content::BrowserContext* context) { 200 content::BrowserContext* context) {
201 Profile* profile = Profile::FromBrowserContext(context); 201 Profile* profile = Profile::FromBrowserContext(context);
202 std::set<std::string> chrome_schemes_to_whitelist;
203 chrome_schemes_to_whitelist.insert(content::kChromeUIScheme);
Peter Kasting 2015/06/16 22:18:07 Is this actually important for some tests?
blundell 2015/06/17 07:55:44 Nope. Removed.
202 scoped_ptr<InMemoryURLIndex> in_memory_url_index(new InMemoryURLIndex( 204 scoped_ptr<InMemoryURLIndex> in_memory_url_index(new InMemoryURLIndex(
203 BookmarkModelFactory::GetForProfile(profile), 205 BookmarkModelFactory::GetForProfile(profile),
204 HistoryServiceFactory::GetForProfile(profile, 206 HistoryServiceFactory::GetForProfile(profile,
205 ServiceAccessType::IMPLICIT_ACCESS), 207 ServiceAccessType::IMPLICIT_ACCESS),
206 profile->GetPath(), 208 content::BrowserThread::GetBlockingPool(), profile->GetPath(),
207 profile->GetPrefs()->GetString(prefs::kAcceptLanguages))); 209 profile->GetPrefs()->GetString(prefs::kAcceptLanguages),
210 chrome_schemes_to_whitelist));
208 in_memory_url_index->Init(); 211 in_memory_url_index->Init();
209 return in_memory_url_index.Pass(); 212 return in_memory_url_index.Pass();
210 } 213 }
211 214
212 scoped_ptr<KeyedService> BuildBookmarkModel(content::BrowserContext* context) { 215 scoped_ptr<KeyedService> BuildBookmarkModel(content::BrowserContext* context) {
213 Profile* profile = static_cast<Profile*>(context); 216 Profile* profile = static_cast<Profile*>(context);
214 ChromeBookmarkClient* bookmark_client = 217 ChromeBookmarkClient* bookmark_client =
215 ChromeBookmarkClientFactory::GetForProfile(profile); 218 ChromeBookmarkClientFactory::GetForProfile(profile);
216 scoped_ptr<BookmarkModel> bookmark_model(new BookmarkModel(bookmark_client)); 219 scoped_ptr<BookmarkModel> bookmark_model(new BookmarkModel(bookmark_client));
217 bookmark_client->Init(bookmark_model.get()); 220 bookmark_client->Init(bookmark_model.get());
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 #if defined(ENABLE_EXTENSIONS) 1076 #if defined(ENABLE_EXTENSIONS)
1074 extension_policy_, 1077 extension_policy_,
1075 #endif 1078 #endif
1076 pref_service_.Pass(), 1079 pref_service_.Pass(),
1077 original_profile, 1080 original_profile,
1078 guest_session_, 1081 guest_session_,
1079 supervised_user_id_, 1082 supervised_user_id_,
1080 policy_service_.Pass(), 1083 policy_service_.Pass(),
1081 testing_factories_); 1084 testing_factories_);
1082 } 1085 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698