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/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 io_data_.GetResourceContextNoInit()); | 141 io_data_.GetResourceContextNoInit()); |
142 #endif | 142 #endif |
143 | 143 |
144 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( | 144 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( |
145 this); | 145 this); |
146 | 146 |
147 BrowserThread::PostTask( | 147 BrowserThread::PostTask( |
148 BrowserThread::IO, FROM_HERE, | 148 BrowserThread::IO, FROM_HERE, |
149 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); | 149 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); |
150 | 150 |
151 if (host_content_settings_map_) | 151 if (host_content_settings_map_.get()) |
152 host_content_settings_map_->ShutdownOnUIThread(); | 152 host_content_settings_map_->ShutdownOnUIThread(); |
153 | 153 |
154 if (pref_proxy_config_tracker_) | 154 if (pref_proxy_config_tracker_) |
155 pref_proxy_config_tracker_->DetachFromPrefService(); | 155 pref_proxy_config_tracker_->DetachFromPrefService(); |
156 | 156 |
157 // Clears any data the network stack contains that may be related to the | 157 // Clears any data the network stack contains that may be related to the |
158 // OTR session. | 158 // OTR session. |
159 g_browser_process->io_thread()->ChangedToOnTheRecord(); | 159 g_browser_process->io_thread()->ChangedToOnTheRecord(); |
160 } | 160 } |
161 | 161 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 } | 298 } |
299 | 299 |
300 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { | 300 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { |
301 return profile_->GetSSLConfigService(); | 301 return profile_->GetSSLConfigService(); |
302 } | 302 } |
303 | 303 |
304 HostContentSettingsMap* OffTheRecordProfileImpl::GetHostContentSettingsMap() { | 304 HostContentSettingsMap* OffTheRecordProfileImpl::GetHostContentSettingsMap() { |
305 // Retrieve the host content settings map of the parent profile in order to | 305 // Retrieve the host content settings map of the parent profile in order to |
306 // ensure the preferences have been migrated. | 306 // ensure the preferences have been migrated. |
307 profile_->GetHostContentSettingsMap(); | 307 profile_->GetHostContentSettingsMap(); |
308 if (!host_content_settings_map_) { | 308 if (!host_content_settings_map_.get()) { |
309 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); | 309 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); |
310 #if defined(ENABLE_EXTENSIONS) | 310 #if defined(ENABLE_EXTENSIONS) |
311 ExtensionService* extension_service = GetExtensionService(); | 311 ExtensionService* extension_service = GetExtensionService(); |
312 if (extension_service) | 312 if (extension_service) |
313 host_content_settings_map_->RegisterExtensionService(extension_service); | 313 host_content_settings_map_->RegisterExtensionService(extension_service); |
314 #endif | 314 #endif |
315 } | 315 } |
316 return host_content_settings_map_.get(); | 316 return host_content_settings_map_.get(); |
317 } | 317 } |
318 | 318 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: | 463 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: |
464 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); | 464 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); |
465 return; | 465 return; |
466 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: | 466 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: |
467 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, | 467 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, |
468 change.host, | 468 change.host, |
469 change.zoom_level); | 469 change.zoom_level); |
470 return; | 470 return; |
471 } | 471 } |
472 } | 472 } |
OLD | NEW |