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" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
19 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" | 21 #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" |
| 22 #include "chrome/browser/background_fetch/background_fetch_client_factory.h" |
| 23 #include "chrome/browser/background_fetch/background_fetch_client_impl.h" |
22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 24 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
23 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 25 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
24 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" | 26 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" |
25 #include "chrome/browser/browser_process.h" | 27 #include "chrome/browser/browser_process.h" |
26 #include "chrome/browser/chrome_notification_types.h" | 28 #include "chrome/browser/chrome_notification_types.h" |
27 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 29 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
28 #include "chrome/browser/favicon/chrome_fallback_icon_client_factory.h" | 30 #include "chrome/browser/favicon/chrome_fallback_icon_client_factory.h" |
29 #include "chrome/browser/favicon/fallback_icon_service_factory.h" | 31 #include "chrome/browser/favicon/fallback_icon_service_factory.h" |
30 #include "chrome/browser/favicon/favicon_service_factory.h" | 32 #include "chrome/browser/favicon/favicon_service_factory.h" |
31 #include "chrome/browser/history/chrome_history_client.h" | 33 #include "chrome/browser/history/chrome_history_client.h" |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 } | 967 } |
966 | 968 |
967 content::SSLHostStateDelegate* TestingProfile::GetSSLHostStateDelegate() { | 969 content::SSLHostStateDelegate* TestingProfile::GetSSLHostStateDelegate() { |
968 return NULL; | 970 return NULL; |
969 } | 971 } |
970 | 972 |
971 content::PermissionManager* TestingProfile::GetPermissionManager() { | 973 content::PermissionManager* TestingProfile::GetPermissionManager() { |
972 return NULL; | 974 return NULL; |
973 } | 975 } |
974 | 976 |
| 977 content::BackgroundFetchClient* TestingProfile::GetBackgroundFetchClient() { |
| 978 return BackgroundFetchClientFactory::GetForProfile(this); |
| 979 } |
| 980 |
975 content::BackgroundSyncController* | 981 content::BackgroundSyncController* |
976 TestingProfile::GetBackgroundSyncController() { | 982 TestingProfile::GetBackgroundSyncController() { |
977 return nullptr; | 983 return nullptr; |
978 } | 984 } |
979 | 985 |
980 net::URLRequestContextGetter* TestingProfile::CreateRequestContext( | 986 net::URLRequestContextGetter* TestingProfile::CreateRequestContext( |
981 content::ProtocolHandlerMap* protocol_handlers, | 987 content::ProtocolHandlerMap* protocol_handlers, |
982 content::URLRequestInterceptorScopedVector request_interceptors) { | 988 content::URLRequestInterceptorScopedVector request_interceptors) { |
983 return new net::TestURLRequestContextGetter( | 989 return new net::TestURLRequestContextGetter( |
984 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 990 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 // Note: Owned by |original_profile|. | 1099 // Note: Owned by |original_profile|. |
1094 return new TestingProfile(path_, delegate_, | 1100 return new TestingProfile(path_, delegate_, |
1095 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1101 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1096 extension_policy_, | 1102 extension_policy_, |
1097 #endif | 1103 #endif |
1098 std::move(pref_service_), original_profile, | 1104 std::move(pref_service_), original_profile, |
1099 guest_session_, supervised_user_id_, | 1105 guest_session_, supervised_user_id_, |
1100 std::move(policy_service_), testing_factories_, | 1106 std::move(policy_service_), testing_factories_, |
1101 profile_name_); | 1107 profile_name_); |
1102 } | 1108 } |
OLD | NEW |