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_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 | 657 |
658 if (appcache_service_ && clear_local_state_on_exit_) { | 658 if (appcache_service_ && clear_local_state_on_exit_) { |
659 BrowserThread::PostTask( | 659 BrowserThread::PostTask( |
660 BrowserThread::IO, FROM_HERE, | 660 BrowserThread::IO, FROM_HERE, |
661 NewRunnableMethod( | 661 NewRunnableMethod( |
662 appcache_service_.get(), | 662 appcache_service_.get(), |
663 &appcache::AppCacheService::set_clear_local_state_on_exit, | 663 &appcache::AppCacheService::set_clear_local_state_on_exit, |
664 true)); | 664 true)); |
665 } | 665 } |
666 | 666 |
| 667 if (webkit_context_.get()) |
| 668 webkit_context_->DeleteSessionOnlyData(); |
| 669 |
667 StopCreateSessionServiceTimer(); | 670 StopCreateSessionServiceTimer(); |
668 | 671 |
669 // Remove pref observers | 672 // Remove pref observers |
670 pref_change_registrar_.RemoveAll(); | 673 pref_change_registrar_.RemoveAll(); |
671 | 674 |
672 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); | 675 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); |
673 | 676 |
674 if (db_tracker_) { | 677 if (db_tracker_) { |
675 BrowserThread::PostTask( | 678 BrowserThread::PostTask( |
676 BrowserThread::FILE, FROM_HERE, | 679 BrowserThread::FILE, FROM_HERE, |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 return extension_message_service_.get(); | 825 return extension_message_service_.get(); |
823 } | 826 } |
824 | 827 |
825 ExtensionEventRouter* ProfileImpl::GetExtensionEventRouter() { | 828 ExtensionEventRouter* ProfileImpl::GetExtensionEventRouter() { |
826 return extension_event_router_.get(); | 829 return extension_event_router_.get(); |
827 } | 830 } |
828 | 831 |
829 ExtensionSpecialStoragePolicy* | 832 ExtensionSpecialStoragePolicy* |
830 ProfileImpl::GetExtensionSpecialStoragePolicy() { | 833 ProfileImpl::GetExtensionSpecialStoragePolicy() { |
831 if (!extension_special_storage_policy_.get()) | 834 if (!extension_special_storage_policy_.get()) |
832 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(); | 835 extension_special_storage_policy_ = |
| 836 new ExtensionSpecialStoragePolicy(GetHostContentSettingsMap()); |
833 return extension_special_storage_policy_.get(); | 837 return extension_special_storage_policy_.get(); |
834 } | 838 } |
835 | 839 |
836 SSLHostState* ProfileImpl::GetSSLHostState() { | 840 SSLHostState* ProfileImpl::GetSSLHostState() { |
837 if (!ssl_host_state_.get()) | 841 if (!ssl_host_state_.get()) |
838 ssl_host_state_.reset(new SSLHostState()); | 842 ssl_host_state_.reset(new SSLHostState()); |
839 | 843 |
840 DCHECK(ssl_host_state_->CalledOnValidThread()); | 844 DCHECK(ssl_host_state_->CalledOnValidThread()); |
841 return ssl_host_state_.get(); | 845 return ssl_host_state_.get(); |
842 } | 846 } |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 #endif | 1727 #endif |
1724 } | 1728 } |
1725 return prerender_manager_.get(); | 1729 return prerender_manager_.get(); |
1726 } | 1730 } |
1727 | 1731 |
1728 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { | 1732 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { |
1729 if (!spellcheck_profile_.get()) | 1733 if (!spellcheck_profile_.get()) |
1730 spellcheck_profile_.reset(new SpellCheckProfile()); | 1734 spellcheck_profile_.reset(new SpellCheckProfile()); |
1731 return spellcheck_profile_.get(); | 1735 return spellcheck_profile_.get(); |
1732 } | 1736 } |
OLD | NEW |