OLD | NEW |
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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 40 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
41 #include "chrome/browser/prerender/prerender_manager.h" | 41 #include "chrome/browser/prerender/prerender_manager.h" |
42 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" | 42 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" |
43 #include "chrome/browser/profiles/profile_manager.h" | 43 #include "chrome/browser/profiles/profile_manager.h" |
44 #include "chrome/browser/profiles/storage_partition_descriptor.h" | 44 #include "chrome/browser/profiles/storage_partition_descriptor.h" |
45 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" | 45 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" |
46 #include "chrome/browser/search_engines/template_url_service_factory.h" | 46 #include "chrome/browser/search_engines/template_url_service_factory.h" |
47 #include "chrome/browser/sync/glue/sync_start_util.h" | 47 #include "chrome/browser/sync/glue/sync_start_util.h" |
48 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" | 48 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" |
49 #include "chrome/browser/web_data_service_factory.h" | 49 #include "chrome/browser/web_data_service_factory.h" |
| 50 #include "chrome/common/channel_info.h" |
50 #include "chrome/common/chrome_constants.h" | 51 #include "chrome/common/chrome_constants.h" |
51 #include "chrome/common/chrome_switches.h" | 52 #include "chrome/common/chrome_switches.h" |
52 #include "chrome/common/features.h" | 53 #include "chrome/common/features.h" |
53 #include "chrome/common/pref_names.h" | 54 #include "chrome/common/pref_names.h" |
54 #include "chrome/common/url_constants.h" | 55 #include "chrome/common/url_constants.h" |
55 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 56 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
56 #include "components/bookmarks/browser/bookmark_model.h" | 57 #include "components/bookmarks/browser/bookmark_model.h" |
57 #include "components/bookmarks/common/bookmark_constants.h" | 58 #include "components/bookmarks/common/bookmark_constants.h" |
58 #include "components/content_settings/core/browser/host_content_settings_map.h" | 59 #include "components/content_settings/core/browser/host_content_settings_map.h" |
59 #include "components/favicon/core/fallback_icon_service.h" | 60 #include "components/favicon/core/fallback_icon_service.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 242 } |
242 | 243 |
243 std::unique_ptr<KeyedService> BuildWebDataService( | 244 std::unique_ptr<KeyedService> BuildWebDataService( |
244 content::BrowserContext* context) { | 245 content::BrowserContext* context) { |
245 const base::FilePath& context_path = context->GetPath(); | 246 const base::FilePath& context_path = context->GetPath(); |
246 return base::MakeUnique<WebDataServiceWrapper>( | 247 return base::MakeUnique<WebDataServiceWrapper>( |
247 context_path, g_browser_process->GetApplicationLocale(), | 248 context_path, g_browser_process->GetApplicationLocale(), |
248 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), | 249 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
249 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), | 250 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), |
250 sync_start_util::GetFlareForSyncableService(context_path), | 251 sync_start_util::GetFlareForSyncableService(context_path), |
251 &TestProfileErrorCallback); | 252 &TestProfileErrorCallback, chrome::GetChannel()); |
252 } | 253 } |
253 | 254 |
254 #if defined(OS_ANDROID) | 255 #if defined(OS_ANDROID) |
255 std::unique_ptr<KeyedService> BuildOfflinePageModel( | 256 std::unique_ptr<KeyedService> BuildOfflinePageModel( |
256 content::BrowserContext* context) { | 257 content::BrowserContext* context) { |
257 return base::MakeUnique<offline_pages::StubOfflinePageModel>(); | 258 return base::MakeUnique<offline_pages::StubOfflinePageModel>(); |
258 } | 259 } |
259 #endif | 260 #endif |
260 | 261 |
261 } // namespace | 262 } // namespace |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 // Note: Owned by |original_profile|. | 1092 // Note: Owned by |original_profile|. |
1092 return new TestingProfile(path_, delegate_, | 1093 return new TestingProfile(path_, delegate_, |
1093 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1094 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1094 extension_policy_, | 1095 extension_policy_, |
1095 #endif | 1096 #endif |
1096 std::move(pref_service_), original_profile, | 1097 std::move(pref_service_), original_profile, |
1097 guest_session_, supervised_user_id_, | 1098 guest_session_, supervised_user_id_, |
1098 std::move(policy_service_), testing_factories_, | 1099 std::move(policy_service_), testing_factories_, |
1099 profile_name_); | 1100 profile_name_); |
1100 } | 1101 } |
OLD | NEW |