| 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" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 BrowserList::RemoveObserver(this); | 133 BrowserList::RemoveObserver(this); |
| 134 | 134 |
| 135 if (host_content_settings_map_) | 135 if (host_content_settings_map_) |
| 136 host_content_settings_map_->ShutdownOnUIThread(); | 136 host_content_settings_map_->ShutdownOnUIThread(); |
| 137 | 137 |
| 138 if (pref_proxy_config_tracker_.get()) | 138 if (pref_proxy_config_tracker_.get()) |
| 139 pref_proxy_config_tracker_->DetachFromPrefService(); | 139 pref_proxy_config_tracker_->DetachFromPrefService(); |
| 140 | 140 |
| 141 ExtensionService* extension_service = GetExtensionService(); | 141 ExtensionService* extension_service = GetExtensionService(); |
| 142 if (extension_service) { | 142 if (extension_service && extension_service->extensions_enabled()) { |
| 143 ExtensionPrefs* extension_prefs = extension_service->extension_prefs(); | 143 ExtensionPrefs* extension_prefs = extension_service->extension_prefs(); |
| 144 extension_prefs->ClearIncognitoSessionOnlyContentSettings(); | 144 extension_prefs->ClearIncognitoSessionOnlyContentSettings(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 // Clears any data the network stack contains that may be related to the | 147 // Clears any data the network stack contains that may be related to the |
| 148 // OTR session. | 148 // OTR session. |
| 149 g_browser_process->io_thread()->ChangedToOnTheRecord(); | 149 g_browser_process->io_thread()->ChangedToOnTheRecord(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void OffTheRecordProfileImpl::InitHostZoomMap() { | 152 void OffTheRecordProfileImpl::InitHostZoomMap() { |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 OffTheRecordProfileImpl* profile = NULL; | 536 OffTheRecordProfileImpl* profile = NULL; |
| 537 #if defined(OS_CHROMEOS) | 537 #if defined(OS_CHROMEOS) |
| 538 if (Profile::IsGuestSession()) | 538 if (Profile::IsGuestSession()) |
| 539 profile = new GuestSessionProfile(this); | 539 profile = new GuestSessionProfile(this); |
| 540 #endif | 540 #endif |
| 541 if (!profile) | 541 if (!profile) |
| 542 profile = new OffTheRecordProfileImpl(this); | 542 profile = new OffTheRecordProfileImpl(this); |
| 543 profile->Init(); | 543 profile->Init(); |
| 544 return profile; | 544 return profile; |
| 545 } | 545 } |
| OLD | NEW |