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

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
« no previous file with comments | « chrome/browser/autocomplete/in_memory_url_index_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 scoped_ptr<InMemoryURLIndex> in_memory_url_index(new InMemoryURLIndex( 202 scoped_ptr<InMemoryURLIndex> in_memory_url_index(new InMemoryURLIndex(
203 BookmarkModelFactory::GetForProfile(profile), 203 BookmarkModelFactory::GetForProfile(profile),
204 HistoryServiceFactory::GetForProfile(profile, 204 HistoryServiceFactory::GetForProfile(profile,
205 ServiceAccessType::IMPLICIT_ACCESS), 205 ServiceAccessType::IMPLICIT_ACCESS),
206 profile->GetPath(), 206 content::BrowserThread::GetBlockingPool(), profile->GetPath(),
207 profile->GetPrefs()->GetString(prefs::kAcceptLanguages))); 207 profile->GetPrefs()->GetString(prefs::kAcceptLanguages),
208 SchemeSet()));
208 in_memory_url_index->Init(); 209 in_memory_url_index->Init();
209 return in_memory_url_index.Pass(); 210 return in_memory_url_index.Pass();
210 } 211 }
211 212
212 scoped_ptr<KeyedService> BuildBookmarkModel(content::BrowserContext* context) { 213 scoped_ptr<KeyedService> BuildBookmarkModel(content::BrowserContext* context) {
213 Profile* profile = static_cast<Profile*>(context); 214 Profile* profile = static_cast<Profile*>(context);
214 ChromeBookmarkClient* bookmark_client = 215 ChromeBookmarkClient* bookmark_client =
215 ChromeBookmarkClientFactory::GetForProfile(profile); 216 ChromeBookmarkClientFactory::GetForProfile(profile);
216 scoped_ptr<BookmarkModel> bookmark_model(new BookmarkModel(bookmark_client)); 217 scoped_ptr<BookmarkModel> bookmark_model(new BookmarkModel(bookmark_client));
217 bookmark_client->Init(bookmark_model.get()); 218 bookmark_client->Init(bookmark_model.get());
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 #if defined(ENABLE_EXTENSIONS) 1074 #if defined(ENABLE_EXTENSIONS)
1074 extension_policy_, 1075 extension_policy_,
1075 #endif 1076 #endif
1076 pref_service_.Pass(), 1077 pref_service_.Pass(),
1077 original_profile, 1078 original_profile,
1078 guest_session_, 1079 guest_session_,
1079 supervised_user_id_, 1080 supervised_user_id_,
1080 policy_service_.Pass(), 1081 policy_service_.Pass(),
1081 testing_factories_); 1082 testing_factories_);
1082 } 1083 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/in_memory_url_index_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698