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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 872313005: Remove dependency on visitedlink from history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@init-prefs
Patch Set: Rebase Created 5 years, 10 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/chrome_browser.gypi ('k') | components/history.gypi » ('j') | 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/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/prefs/testing_pref_store.h" 12 #include "base/prefs/testing_pref_store.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 15 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
16 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 16 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
17 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" 17 #include "chrome/browser/bookmarks/chrome_bookmark_client.h"
18 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" 18 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/chrome_notification_types.h" 20 #include "chrome/browser/chrome_notification_types.h"
21 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" 21 #include "chrome/browser/favicon/chrome_favicon_client_factory.h"
22 #include "chrome/browser/favicon/favicon_service.h" 22 #include "chrome/browser/favicon/favicon_service.h"
23 #include "chrome/browser/favicon/favicon_service_factory.h" 23 #include "chrome/browser/favicon/favicon_service_factory.h"
24 #include "chrome/browser/history/chrome_history_client.h" 24 #include "chrome/browser/history/chrome_history_client.h"
25 #include "chrome/browser/history/chrome_history_client_factory.h" 25 #include "chrome/browser/history/chrome_history_client_factory.h"
26 #include "chrome/browser/history/content_visit_delegate.h"
26 #include "chrome/browser/history/history_backend.h" 27 #include "chrome/browser/history/history_backend.h"
27 #include "chrome/browser/history/history_service.h" 28 #include "chrome/browser/history/history_service.h"
28 #include "chrome/browser/history/history_service_factory.h" 29 #include "chrome/browser/history/history_service_factory.h"
29 #include "chrome/browser/history/top_sites_factory.h" 30 #include "chrome/browser/history/top_sites_factory.h"
30 #include "chrome/browser/history/top_sites_impl.h" 31 #include "chrome/browser/history/top_sites_impl.h"
31 #include "chrome/browser/history/web_history_service_factory.h" 32 #include "chrome/browser/history/web_history_service_factory.h"
32 #include "chrome/browser/net/pref_proxy_config_tracker.h" 33 #include "chrome/browser/net/pref_proxy_config_tracker.h"
33 #include "chrome/browser/net/proxy_service_factory.h" 34 #include "chrome/browser/net/proxy_service_factory.h"
34 #include "chrome/browser/notifications/desktop_notification_service.h" 35 #include "chrome/browser/notifications/desktop_notification_service.h"
35 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 36 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 208 }
208 #endif 209 #endif
209 210
210 KeyedService* BuildFaviconService(content::BrowserContext* profile) { 211 KeyedService* BuildFaviconService(content::BrowserContext* profile) {
211 FaviconClient* favicon_client = 212 FaviconClient* favicon_client =
212 ChromeFaviconClientFactory::GetForProfile(static_cast<Profile*>(profile)); 213 ChromeFaviconClientFactory::GetForProfile(static_cast<Profile*>(profile));
213 return new FaviconService(static_cast<Profile*>(profile), favicon_client); 214 return new FaviconService(static_cast<Profile*>(profile), favicon_client);
214 } 215 }
215 216
216 KeyedService* BuildHistoryService(content::BrowserContext* context) { 217 KeyedService* BuildHistoryService(content::BrowserContext* context) {
217 Profile* profile = static_cast<Profile*>(context); 218 Profile* profile = Profile::FromBrowserContext(context);
218 HistoryService* history_service = new HistoryService( 219 HistoryService* history_service = new HistoryService(
219 ChromeHistoryClientFactory::GetForProfile(profile), profile); 220 ChromeHistoryClientFactory::GetForProfile(profile),
221 scoped_ptr<history::VisitDelegate>(new ContentVisitDelegate(profile)));
220 return history_service; 222 return history_service;
221 } 223 }
222 224
223 KeyedService* BuildBookmarkModel(content::BrowserContext* context) { 225 KeyedService* BuildBookmarkModel(content::BrowserContext* context) {
224 Profile* profile = static_cast<Profile*>(context); 226 Profile* profile = static_cast<Profile*>(context);
225 ChromeBookmarkClient* bookmark_client = 227 ChromeBookmarkClient* bookmark_client =
226 ChromeBookmarkClientFactory::GetForProfile(profile); 228 ChromeBookmarkClientFactory::GetForProfile(profile);
227 BookmarkModel* bookmark_model = new BookmarkModel(bookmark_client); 229 BookmarkModel* bookmark_model = new BookmarkModel(bookmark_client);
228 bookmark_client->Init(bookmark_model); 230 bookmark_client->Init(bookmark_model);
229 bookmark_model->Load(profile->GetPrefs(), 231 bookmark_model->Load(profile->GetPrefs(),
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 #if defined(ENABLE_EXTENSIONS) 1086 #if defined(ENABLE_EXTENSIONS)
1085 extension_policy_, 1087 extension_policy_,
1086 #endif 1088 #endif
1087 pref_service_.Pass(), 1089 pref_service_.Pass(),
1088 original_profile, 1090 original_profile,
1089 guest_session_, 1091 guest_session_,
1090 supervised_user_id_, 1092 supervised_user_id_,
1091 policy_service_.Pass(), 1093 policy_service_.Pass(),
1092 testing_factories_); 1094 testing_factories_);
1093 } 1095 }
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/history.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698