| 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 ExtensionPrefs* extension_prefs = extension_service->extension_prefs(); |
| 251 extension_prefs->ClearIncognitoSessionOnlyContentSettings(); |
| 252 } |
| 247 } | 253 } |
| 248 | 254 |
| 249 virtual ProfileId GetRuntimeId() { | 255 virtual ProfileId GetRuntimeId() { |
| 250 return reinterpret_cast<ProfileId>(this); | 256 return reinterpret_cast<ProfileId>(this); |
| 251 } | 257 } |
| 252 | 258 |
| 253 virtual std::string GetProfileName() { | 259 virtual std::string GetProfileName() { |
| 254 // Incognito profile should not return the profile name. | 260 // Incognito profile should not return the profile name. |
| 255 return std::string(); | 261 return std::string(); |
| 256 } | 262 } |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 // Weak pointer owned by |profile_|. | 741 // Weak pointer owned by |profile_|. |
| 736 PrefService* prefs_; | 742 PrefService* prefs_; |
| 737 | 743 |
| 738 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 744 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
| 739 | 745 |
| 740 OffTheRecordProfileIOData::Handle io_data_; | 746 OffTheRecordProfileIOData::Handle io_data_; |
| 741 | 747 |
| 742 // The download manager that only stores downloaded items in memory. | 748 // The download manager that only stores downloaded items in memory. |
| 743 scoped_refptr<DownloadManager> download_manager_; | 749 scoped_refptr<DownloadManager> download_manager_; |
| 744 | 750 |
| 745 // We use a non-writable content settings map for OTR. | 751 // We use a non-persistent content settings map for OTR. |
| 746 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 752 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 747 | 753 |
| 748 // Use a separate zoom map for OTR. | 754 // Use a separate zoom map for OTR. |
| 749 scoped_refptr<HostZoomMap> host_zoom_map_; | 755 scoped_refptr<HostZoomMap> host_zoom_map_; |
| 750 | 756 |
| 751 // Use a special WebKit context for OTR browsing. | 757 // Use a special WebKit context for OTR browsing. |
| 752 scoped_refptr<WebKitContext> webkit_context_; | 758 scoped_refptr<WebKitContext> webkit_context_; |
| 753 | 759 |
| 754 // We don't want SSLHostState from the OTR profile to leak back to the main | 760 // 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 | 761 // 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 }; | 822 }; |
| 817 #endif | 823 #endif |
| 818 | 824 |
| 819 Profile* Profile::CreateOffTheRecordProfile() { | 825 Profile* Profile::CreateOffTheRecordProfile() { |
| 820 #if defined(OS_CHROMEOS) | 826 #if defined(OS_CHROMEOS) |
| 821 if (Profile::IsGuestSession()) | 827 if (Profile::IsGuestSession()) |
| 822 return new GuestSessionProfile(this); | 828 return new GuestSessionProfile(this); |
| 823 #endif | 829 #endif |
| 824 return new OffTheRecordProfileImpl(this); | 830 return new OffTheRecordProfileImpl(this); |
| 825 } | 831 } |
| OLD | NEW |