| 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/off_the_record_profile_impl.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "chrome/browser/background/background_contents_service_factory.h" | 18 #include "chrome/browser/background/background_contents_service_factory.h" |
| 19 #include "chrome/browser/background_sync/background_sync_controller_factory.h" | 19 #include "chrome/browser/background_sync/background_sync_controller_factory.h" |
| 20 #include "chrome/browser/background_sync/background_sync_controller_impl.h" | 20 #include "chrome/browser/background_sync/background_sync_controller_impl.h" |
| 21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 22 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 23 #include "chrome/browser/dom_distiller/profile_utils.h" | 23 #include "chrome/browser/dom_distiller/profile_utils.h" |
| 24 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 24 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 25 #include "chrome/browser/download/download_service.h" | 25 #include "chrome/browser/download/download_core_service.h" |
| 26 #include "chrome/browser/download/download_service_factory.h" | 26 #include "chrome/browser/download/download_core_service_factory.h" |
| 27 #include "chrome/browser/io_thread.h" | 27 #include "chrome/browser/io_thread.h" |
| 28 #include "chrome/browser/net/chrome_url_request_context_getter.h" | 28 #include "chrome/browser/net/chrome_url_request_context_getter.h" |
| 29 #include "chrome/browser/net/proxy_service_factory.h" | 29 #include "chrome/browser/net/proxy_service_factory.h" |
| 30 #include "chrome/browser/permissions/permission_manager.h" | 30 #include "chrome/browser/permissions/permission_manager.h" |
| 31 #include "chrome/browser/permissions/permission_manager_factory.h" | 31 #include "chrome/browser/permissions/permission_manager_factory.h" |
| 32 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 32 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
| 33 #include "chrome/browser/plugins/plugin_prefs.h" | 33 #include "chrome/browser/plugins/plugin_prefs.h" |
| 34 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 34 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 35 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 35 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
| 36 #include "chrome/browser/profiles/profile_manager.h" | 36 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 const PrefService* OffTheRecordProfileImpl::GetPrefs() const { | 305 const PrefService* OffTheRecordProfileImpl::GetPrefs() const { |
| 306 return prefs_; | 306 return prefs_; |
| 307 } | 307 } |
| 308 | 308 |
| 309 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { | 309 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { |
| 310 return prefs_; | 310 return prefs_; |
| 311 } | 311 } |
| 312 | 312 |
| 313 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { | 313 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { |
| 314 return DownloadServiceFactory::GetForBrowserContext(this)-> | 314 return DownloadCoreServiceFactory::GetForBrowserContext(this) |
| 315 GetDownloadManagerDelegate(); | 315 ->GetDownloadManagerDelegate(); |
| 316 } | 316 } |
| 317 | 317 |
| 318 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( | 318 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( |
| 319 content::ProtocolHandlerMap* protocol_handlers, | 319 content::ProtocolHandlerMap* protocol_handlers, |
| 320 content::URLRequestInterceptorScopedVector request_interceptors) { | 320 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 321 return io_data_->CreateMainRequestContextGetter( | 321 return io_data_->CreateMainRequestContextGetter( |
| 322 protocol_handlers, std::move(request_interceptors)) | 322 protocol_handlers, std::move(request_interceptors)) |
| 323 .get(); | 323 .get(); |
| 324 } | 324 } |
| 325 | 325 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 554 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 555 #if defined(OS_CHROMEOS) | 555 #if defined(OS_CHROMEOS) |
| 556 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 556 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 557 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 557 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 558 g_browser_process->local_state()); | 558 g_browser_process->local_state()); |
| 559 } | 559 } |
| 560 #endif // defined(OS_CHROMEOS) | 560 #endif // defined(OS_CHROMEOS) |
| 561 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 561 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 562 GetPrefs(), g_browser_process->local_state()); | 562 GetPrefs(), g_browser_process->local_state()); |
| 563 } | 563 } |
| OLD | NEW |