| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/browser/background/background_contents_service_factory.h" | 16 #include "chrome/browser/background/background_contents_service_factory.h" |
| 17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 18 #include "chrome/browser/chrome_plugin_service_filter.h" | 18 #include "chrome/browser/chrome_plugin_service_filter.h" |
| 19 #include "chrome/browser/content_settings/host_content_settings_map.h" | 19 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 20 #include "chrome/browser/download/download_service.h" | 20 #include "chrome/browser/download/download_service.h" |
| 21 #include "chrome/browser/download/download_service_factory.h" | 21 #include "chrome/browser/download/download_service_factory.h" |
| 22 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 22 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
| 23 #include "chrome/browser/extensions/extension_info_map.h" | 23 #include "chrome/browser/extensions/extension_info_map.h" |
| 24 #include "chrome/browser/extensions/extension_pref_store.h" | 24 #include "chrome/browser/extensions/extension_pref_store.h" |
| 25 #include "chrome/browser/extensions/extension_pref_value_map.h" | |
| 26 #include "chrome/browser/extensions/extension_process_manager.h" | 25 #include "chrome/browser/extensions/extension_process_manager.h" |
| 27 #include "chrome/browser/extensions/extension_service.h" | 26 #include "chrome/browser/extensions/extension_service.h" |
| 28 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 27 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 29 #include "chrome/browser/extensions/extension_system.h" | 28 #include "chrome/browser/extensions/extension_system.h" |
| 30 #include "chrome/browser/io_thread.h" | 29 #include "chrome/browser/io_thread.h" |
| 31 #include "chrome/browser/net/proxy_service_factory.h" | 30 #include "chrome/browser/net/proxy_service_factory.h" |
| 32 #include "chrome/browser/plugin_prefs.h" | 31 #include "chrome/browser/plugin_prefs.h" |
| 33 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 32 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 34 #include "chrome/browser/prefs/pref_service.h" | 33 #include "chrome/browser/prefs/pref_service.h" |
| 35 #include "chrome/browser/profiles/profile_dependency_manager.h" | 34 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 Profile* OffTheRecordProfileImpl::GetOriginalProfile() { | 184 Profile* OffTheRecordProfileImpl::GetOriginalProfile() { |
| 186 return profile_; | 185 return profile_; |
| 187 } | 186 } |
| 188 | 187 |
| 189 VisitedLinkMaster* OffTheRecordProfileImpl::GetVisitedLinkMaster() { | 188 VisitedLinkMaster* OffTheRecordProfileImpl::GetVisitedLinkMaster() { |
| 190 // We don't provide access to the VisitedLinkMaster when we're OffTheRecord | 189 // We don't provide access to the VisitedLinkMaster when we're OffTheRecord |
| 191 // because we don't want to leak the sites that the user has visited before. | 190 // because we don't want to leak the sites that the user has visited before. |
| 192 return NULL; | 191 return NULL; |
| 193 } | 192 } |
| 194 | 193 |
| 195 ExtensionPrefValueMap* OffTheRecordProfileImpl::GetExtensionPrefValueMap() { | |
| 196 return NULL; | |
| 197 } | |
| 198 | |
| 199 ExtensionService* OffTheRecordProfileImpl::GetExtensionService() { | 194 ExtensionService* OffTheRecordProfileImpl::GetExtensionService() { |
| 200 return ExtensionSystem::Get(this)->extension_service(); | 195 return ExtensionSystem::Get(this)->extension_service(); |
| 201 } | 196 } |
| 202 | 197 |
| 203 UserScriptMaster* OffTheRecordProfileImpl::GetUserScriptMaster() { | 198 UserScriptMaster* OffTheRecordProfileImpl::GetUserScriptMaster() { |
| 204 return ExtensionSystem::Get(this)->user_script_master(); | 199 return ExtensionSystem::Get(this)->user_script_master(); |
| 205 } | 200 } |
| 206 | 201 |
| 207 ExtensionProcessManager* | 202 ExtensionProcessManager* |
| 208 OffTheRecordProfileImpl::GetExtensionProcessManager() { | 203 OffTheRecordProfileImpl::GetExtensionProcessManager() { |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 OffTheRecordProfileImpl* profile = NULL; | 493 OffTheRecordProfileImpl* profile = NULL; |
| 499 #if defined(OS_CHROMEOS) | 494 #if defined(OS_CHROMEOS) |
| 500 if (Profile::IsGuestSession()) | 495 if (Profile::IsGuestSession()) |
| 501 profile = new GuestSessionProfile(this); | 496 profile = new GuestSessionProfile(this); |
| 502 #endif | 497 #endif |
| 503 if (!profile) | 498 if (!profile) |
| 504 profile = new OffTheRecordProfileImpl(this); | 499 profile = new OffTheRecordProfileImpl(this); |
| 505 profile->Init(); | 500 profile->Init(); |
| 506 return profile; | 501 return profile; |
| 507 } | 502 } |
| OLD | NEW |