diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-14 00:16:15 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-14 00:16:15 +0000 |
commit | 4cc5a8747adf8327ba0df645237c1d5f52690caf (patch) | |
tree | 9b0fbabaa157fd1e8221d12b40451d4eee973d1f /net | |
parent | 3d66e35568b1ed073bbec5dd489997134c6a7d9f (diff) | |
download | chromium_src-4cc5a8747adf8327ba0df645237c1d5f52690caf.zip chromium_src-4cc5a8747adf8327ba0df645237c1d5f52690caf.tar.gz chromium_src-4cc5a8747adf8327ba0df645237c1d5f52690caf.tar.bz2 |
Remove locks from StrictTransportSecurityState.
These locks can cause the IO thread to block on the FILE thread writing to
disk, which is bad news bears.
BUG=21518
TEST=No behavior change.
Review URL: http://codereview.chromium.org/904005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41538 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/transport_security_state.cc | 11 | ||||
-rw-r--r-- | net/base/transport_security_state.h | 3 |
2 files changed, 0 insertions, 14 deletions
diff --git a/net/base/transport_security_state.cc b/net/base/transport_security_state.cc index d033b94..c8b86f5 100644 --- a/net/base/transport_security_state.cc +++ b/net/base/transport_security_state.cc @@ -41,8 +41,6 @@ void TransportSecurityState::EnableHost(const std::string& host, if (IsEnabledForHost(&existing_state, host)) state_copy.created = existing_state.created; - AutoLock lock(lock_); - enabled_hosts_[std::string(hashed, sizeof(hashed))] = state_copy; DirtyNotify(); } @@ -62,7 +60,6 @@ bool TransportSecurityState::IsEnabledForHost(DomainState* result, } base::Time current_time(base::Time::Now()); - AutoLock lock(lock_); for (size_t i = 0; canonicalised_host[i]; i += canonicalised_host[i] + 1) { char hashed_domain[base::SHA256_LENGTH]; @@ -194,8 +191,6 @@ bool TransportSecurityState::ParseHeader(const std::string& value, void TransportSecurityState::SetDelegate( TransportSecurityState::Delegate* delegate) { - AutoLock lock(lock_); - delegate_ = delegate; } @@ -221,8 +216,6 @@ static std::string ExternalStringToHashedDomain(const std::wstring& external) { } bool TransportSecurityState::Serialise(std::string* output) { - AutoLock lock(lock_); - DictionaryValue toplevel; for (std::map<std::string, DomainState>::const_iterator i = enabled_hosts_.begin(); i != enabled_hosts_.end(); ++i) { @@ -256,8 +249,6 @@ bool TransportSecurityState::Serialise(std::string* output) { bool TransportSecurityState::Deserialise(const std::string& input, bool* dirty) { - AutoLock lock(lock_); - enabled_hosts_.clear(); scoped_ptr<Value> value( @@ -335,8 +326,6 @@ bool TransportSecurityState::Deserialise(const std::string& input, void TransportSecurityState::DeleteSince(const base::Time& time) { bool dirtied = false; - AutoLock lock(lock_); - std::map<std::string, DomainState>::iterator i = enabled_hosts_.begin(); while (i != enabled_hosts_.end()) { if (i->second.created >= time) { diff --git a/net/base/transport_security_state.h b/net/base/transport_security_state.h index 05a0fc1..934db78 100644 --- a/net/base/transport_security_state.h +++ b/net/base/transport_security_state.h @@ -102,9 +102,6 @@ class TransportSecurityState : // ('www.google.com') to the form used in DNS: "\x03www\x06google\x03com" std::map<std::string, DomainState> enabled_hosts_; - // Protect access to our data members with this lock. - Lock lock_; - // Our delegate who gets notified when we are dirtied, or NULL. Delegate* delegate_; |