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

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

Issue 7966005: Move TransportSecurityPersister completely to IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 3 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 } 943 }
944 944
945 SSLHostState* ProfileImpl::GetSSLHostState() { 945 SSLHostState* ProfileImpl::GetSSLHostState() {
946 if (!ssl_host_state_.get()) 946 if (!ssl_host_state_.get())
947 ssl_host_state_.reset(new SSLHostState()); 947 ssl_host_state_.reset(new SSLHostState());
948 948
949 DCHECK(ssl_host_state_->CalledOnValidThread()); 949 DCHECK(ssl_host_state_->CalledOnValidThread());
950 return ssl_host_state_.get(); 950 return ssl_host_state_.get();
951 } 951 }
952 952
953 net::TransportSecurityState*
954 ProfileImpl::GetTransportSecurityState() {
955 if (!transport_security_state_.get()) {
956 transport_security_state_ = new net::TransportSecurityState(
957 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
958 switches::kHstsHosts));
959 transport_security_persister_ =
960 new TransportSecurityPersister(transport_security_state_.get(),
961 path_,
962 false /* read-write */);
963 transport_security_persister_->Init();
964 }
965
966 return transport_security_state_.get();
967 }
968
969 void ProfileImpl::OnPrefsLoaded(bool success) { 953 void ProfileImpl::OnPrefsLoaded(bool success) {
970 if (!success) { 954 if (!success) {
971 DCHECK(delegate_); 955 DCHECK(delegate_);
972 delegate_->OnProfileCreated(this, false); 956 delegate_->OnProfileCreated(this, false);
973 return; 957 return;
974 } 958 }
975 959
976 // The Profile class and ProfileManager class may read some prefs so 960 // The Profile class and ProfileManager class may read some prefs so
977 // register known prefs as soon as possible. 961 // register known prefs as soon as possible.
978 Profile::RegisterUserPrefs(prefs_.get()); 962 Profile::RegisterUserPrefs(prefs_.get());
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); 1805 chromeos::CrosLibrary::Get()->GetNetworkLibrary()));
1822 #endif 1806 #endif
1823 } 1807 }
1824 return prerender_manager_.get(); 1808 return prerender_manager_.get();
1825 } 1809 }
1826 1810
1827 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { 1811 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() {
1828 return predictor_; 1812 return predictor_;
1829 } 1813 }
1830 1814
1815 void ProfileImpl::DeleteTransportSecurityStateSince(base::Time time) {
1816 io_data_.DeleteTransportSecurityStateSince(time);
1817 }
1818
1831 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { 1819 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() {
1832 if (!spellcheck_profile_.get()) 1820 if (!spellcheck_profile_.get())
1833 spellcheck_profile_.reset(new SpellCheckProfile()); 1821 spellcheck_profile_.reset(new SpellCheckProfile());
1834 return spellcheck_profile_.get(); 1822 return spellcheck_profile_.get();
1835 } 1823 }
1836 1824
1837 void ProfileImpl::SetDownloadManagerDelegate( 1825 void ProfileImpl::SetDownloadManagerDelegate(
1838 ChromeDownloadManagerDelegate* delegate) { 1826 ChromeDownloadManagerDelegate* delegate) {
1839 download_manager_delegate_ = delegate; 1827 download_manager_delegate_ = delegate;
1840 } 1828 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698