Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 7619010: Session-only local storage cleared on exit. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Code review comments (tiny). Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 656
657 if (appcache_service_ && clear_local_state_on_exit_) { 657 if (appcache_service_ && clear_local_state_on_exit_) {
658 BrowserThread::PostTask( 658 BrowserThread::PostTask(
659 BrowserThread::IO, FROM_HERE, 659 BrowserThread::IO, FROM_HERE,
660 NewRunnableMethod( 660 NewRunnableMethod(
661 appcache_service_.get(), 661 appcache_service_.get(),
662 &appcache::AppCacheService::set_clear_local_state_on_exit, 662 &appcache::AppCacheService::set_clear_local_state_on_exit,
663 true)); 663 true));
664 } 664 }
665 665
666 if (webkit_context_.get())
667 webkit_context_->DeleteSessionOnlyData();
668
666 StopCreateSessionServiceTimer(); 669 StopCreateSessionServiceTimer();
667 670
668 // Remove pref observers 671 // Remove pref observers
669 pref_change_registrar_.RemoveAll(); 672 pref_change_registrar_.RemoveAll();
670 673
671 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); 674 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this);
672 675
673 if (db_tracker_) { 676 if (db_tracker_) {
674 BrowserThread::PostTask( 677 BrowserThread::PostTask(
675 BrowserThread::FILE, FROM_HERE, 678 BrowserThread::FILE, FROM_HERE,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 ExtensionMessageService* ProfileImpl::GetExtensionMessageService() { 823 ExtensionMessageService* ProfileImpl::GetExtensionMessageService() {
821 return extension_message_service_.get(); 824 return extension_message_service_.get();
822 } 825 }
823 826
824 ExtensionEventRouter* ProfileImpl::GetExtensionEventRouter() { 827 ExtensionEventRouter* ProfileImpl::GetExtensionEventRouter() {
825 return extension_event_router_.get(); 828 return extension_event_router_.get();
826 } 829 }
827 830
828 ExtensionSpecialStoragePolicy* 831 ExtensionSpecialStoragePolicy*
829 ProfileImpl::GetExtensionSpecialStoragePolicy() { 832 ProfileImpl::GetExtensionSpecialStoragePolicy() {
830 if (!extension_special_storage_policy_.get()) 833 if (!extension_special_storage_policy_.get()) {
831 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(); 834 extension_special_storage_policy_ =
835 new ExtensionSpecialStoragePolicy(GetHostContentSettingsMap());
836 }
832 return extension_special_storage_policy_.get(); 837 return extension_special_storage_policy_.get();
833 } 838 }
834 839
835 SSLHostState* ProfileImpl::GetSSLHostState() { 840 SSLHostState* ProfileImpl::GetSSLHostState() {
836 if (!ssl_host_state_.get()) 841 if (!ssl_host_state_.get())
837 ssl_host_state_.reset(new SSLHostState()); 842 ssl_host_state_.reset(new SSLHostState());
838 843
839 DCHECK(ssl_host_state_->CalledOnValidThread()); 844 DCHECK(ssl_host_state_->CalledOnValidThread());
840 return ssl_host_state_.get(); 845 return ssl_host_state_.get();
841 } 846 }
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 #endif 1721 #endif
1717 } 1722 }
1718 return prerender_manager_.get(); 1723 return prerender_manager_.get();
1719 } 1724 }
1720 1725
1721 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { 1726 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() {
1722 if (!spellcheck_profile_.get()) 1727 if (!spellcheck_profile_.get())
1723 spellcheck_profile_.reset(new SpellCheckProfile()); 1728 spellcheck_profile_.reset(new SpellCheckProfile());
1724 return spellcheck_profile_.get(); 1729 return spellcheck_profile_.get();
1725 } 1730 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/mock_extension_special_storage_policy.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698