OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 BrowserThread::PostTask( | 237 BrowserThread::PostTask( |
238 BrowserThread::FILE, FROM_HERE, | 238 BrowserThread::FILE, FROM_HERE, |
239 NewRunnableMethod( | 239 NewRunnableMethod( |
240 db_tracker_.get(), | 240 db_tracker_.get(), |
241 &webkit_database::DatabaseTracker::DeleteIncognitoDBDirectory)); | 241 &webkit_database::DatabaseTracker::DeleteIncognitoDBDirectory)); |
242 | 242 |
243 BrowserList::RemoveObserver(this); | 243 BrowserList::RemoveObserver(this); |
244 | 244 |
245 if (pref_proxy_config_tracker_) | 245 if (pref_proxy_config_tracker_) |
246 pref_proxy_config_tracker_->DetachFromPrefService(); | 246 pref_proxy_config_tracker_->DetachFromPrefService(); |
| 247 |
| 248 ExtensionService* extension_service = GetExtensionService(); |
| 249 if (extension_service) |
| 250 extension_service->extension_prefs()->ClearIncognitoSessionOnlySettings(); |
247 } | 251 } |
248 | 252 |
249 virtual ProfileId GetRuntimeId() { | 253 virtual ProfileId GetRuntimeId() { |
250 return reinterpret_cast<ProfileId>(this); | 254 return reinterpret_cast<ProfileId>(this); |
251 } | 255 } |
252 | 256 |
253 virtual std::string GetProfileName() { | 257 virtual std::string GetProfileName() { |
254 // Incognito profile should not return the profile name. | 258 // Incognito profile should not return the profile name. |
255 return std::string(); | 259 return std::string(); |
256 } | 260 } |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 // Weak pointer owned by |profile_|. | 739 // Weak pointer owned by |profile_|. |
736 PrefService* prefs_; | 740 PrefService* prefs_; |
737 | 741 |
738 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 742 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
739 | 743 |
740 OffTheRecordProfileIOData::Handle io_data_; | 744 OffTheRecordProfileIOData::Handle io_data_; |
741 | 745 |
742 // The download manager that only stores downloaded items in memory. | 746 // The download manager that only stores downloaded items in memory. |
743 scoped_refptr<DownloadManager> download_manager_; | 747 scoped_refptr<DownloadManager> download_manager_; |
744 | 748 |
745 // We use a non-writable content settings map for OTR. | 749 // We use a non-persistent content settings map for OTR. |
746 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 750 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
747 | 751 |
748 // Use a separate zoom map for OTR. | 752 // Use a separate zoom map for OTR. |
749 scoped_refptr<HostZoomMap> host_zoom_map_; | 753 scoped_refptr<HostZoomMap> host_zoom_map_; |
750 | 754 |
751 // Use a special WebKit context for OTR browsing. | 755 // Use a special WebKit context for OTR browsing. |
752 scoped_refptr<WebKitContext> webkit_context_; | 756 scoped_refptr<WebKitContext> webkit_context_; |
753 | 757 |
754 // We don't want SSLHostState from the OTR profile to leak back to the main | 758 // We don't want SSLHostState from the OTR profile to leak back to the main |
755 // profile because then the main profile would learn some of the host names | 759 // profile because then the main profile would learn some of the host names |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 }; | 820 }; |
817 #endif | 821 #endif |
818 | 822 |
819 Profile* Profile::CreateOffTheRecordProfile() { | 823 Profile* Profile::CreateOffTheRecordProfile() { |
820 #if defined(OS_CHROMEOS) | 824 #if defined(OS_CHROMEOS) |
821 if (Profile::IsGuestSession()) | 825 if (Profile::IsGuestSession()) |
822 return new GuestSessionProfile(this); | 826 return new GuestSessionProfile(this); |
823 #endif | 827 #endif |
824 return new OffTheRecordProfileImpl(this); | 828 return new OffTheRecordProfileImpl(this); |
825 } | 829 } |
OLD | NEW |