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/browser/profiles/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "base/strings/string_util.h" | 25 #include "base/strings/string_util.h" |
26 #include "base/strings/stringprintf.h" | 26 #include "base/strings/stringprintf.h" |
27 #include "base/strings/utf_string_conversions.h" | 27 #include "base/strings/utf_string_conversions.h" |
28 #include "base/synchronization/waitable_event.h" | 28 #include "base/synchronization/waitable_event.h" |
29 #include "base/threading/sequenced_worker_pool.h" | 29 #include "base/threading/sequenced_worker_pool.h" |
30 #include "base/threading/thread_restrictions.h" | 30 #include "base/threading/thread_restrictions.h" |
31 #include "base/trace_event/trace_event.h" | 31 #include "base/trace_event/trace_event.h" |
32 #include "base/version.h" | 32 #include "base/version.h" |
33 #include "build/build_config.h" | 33 #include "build/build_config.h" |
34 #include "chrome/browser/background/background_contents_service_factory.h" | 34 #include "chrome/browser/background/background_contents_service_factory.h" |
| 35 #include "chrome/browser/background_fetch/background_fetch_client_factory.h" |
| 36 #include "chrome/browser/background_fetch/background_fetch_client_impl.h" |
35 #include "chrome/browser/background_sync/background_sync_controller_factory.h" | 37 #include "chrome/browser/background_sync/background_sync_controller_factory.h" |
36 #include "chrome/browser/background_sync/background_sync_controller_impl.h" | 38 #include "chrome/browser/background_sync/background_sync_controller_impl.h" |
37 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 39 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
38 #include "chrome/browser/browser_process.h" | 40 #include "chrome/browser/browser_process.h" |
39 #include "chrome/browser/chrome_notification_types.h" | 41 #include "chrome/browser/chrome_notification_types.h" |
40 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 42 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
41 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 43 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
42 #include "chrome/browser/dom_distiller/profile_utils.h" | 44 #include "chrome/browser/dom_distiller/profile_utils.h" |
43 #include "chrome/browser/domain_reliability/service_factory.h" | 45 #include "chrome/browser/domain_reliability/service_factory.h" |
44 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 46 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 content::SSLHostStateDelegate* ProfileImpl::GetSSLHostStateDelegate() { | 1025 content::SSLHostStateDelegate* ProfileImpl::GetSSLHostStateDelegate() { |
1024 return ChromeSSLHostStateDelegateFactory::GetForProfile(this); | 1026 return ChromeSSLHostStateDelegateFactory::GetForProfile(this); |
1025 } | 1027 } |
1026 | 1028 |
1027 // TODO(mlamouri): we should all these BrowserContext implementation to Profile | 1029 // TODO(mlamouri): we should all these BrowserContext implementation to Profile |
1028 // instead of repeating them inside all Profile implementations. | 1030 // instead of repeating them inside all Profile implementations. |
1029 content::PermissionManager* ProfileImpl::GetPermissionManager() { | 1031 content::PermissionManager* ProfileImpl::GetPermissionManager() { |
1030 return PermissionManagerFactory::GetForProfile(this); | 1032 return PermissionManagerFactory::GetForProfile(this); |
1031 } | 1033 } |
1032 | 1034 |
| 1035 content::BackgroundFetchClient* ProfileImpl::GetBackgroundFetchClient() { |
| 1036 return BackgroundFetchClientFactory::GetForProfile(this); |
| 1037 } |
| 1038 |
1033 content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { | 1039 content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { |
1034 return BackgroundSyncControllerFactory::GetForProfile(this); | 1040 return BackgroundSyncControllerFactory::GetForProfile(this); |
1035 } | 1041 } |
1036 | 1042 |
1037 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( | 1043 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( |
1038 content::ProtocolHandlerMap* protocol_handlers, | 1044 content::ProtocolHandlerMap* protocol_handlers, |
1039 content::URLRequestInterceptorScopedVector request_interceptors) { | 1045 content::URLRequestInterceptorScopedVector request_interceptors) { |
1040 return io_data_.CreateMainRequestContextGetter( | 1046 return io_data_.CreateMainRequestContextGetter( |
1041 protocol_handlers, std::move(request_interceptors), | 1047 protocol_handlers, std::move(request_interceptors), |
1042 g_browser_process->io_thread()) | 1048 g_browser_process->io_thread()) |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1352 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1347 | 1353 |
1348 return service->CreateMonitor( | 1354 return service->CreateMonitor( |
1349 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1355 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
1350 } | 1356 } |
1351 | 1357 |
1352 std::unique_ptr<service_manager::Service> ProfileImpl::CreateIdentityService() { | 1358 std::unique_ptr<service_manager::Service> ProfileImpl::CreateIdentityService() { |
1353 SigninManagerBase* signin_manager = SigninManagerFactory::GetForProfile(this); | 1359 SigninManagerBase* signin_manager = SigninManagerFactory::GetForProfile(this); |
1354 return base::MakeUnique<identity::IdentityService>(signin_manager); | 1360 return base::MakeUnique<identity::IdentityService>(signin_manager); |
1355 } | 1361 } |
OLD | NEW |