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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 content::SSLHostStateDelegate* ProfileImpl::GetSSLHostStateDelegate() { | 1029 content::SSLHostStateDelegate* ProfileImpl::GetSSLHostStateDelegate() { |
1028 return ChromeSSLHostStateDelegateFactory::GetForProfile(this); | 1030 return ChromeSSLHostStateDelegateFactory::GetForProfile(this); |
1029 } | 1031 } |
1030 | 1032 |
1031 // TODO(mlamouri): we should all these BrowserContext implementation to Profile | 1033 // TODO(mlamouri): we should all these BrowserContext implementation to Profile |
1032 // instead of repeating them inside all Profile implementations. | 1034 // instead of repeating them inside all Profile implementations. |
1033 content::PermissionManager* ProfileImpl::GetPermissionManager() { | 1035 content::PermissionManager* ProfileImpl::GetPermissionManager() { |
1034 return PermissionManagerFactory::GetForProfile(this); | 1036 return PermissionManagerFactory::GetForProfile(this); |
1035 } | 1037 } |
1036 | 1038 |
| 1039 content::BackgroundFetchClient* ProfileImpl::GetBackgroundFetchClient() { |
| 1040 return BackgroundFetchClientFactory::GetForProfile(this); |
| 1041 } |
| 1042 |
1037 content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { | 1043 content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { |
1038 return BackgroundSyncControllerFactory::GetForProfile(this); | 1044 return BackgroundSyncControllerFactory::GetForProfile(this); |
1039 } | 1045 } |
1040 | 1046 |
1041 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( | 1047 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( |
1042 content::ProtocolHandlerMap* protocol_handlers, | 1048 content::ProtocolHandlerMap* protocol_handlers, |
1043 content::URLRequestInterceptorScopedVector request_interceptors) { | 1049 content::URLRequestInterceptorScopedVector request_interceptors) { |
1044 return io_data_.CreateMainRequestContextGetter( | 1050 return io_data_.CreateMainRequestContextGetter( |
1045 protocol_handlers, std::move(request_interceptors), | 1051 protocol_handlers, std::move(request_interceptors), |
1046 g_browser_process->io_thread()) | 1052 g_browser_process->io_thread()) |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1356 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1351 | 1357 |
1352 return service->CreateMonitor( | 1358 return service->CreateMonitor( |
1353 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1359 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
1354 } | 1360 } |
1355 | 1361 |
1356 std::unique_ptr<service_manager::Service> ProfileImpl::CreateIdentityService() { | 1362 std::unique_ptr<service_manager::Service> ProfileImpl::CreateIdentityService() { |
1357 SigninManagerBase* signin_manager = SigninManagerFactory::GetForProfile(this); | 1363 SigninManagerBase* signin_manager = SigninManagerFactory::GetForProfile(this); |
1358 return base::MakeUnique<identity::IdentityService>(signin_manager); | 1364 return base::MakeUnique<identity::IdentityService>(signin_manager); |
1359 } | 1365 } |
OLD | NEW |