summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/base/capturing_net_log.cc10
-rw-r--r--net/base/capturing_net_log.h4
-rw-r--r--net/base/cert_database_mac.cc4
-rw-r--r--net/base/cert_verifier.cc10
-rw-r--r--net/base/cookie_monster.cc26
-rw-r--r--net/base/cookie_monster.h4
-rw-r--r--net/base/dnsrr_resolver.cc10
-rw-r--r--net/base/host_resolver_impl.cc14
-rw-r--r--net/base/host_resolver_impl_unittest.cc6
-rw-r--r--net/base/keygen_handler_mac.cc10
-rw-r--r--net/base/listen_socket_unittest.cc4
-rw-r--r--net/base/net_util.cc6
-rw-r--r--net/base/openssl_memory_private_key_store.cc6
-rw-r--r--net/base/test_completion_callback_unittest.cc4
-rw-r--r--net/base/x509_certificate.cc8
-rw-r--r--net/base/x509_certificate.h4
-rw-r--r--net/base/x509_certificate_mac.cc2
-rw-r--r--net/http/disk_cache_based_ssl_host_info.h1
-rw-r--r--net/ocsp/nss_ocsp.cc2
-rw-r--r--net/proxy/polling_proxy_config_service.cc8
-rw-r--r--net/proxy/sync_host_resolver_bridge.cc10
-rw-r--r--net/socket/ssl_client_socket_openssl.cc10
-rw-r--r--net/socket/ssl_client_socket_win.cc6
-rw-r--r--net/socket_stream/socket_stream_job_manager.cc4
-rw-r--r--net/socket_stream/socket_stream_job_manager.h2
-rw-r--r--net/tools/flip_server/flip_in_mem_edsm_server.cc8
-rw-r--r--net/url_request/url_request_file_job.cc7
-rw-r--r--net/url_request/url_request_job_manager.cc8
-rw-r--r--net/url_request/url_request_job_manager.h4
29 files changed, 101 insertions, 101 deletions
diff --git a/net/base/capturing_net_log.cc b/net/base/capturing_net_log.cc
index 568d4c3..2daa73a 100644
--- a/net/base/capturing_net_log.cc
+++ b/net/base/capturing_net_log.cc
@@ -26,17 +26,17 @@ CapturingNetLog::CapturingNetLog(size_t max_num_entries)
CapturingNetLog::~CapturingNetLog() {}
void CapturingNetLog::GetEntries(EntryList* entry_list) const {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
*entry_list = entries_;
}
void CapturingNetLog::Clear() {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
entries_.clear();
}
void CapturingNetLog::SetLogLevel(NetLog::LogLevel log_level) {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
log_level_ = log_level;
}
@@ -45,7 +45,7 @@ void CapturingNetLog::AddEntry(EventType type,
const Source& source,
EventPhase phase,
EventParameters* extra_parameters) {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
Entry entry(type, time, source, phase, extra_parameters);
if (entries_.size() + 1 < max_num_entries_)
entries_.push_back(entry);
@@ -56,7 +56,7 @@ uint32 CapturingNetLog::NextID() {
}
NetLog::LogLevel CapturingNetLog::GetLogLevel() const {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
return log_level_;
}
diff --git a/net/base/capturing_net_log.h b/net/base/capturing_net_log.h
index 0678d9a..a7406af 100644
--- a/net/base/capturing_net_log.h
+++ b/net/base/capturing_net_log.h
@@ -10,9 +10,9 @@
#include "base/atomicops.h"
#include "base/basictypes.h"
-#include "base/lock.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
+#include "base/synchronization/lock.h"
#include "base/time.h"
#include "net/base/net_log.h"
@@ -65,7 +65,7 @@ class CapturingNetLog : public NetLog {
private:
// Needs to be "mutable" so can use it in GetEntries().
- mutable Lock lock_;
+ mutable base::Lock lock_;
// Last assigned source ID. Incremented to get the next one.
base::subtle::Atomic32 last_id_;
diff --git a/net/base/cert_database_mac.cc b/net/base/cert_database_mac.cc
index b0afd50..e90a712 100644
--- a/net/base/cert_database_mac.cc
+++ b/net/base/cert_database_mac.cc
@@ -7,8 +7,8 @@
#include <Security/Security.h>
#include "base/crypto/cssm_init.h"
-#include "base/lock.h"
#include "base/logging.h"
+#include "base/synchronization/lock.h"
#include "net/base/net_errors.h"
#include "net/base/x509_certificate.h"
@@ -43,7 +43,7 @@ int CertDatabase::CheckUserCert(X509Certificate* cert) {
int CertDatabase::AddUserCert(X509Certificate* cert) {
OSStatus err;
{
- AutoLock locked(base::GetMacSecurityServicesLock());
+ base::AutoLock locked(base::GetMacSecurityServicesLock());
err = SecCertificateAddToKeychain(cert->os_cert_handle(), NULL);
}
switch (err) {
diff --git a/net/base/cert_verifier.cc b/net/base/cert_verifier.cc
index 3d22dec..044524f 100644
--- a/net/base/cert_verifier.cc
+++ b/net/base/cert_verifier.cc
@@ -5,9 +5,9 @@
#include "net/base/cert_verifier.h"
#include "base/compiler_specific.h"
-#include "base/lock.h"
#include "base/message_loop.h"
#include "base/stl_util-inl.h"
+#include "base/synchronization/lock.h"
#include "base/threading/worker_pool.h"
#include "net/base/net_errors.h"
#include "net/base/x509_certificate.h"
@@ -145,7 +145,7 @@ class CertVerifierWorker {
// deleted.
void Cancel() {
DCHECK_EQ(MessageLoop::current(), origin_loop_);
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
canceled_ = true;
}
@@ -174,7 +174,7 @@ class CertVerifierWorker {
// after the PostTask, but before unlocking |lock_|. If we do not lock in
// this case, we will end up deleting a locked Lock, which can lead to
// memory leaks or worse errors.
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
if (!canceled_) {
cert_verifier_->HandleResult(cert_, hostname_, flags_,
error_, verify_result_);
@@ -196,7 +196,7 @@ class CertVerifierWorker {
bool canceled;
{
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
canceled = canceled_;
if (!canceled) {
origin_loop_->PostTask(
@@ -215,7 +215,7 @@ class CertVerifierWorker {
CertVerifier* const cert_verifier_;
// lock_ protects canceled_.
- Lock lock_;
+ base::Lock lock_;
// If canceled_ is true,
// * origin_loop_ cannot be accessed by the worker thread,
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index cc96d44..e24b6be 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -503,7 +503,7 @@ bool CookieMonster::SetCookieWithDetails(
const GURL& url, const std::string& name, const std::string& value,
const std::string& domain, const std::string& path,
const base::Time& expiration_time, bool secure, bool http_only) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
if (!HasCookieableScheme(url))
return false;
@@ -529,7 +529,7 @@ bool CookieMonster::SetCookieWithDetails(
CookieList CookieMonster::GetAllCookies() {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
InitIfNecessary();
// This function is being called to scrape the cookie list for management UI
@@ -564,7 +564,7 @@ CookieList CookieMonster::GetAllCookies() {
CookieList CookieMonster::GetAllCookiesForURLWithOptions(
const GURL& url,
const CookieOptions& options) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
InitIfNecessary();
std::vector<CanonicalCookie*> cookie_ptrs;
@@ -587,7 +587,7 @@ CookieList CookieMonster::GetAllCookiesForURL(const GURL& url) {
}
int CookieMonster::DeleteAll(bool sync_to_store) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
if (sync_to_store)
InitIfNecessary();
@@ -607,7 +607,7 @@ int CookieMonster::DeleteAll(bool sync_to_store) {
int CookieMonster::DeleteAllCreatedBetween(const Time& delete_begin,
const Time& delete_end,
bool sync_to_store) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
InitIfNecessary();
int num_deleted = 0;
@@ -632,7 +632,7 @@ int CookieMonster::DeleteAllCreatedAfter(const Time& delete_begin,
}
int CookieMonster::DeleteAllForHost(const GURL& url) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
InitIfNecessary();
if (!HasCookieableScheme(url))
@@ -663,7 +663,7 @@ int CookieMonster::DeleteAllForHost(const GURL& url) {
}
bool CookieMonster::DeleteCanonicalCookie(const CanonicalCookie& cookie) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
InitIfNecessary();
for (CookieMapItPair its = cookies_.equal_range(GetKey(cookie.Domain()));
@@ -679,7 +679,7 @@ bool CookieMonster::DeleteCanonicalCookie(const CanonicalCookie& cookie) {
void CookieMonster::SetCookieableSchemes(
const char* schemes[], size_t num_schemes) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
// Cookieable Schemes must be set before first use of function.
DCHECK(!initialized_);
@@ -705,7 +705,7 @@ void CookieMonster::EnableFileScheme() {
}
void CookieMonster::FlushStore(Task* completion_task) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
if (initialized_ && store_)
store_->Flush(completion_task);
else if (completion_task)
@@ -715,7 +715,7 @@ void CookieMonster::FlushStore(Task* completion_task) {
bool CookieMonster::SetCookieWithOptions(const GURL& url,
const std::string& cookie_line,
const CookieOptions& options) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
if (!HasCookieableScheme(url)) {
return false;
@@ -728,7 +728,7 @@ bool CookieMonster::SetCookieWithOptions(const GURL& url,
std::string CookieMonster::GetCookiesWithOptions(const GURL& url,
const CookieOptions& options) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
InitIfNecessary();
if (!HasCookieableScheme(url)) {
@@ -764,7 +764,7 @@ std::string CookieMonster::GetCookiesWithOptions(const GURL& url,
void CookieMonster::DeleteCookie(const GURL& url,
const std::string& cookie_name) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
InitIfNecessary();
if (!HasCookieableScheme(url))
@@ -806,7 +806,7 @@ CookieMonster::~CookieMonster() {
bool CookieMonster::SetCookieWithCreationTime(const GURL& url,
const std::string& cookie_line,
const base::Time& creation_time) {
- AutoLock autolock(lock_);
+ base::AutoLock autolock(lock_);
if (!HasCookieableScheme(url)) {
return false;
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index 6a17d38..b2e3d2b 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -15,9 +15,9 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
-#include "base/lock.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
+#include "base/synchronization/lock.h"
#include "base/task.h"
#include "base/time.h"
#include "net/base/cookie_store.h"
@@ -485,7 +485,7 @@ class CookieMonster : public CookieStore {
scoped_refptr<Delegate> delegate_;
// Lock for thread-safety
- Lock lock_;
+ base::Lock lock_;
base::Time last_statistic_record_time_;
diff --git a/net/base/dnsrr_resolver.cc b/net/base/dnsrr_resolver.cc
index 203ae52..5d9c132 100644
--- a/net/base/dnsrr_resolver.cc
+++ b/net/base/dnsrr_resolver.cc
@@ -12,12 +12,12 @@
#include <windns.h>
#endif
-#include "base/lock.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
#include "base/singleton.h"
#include "base/stl_util-inl.h"
#include "base/string_piece.h"
+#include "base/synchronization/lock.h"
#include "base/task.h"
#include "base/threading/worker_pool.h"
#include "net/base/dns_reload_timer.h"
@@ -168,7 +168,7 @@ class RRResolverWorker {
// deleted.
void Cancel() {
DCHECK_EQ(MessageLoop::current(), origin_loop_);
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
canceled_ = true;
}
@@ -353,7 +353,7 @@ class RRResolverWorker {
// after the PostTask, but before unlocking |lock_|. If we do not lock in
// this case, we will end up deleting a locked Lock, which can lead to
// memory leaks or worse errors.
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
if (!canceled_)
dnsrr_resolver_->HandleResult(name_, rrtype_, result_, response_);
}
@@ -373,7 +373,7 @@ class RRResolverWorker {
bool canceled;
{
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
canceled = canceled_;
if (!canceled) {
origin_loop_->PostTask(
@@ -391,7 +391,7 @@ class RRResolverWorker {
MessageLoop* const origin_loop_;
DnsRRResolver* const dnsrr_resolver_;
- Lock lock_;
+ base::Lock lock_;
bool canceled_;
int result_;
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index b4c8bfa..5c61b4f 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -18,12 +18,12 @@
#include "base/compiler_specific.h"
#include "base/debug/debugger.h"
#include "base/debug/stack_trace.h"
-#include "base/lock.h"
#include "base/message_loop.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
+#include "base/synchronization/lock.h"
#include "base/threading/worker_pool.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
@@ -405,7 +405,7 @@ class HostResolverImpl::Job
// Mark the job as cancelled, so when worker thread completes it will
// not try to post completion to origin loop.
{
- AutoLock locked(origin_loop_lock_);
+ base::AutoLock locked(origin_loop_lock_);
origin_loop_ = NULL;
}
@@ -482,7 +482,7 @@ class HostResolverImpl::Job
// The origin loop could go away while we are trying to post to it, so we
// need to call its PostTask method inside a lock. See ~HostResolver.
{
- AutoLock locked(origin_loop_lock_);
+ base::AutoLock locked(origin_loop_lock_);
if (origin_loop_) {
origin_loop_->PostTask(FROM_HERE,
NewRunnableMethod(this, &Job::OnLookupComplete));
@@ -603,7 +603,7 @@ class HostResolverImpl::Job
RequestsList requests_; // The requests waiting on this job.
// Used to post ourselves onto the origin thread.
- Lock origin_loop_lock_;
+ base::Lock origin_loop_lock_;
MessageLoop* origin_loop_;
// Hold an owning reference to the HostResolverProc that we are going to use.
@@ -661,7 +661,7 @@ class HostResolverImpl::IPv6ProbeJob
DCHECK(IsOnOriginThread());
resolver_ = NULL; // Read/write ONLY on origin thread.
{
- AutoLock locked(origin_loop_lock_);
+ base::AutoLock locked(origin_loop_lock_);
// Origin loop may be destroyed before we can use it!
origin_loop_ = NULL; // Write ONLY on origin thread.
}
@@ -695,7 +695,7 @@ class HostResolverImpl::IPv6ProbeJob
// The origin loop could go away while we are trying to post to it, so we
// need to call its PostTask method inside a lock. See ~HostResolver.
{
- AutoLock locked(origin_loop_lock_);
+ base::AutoLock locked(origin_loop_lock_);
if (origin_loop_) {
origin_loop_->PostTask(FROM_HERE, reply);
return;
@@ -722,7 +722,7 @@ class HostResolverImpl::IPv6ProbeJob
HostResolverImpl* resolver_;
// Used to post ourselves onto the origin thread.
- Lock origin_loop_lock_;
+ base::Lock origin_loop_lock_;
MessageLoop* origin_loop_;
DISALLOW_COPY_AND_ASSIGN(IPv6ProbeJob);
diff --git a/net/base/host_resolver_impl_unittest.cc b/net/base/host_resolver_impl_unittest.cc
index 4d26ab9..8d418e9 100644
--- a/net/base/host_resolver_impl_unittest.cc
+++ b/net/base/host_resolver_impl_unittest.cc
@@ -92,7 +92,7 @@ class CapturingHostResolverProc : public HostResolverProc {
int* os_error) {
event_.Wait();
{
- AutoLock l(lock_);
+ base::AutoLock l(lock_);
capture_list_.push_back(CaptureEntry(hostname, address_family));
}
return ResolveUsingPrevious(hostname, address_family,
@@ -102,7 +102,7 @@ class CapturingHostResolverProc : public HostResolverProc {
CaptureList GetCaptureList() const {
CaptureList copy;
{
- AutoLock l(lock_);
+ base::AutoLock l(lock_);
copy = capture_list_;
}
return copy;
@@ -112,7 +112,7 @@ class CapturingHostResolverProc : public HostResolverProc {
~CapturingHostResolverProc() {}
CaptureList capture_list_;
- mutable Lock lock_;
+ mutable base::Lock lock_;
base::WaitableEvent event_;
};
diff --git a/net/base/keygen_handler_mac.cc b/net/base/keygen_handler_mac.cc
index fdad99e..df9ce4a 100644
--- a/net/base/keygen_handler_mac.cc
+++ b/net/base/keygen_handler_mac.cc
@@ -10,10 +10,10 @@
#include "base/base64.h"
#include "base/crypto/cssm_init.h"
-#include "base/lock.h"
#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/string_util.h"
+#include "base/synchronization/lock.h"
#include "base/sys_string_conversions.h"
// These are in Security.framework but not declared in a public header.
@@ -234,7 +234,7 @@ static OSStatus CreateRSAKeyPair(int size_in_bits,
}
base::mac::ScopedCFTypeRef<SecKeychainRef> scoped_keychain(keychain);
{
- AutoLock locked(base::GetMacSecurityServicesLock());
+ base::AutoLock locked(base::GetMacSecurityServicesLock());
err = SecKeyCreatePair(
keychain,
CSSM_ALGID_RSA,
@@ -261,7 +261,7 @@ static OSStatus CreateSignatureContext(SecKeyRef key,
OSStatus err;
const CSSM_ACCESS_CREDENTIALS* credentials = NULL;
{
- AutoLock locked(base::GetMacSecurityServicesLock());
+ base::AutoLock locked(base::GetMacSecurityServicesLock());
err = SecKeyGetCredentials(key,
CSSM_ACL_AUTHORIZATION_SIGN,
kSecCredentialTypeDefault,
@@ -274,7 +274,7 @@ static OSStatus CreateSignatureContext(SecKeyRef key,
CSSM_CSP_HANDLE csp_handle = 0;
{
- AutoLock locked(base::GetMacSecurityServicesLock());
+ base::AutoLock locked(base::GetMacSecurityServicesLock());
err = SecKeyGetCSPHandle(key, &csp_handle);
}
if (err) {
@@ -284,7 +284,7 @@ static OSStatus CreateSignatureContext(SecKeyRef key,
const CSSM_KEY* cssm_key = NULL;
{
- AutoLock locked(base::GetMacSecurityServicesLock());
+ base::AutoLock locked(base::GetMacSecurityServicesLock());
err = SecKeyGetCSSMKey(key, &cssm_key);
}
if (err) {
diff --git a/net/base/listen_socket_unittest.cc b/net/base/listen_socket_unittest.cc
index 23dd089..53fc79b 100644
--- a/net/base/listen_socket_unittest.cc
+++ b/net/base/listen_socket_unittest.cc
@@ -73,13 +73,13 @@ void ListenSocketTester::TearDown() {
}
void ListenSocketTester::ReportAction(const ListenSocketTestAction& action) {
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
queue_.push_back(action);
cv_.Broadcast();
}
void ListenSocketTester::NextAction() {
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
while (queue_.empty())
cv_.Wait();
last_action_ = queue_.front();
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 804ff2a..99c6ea8 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -38,7 +38,6 @@
#include "base/i18n/icu_string_conversions.h"
#include "base/i18n/time_formatting.h"
#include "base/json/string_escape.h"
-#include "base/lock.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
@@ -51,6 +50,7 @@
#include "base/string_tokenizer.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/synchronization/lock.h"
#include "base/sys_string_conversions.h"
#include "base/time.h"
#include "base/utf_offset_string_conversions.h"
@@ -550,7 +550,7 @@ void SetExemplarSetForLang(const std::string& lang,
map.insert(std::make_pair(lang, lang_set));
}
-static Lock lang_set_lock;
+static base::Lock lang_set_lock;
// Returns true if all the characters in component_characters are used by
// the language |lang|.
@@ -560,7 +560,7 @@ bool IsComponentCoveredByLang(const icu::UnicodeSet& component_characters,
icu::UnicodeSet* lang_set;
// We're called from both the UI thread and the history thread.
{
- AutoLock lock(lang_set_lock);
+ base::AutoLock lock(lang_set_lock);
if (!GetExemplarSetForLang(lang, &lang_set)) {
UErrorCode status = U_ZERO_ERROR;
ULocaleData* uld = ulocdata_open(lang.c_str(), &status);
diff --git a/net/base/openssl_memory_private_key_store.cc b/net/base/openssl_memory_private_key_store.cc
index 6b65dbe..bc64b57 100644
--- a/net/base/openssl_memory_private_key_store.cc
+++ b/net/base/openssl_memory_private_key_store.cc
@@ -26,7 +26,7 @@ class OpenSSLMemoryKeyStore : public OpenSSLPrivateKeyStore {
}
virtual ~OpenSSLMemoryKeyStore() {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
for (std::vector<EVP_PKEY*>::iterator it = keys_.begin();
it != keys_.end(); ++it) {
EVP_PKEY_free(*it);
@@ -35,13 +35,13 @@ class OpenSSLMemoryKeyStore : public OpenSSLPrivateKeyStore {
virtual bool StorePrivateKey(const GURL& url, EVP_PKEY* pkey) {
CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
keys_.push_back(pkey);
return true;
}
virtual EVP_PKEY* FetchPrivateKey(EVP_PKEY* pkey) {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
for (std::vector<EVP_PKEY*>::iterator it = keys_.begin();
it != keys_.end(); ++it) {
if (EVP_PKEY_cmp(*it, pkey) == 1)
diff --git a/net/base/test_completion_callback_unittest.cc b/net/base/test_completion_callback_unittest.cc
index a0ae9bf..d0274e4 100644
--- a/net/base/test_completion_callback_unittest.cc
+++ b/net/base/test_completion_callback_unittest.cc
@@ -55,7 +55,7 @@ class ExampleEmployer::ExampleWorker
ExampleEmployer* employer_;
CompletionCallback* callback_;
// Used to post ourselves onto the origin thread.
- Lock origin_loop_lock_;
+ base::Lock origin_loop_lock_;
MessageLoop* origin_loop_;
};
@@ -68,7 +68,7 @@ void ExampleEmployer::ExampleWorker::DoWork() {
// The origin loop could go away while we are trying to post to it, so we
// need to call its PostTask method inside a lock. See ~ExampleEmployer.
{
- AutoLock locked(origin_loop_lock_);
+ base::AutoLock locked(origin_loop_lock_);
if (origin_loop_) {
origin_loop_->PostTask(FROM_HERE, reply);
reply = NULL;
diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc
index 7385743..b705790 100644
--- a/net/base/x509_certificate.cc
+++ b/net/base/x509_certificate.cc
@@ -64,7 +64,7 @@ class X509CertificateCache {
// You must acquire this lock before using any private data of this object.
// You must not block while holding this lock.
- Lock lock_;
+ base::Lock lock_;
// The certificate cache. You must acquire |lock_| before using |cache_|.
CertMap cache_;
@@ -79,7 +79,7 @@ base::LazyInstance<X509CertificateCache,
// Insert |cert| into the cache. The cache does NOT AddRef |cert|.
// Any existing certificate with the same fingerprint will be replaced.
void X509CertificateCache::Insert(X509Certificate* cert) {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
DCHECK(!IsNullFingerprint(cert->fingerprint())) <<
"Only insert certs with real fingerprints.";
@@ -89,7 +89,7 @@ void X509CertificateCache::Insert(X509Certificate* cert) {
// Remove |cert| from the cache. The cache does not assume that |cert| is
// already in the cache.
void X509CertificateCache::Remove(X509Certificate* cert) {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
CertMap::iterator pos(cache_.find(cert->fingerprint()));
if (pos == cache_.end())
@@ -101,7 +101,7 @@ void X509CertificateCache::Remove(X509Certificate* cert) {
// not exist, this method returns NULL.
X509Certificate* X509CertificateCache::Find(
const SHA1Fingerprint& fingerprint) {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
CertMap::iterator pos(cache_.find(fingerprint));
if (pos == cache_.end())
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h
index 47178f5..961c68a 100644
--- a/net/base/x509_certificate.h
+++ b/net/base/x509_certificate.h
@@ -24,7 +24,7 @@
#include <CoreFoundation/CFArray.h>
#include <Security/SecBase.h>
-#include "base/lock.h"
+#include "base/synchronization/lock.h"
#elif defined(USE_OPENSSL)
// Forward declaration; real one in <x509.h>
struct x509_st;
@@ -370,7 +370,7 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
#if defined(OS_MACOSX)
// Blocks multiple threads from verifying the cert simultaneously.
// (Marked mutable because it's used in a const method.)
- mutable Lock verification_lock_;
+ mutable base::Lock verification_lock_;
#endif
// Where the certificate comes from.
diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
index fd965cb3..7c5cc64 100644
--- a/net/base/x509_certificate_mac.cc
+++ b/net/base/x509_certificate_mac.cc
@@ -471,7 +471,7 @@ int X509Certificate::Verify(const std::string& hostname, int flags,
// of sporadic crashes in the SecTrustEvaluate call below, way down inside
// Apple's cert code, which we suspect are caused by a thread-safety issue.
// So as a speculative fix allow only one thread to use SecTrust on this cert.
- AutoLock lock(verification_lock_);
+ base::AutoLock lock(verification_lock_);
SecTrustRef trust_ref = NULL;
status = SecTrustCreateWithCertificates(cert_array, ssl_policy, &trust_ref);
diff --git a/net/http/disk_cache_based_ssl_host_info.h b/net/http/disk_cache_based_ssl_host_info.h
index c094163..2beb7e4 100644
--- a/net/http/disk_cache_based_ssl_host_info.h
+++ b/net/http/disk_cache_based_ssl_host_info.h
@@ -7,7 +7,6 @@
#include <string>
-#include "base/lock.h"
#include "base/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "base/weak_ptr.h"
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc
index d541370..f4a5443 100644
--- a/net/ocsp/nss_ocsp.cc
+++ b/net/ocsp/nss_ocsp.cc
@@ -17,7 +17,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
-#include "base/lock.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
@@ -25,6 +24,7 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/synchronization/condition_variable.h"
+#include "base/synchronization/lock.h"
#include "base/threading/thread_checker.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
diff --git a/net/proxy/polling_proxy_config_service.cc b/net/proxy/polling_proxy_config_service.cc
index 01acac2..7526c19 100644
--- a/net/proxy/polling_proxy_config_service.cc
+++ b/net/proxy/polling_proxy_config_service.cc
@@ -4,10 +4,10 @@
#include "net/proxy/polling_proxy_config_service.h"
-#include "base/lock.h"
#include "base/message_loop_proxy.h"
#include "base/observer_list.h"
#include "base/scoped_ptr.h"
+#include "base/synchronization/lock.h"
#include "base/threading/worker_pool.h"
#include "net/proxy/proxy_config.h"
@@ -32,7 +32,7 @@ class PollingProxyConfigService::Core
// Called when the parent PollingProxyConfigService is destroyed
// (observers should not be called past this point).
void Orphan() {
- AutoLock l(lock_);
+ base::AutoLock l(lock_);
origin_loop_proxy_ = NULL;
}
@@ -99,7 +99,7 @@ class PollingProxyConfigService::Core
ProxyConfig config;
func(&config);
- AutoLock l(lock_);
+ base::AutoLock l(lock_);
if (origin_loop_proxy_) {
origin_loop_proxy_->PostTask(
FROM_HERE,
@@ -145,7 +145,7 @@ class PollingProxyConfigService::Core
base::TimeTicks last_poll_time_;
base::TimeDelta poll_interval_;
- Lock lock_;
+ base::Lock lock_;
scoped_refptr<base::MessageLoopProxy> origin_loop_proxy_;
bool have_initialized_origin_loop_;
diff --git a/net/proxy/sync_host_resolver_bridge.cc b/net/proxy/sync_host_resolver_bridge.cc
index 37a847f..80270f6 100644
--- a/net/proxy/sync_host_resolver_bridge.cc
+++ b/net/proxy/sync_host_resolver_bridge.cc
@@ -6,8 +6,8 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
-#include "base/lock.h"
#include "base/message_loop.h"
+#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
@@ -26,7 +26,7 @@ class SyncHostResolverBridge::Core
// Returns true if Shutdown() has been called.
bool HasShutdown() const {
- AutoLock l(lock_);
+ base::AutoLock l(lock_);
return HasShutdownLocked();
}
@@ -66,7 +66,7 @@ class SyncHostResolverBridge::Core
bool has_shutdown_;
// Mutex to guard accesses to |has_shutdown_|.
- mutable Lock lock_;
+ mutable base::Lock lock_;
DISALLOW_COPY_AND_ASSIGN(Core);
};
@@ -121,7 +121,7 @@ int SyncHostResolverBridge::Core::WaitForResolveCompletion() {
event_.Wait();
{
- AutoLock l(lock_);
+ base::AutoLock l(lock_);
if (HasShutdownLocked())
return ERR_ABORTED;
event_.Reset();
@@ -139,7 +139,7 @@ void SyncHostResolverBridge::Core::Shutdown() {
}
{
- AutoLock l(lock_);
+ base::AutoLock l(lock_);
has_shutdown_ = true;
}
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index e485c8a..169776a 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -10,10 +10,10 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
-#include "base/lock.h"
#include "base/metrics/histogram.h"
#include "base/openssl_util.h"
#include "base/singleton.h"
+#include "base/synchronization/lock.h"
#include "net/base/cert_verifier.h"
#include "net/base/net_errors.h"
#include "net/base/openssl_private_key_store.h"
@@ -207,7 +207,7 @@ class SSLSessionCache {
// Declare the session cleaner-upper before the lock, so any call into
// OpenSSL to free the session will happen after the lock is released.
base::ScopedOpenSSL<SSL_SESSION, SSL_SESSION_free> session_to_free;
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
DCHECK_EQ(0U, session_map_.count(session));
std::pair<HostPortMap::iterator, bool> res =
@@ -229,7 +229,7 @@ class SSLSessionCache {
// Declare the session cleaner-upper before the lock, so any call into
// OpenSSL to free the session will happen after the lock is released.
base::ScopedOpenSSL<SSL_SESSION, SSL_SESSION_free> session_to_free;
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
SessionMap::iterator it = session_map_.find(session);
if (it == session_map_.end())
@@ -246,7 +246,7 @@ class SSLSessionCache {
// Looks up the host:port in the cache, and if a session is found it is added
// to |ssl|, returning true on success.
bool SetSSLSession(SSL* ssl, const HostPortPair& host_and_port) {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
HostPortMap::iterator it = host_port_map_.find(host_and_port);
if (it == host_port_map_.end())
return false;
@@ -274,7 +274,7 @@ class SSLSessionCache {
SessionMap session_map_;
// Protects access to both the above maps.
- Lock lock_;
+ base::Lock lock_;
DISALLOW_COPY_AND_ASSIGN(SSLSessionCache);
};
diff --git a/net/socket/ssl_client_socket_win.cc b/net/socket/ssl_client_socket_win.cc
index ae4d4b5..5a37de8 100644
--- a/net/socket/ssl_client_socket_win.cc
+++ b/net/socket/ssl_client_socket_win.cc
@@ -9,9 +9,9 @@
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
-#include "base/lock.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
+#include "base/synchronization/lock.h"
#include "base/utf_string_conversions.h"
#include "net/base/cert_verifier.h"
#include "net/base/connection_type_histograms.h"
@@ -149,7 +149,7 @@ class CredHandleTable {
DCHECK(0 < ssl_version_mask &&
ssl_version_mask < arraysize(anonymous_creds_));
CredHandleClass* handle;
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
if (client_cert) {
CredHandleMapKey key = std::make_pair(client_cert, ssl_version_mask);
CredHandleMap::const_iterator it = client_cert_creds_.find(key);
@@ -184,7 +184,7 @@ class CredHandleTable {
PCCERT_CONTEXT client_cert,
int ssl_version_mask);
- Lock lock_;
+ base::Lock lock_;
// Anonymous (no client certificate) CredHandles for all possible
// combinations of SSL versions. Defined as an array for fast lookup.
diff --git a/net/socket_stream/socket_stream_job_manager.cc b/net/socket_stream/socket_stream_job_manager.cc
index de2f0a8..105fc3e 100644
--- a/net/socket_stream/socket_stream_job_manager.cc
+++ b/net/socket_stream/socket_stream_job_manager.cc
@@ -31,7 +31,7 @@ SocketStreamJob* SocketStreamJobManager::CreateJob(
const std::string& scheme = url.scheme(); // already lowercase
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
FactoryMap::const_iterator found = factories_.find(scheme);
if (found != factories_.end()) {
SocketStreamJob* job = found->second(url, delegate);
@@ -46,7 +46,7 @@ SocketStreamJob* SocketStreamJobManager::CreateJob(
SocketStreamJob::ProtocolFactory*
SocketStreamJobManager::RegisterProtocolFactory(
const std::string& scheme, SocketStreamJob::ProtocolFactory* factory) {
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
SocketStreamJob::ProtocolFactory* old_factory;
FactoryMap::iterator found = factories_.find(scheme);
diff --git a/net/socket_stream/socket_stream_job_manager.h b/net/socket_stream/socket_stream_job_manager.h
index fbd572d..c9050f6 100644
--- a/net/socket_stream/socket_stream_job_manager.h
+++ b/net/socket_stream/socket_stream_job_manager.h
@@ -35,7 +35,7 @@ class SocketStreamJobManager {
SocketStreamJobManager();
~SocketStreamJobManager();
- mutable Lock lock_;
+ mutable base::Lock lock_;
FactoryMap factories_;
DISALLOW_COPY_AND_ASSIGN(SocketStreamJobManager);
diff --git a/net/tools/flip_server/flip_in_mem_edsm_server.cc b/net/tools/flip_server/flip_in_mem_edsm_server.cc
index cc34d44..e2436e2 100644
--- a/net/tools/flip_server/flip_in_mem_edsm_server.cc
+++ b/net/tools/flip_server/flip_in_mem_edsm_server.cc
@@ -21,9 +21,9 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/synchronization/lock.h"
#include "base/threading/simple_thread.h"
#include "base/timer.h"
-#include "base/lock.h"
#include "net/spdy/spdy_frame_builder.h"
#include "net/spdy/spdy_framer.h"
#include "net/spdy/spdy_protocol.h"
@@ -2781,15 +2781,15 @@ class Notification {
explicit Notification(bool value) : value_(value) {}
void Notify() {
- AutoLock al(lock_);
+ base::AutoLock al(lock_);
value_ = true;
}
bool HasBeenNotified() {
- AutoLock al(lock_);
+ base::AutoLock al(lock_);
return value_;
}
bool value_;
- Lock lock_;
+ base::Lock lock_;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/net/url_request/url_request_file_job.cc b/net/url_request/url_request_file_job.cc
index adc6f44..7a1599a 100644
--- a/net/url_request/url_request_file_job.cc
+++ b/net/url_request/url_request_file_job.cc
@@ -23,6 +23,7 @@
#include "base/message_loop.h"
#include "base/platform_file.h"
#include "base/string_util.h"
+#include "base/synchronization/lock.h"
#include "base/threading/worker_pool.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
@@ -50,7 +51,7 @@ class URLRequestFileJob::AsyncResolver
void Resolve(const FilePath& file_path) {
base::PlatformFileInfo file_info;
bool exists = file_util::GetFileInfo(file_path, &file_info);
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
if (owner_loop_) {
owner_loop_->PostTask(FROM_HERE, NewRunnableMethod(
this, &AsyncResolver::ReturnResults, exists, file_info));
@@ -60,7 +61,7 @@ class URLRequestFileJob::AsyncResolver
void Cancel() {
owner_ = NULL;
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
owner_loop_ = NULL;
}
@@ -76,7 +77,7 @@ class URLRequestFileJob::AsyncResolver
URLRequestFileJob* owner_;
- Lock lock_;
+ base::Lock lock_;
MessageLoop* owner_loop_;
};
#endif
diff --git a/net/url_request/url_request_job_manager.cc b/net/url_request/url_request_job_manager.cc
index c630ba2..f311cc4 100644
--- a/net/url_request/url_request_job_manager.cc
+++ b/net/url_request/url_request_job_manager.cc
@@ -152,7 +152,7 @@ net::URLRequestJob* URLRequestJobManager::MaybeInterceptResponse(
bool URLRequestJobManager::SupportsScheme(const std::string& scheme) const {
// The set of registered factories may change on another thread.
{
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
if (factories_.find(scheme) != factories_.end())
return true;
}
@@ -171,7 +171,7 @@ net::URLRequest::ProtocolFactory* URLRequestJobManager::RegisterProtocolFactory(
DCHECK(IsAllowedThread());
#endif
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
net::URLRequest::ProtocolFactory* old_factory;
FactoryMap::iterator i = factories_.find(scheme);
@@ -194,7 +194,7 @@ void URLRequestJobManager::RegisterRequestInterceptor(
DCHECK(IsAllowedThread());
#endif
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
DCHECK(std::find(interceptors_.begin(), interceptors_.end(), interceptor) ==
interceptors_.end());
@@ -207,7 +207,7 @@ void URLRequestJobManager::UnregisterRequestInterceptor(
DCHECK(IsAllowedThread());
#endif
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
InterceptorList::iterator i =
std::find(interceptors_.begin(), interceptors_.end(), interceptor);
diff --git a/net/url_request/url_request_job_manager.h b/net/url_request/url_request_job_manager.h
index 34e3a58..e4efcf5 100644
--- a/net/url_request/url_request_job_manager.h
+++ b/net/url_request/url_request_job_manager.h
@@ -10,7 +10,7 @@
#include <string>
#include <vector>
-#include "base/lock.h"
+#include "base/synchronization/lock.h"
#include "base/threading/platform_thread.h"
#include "net/url_request/url_request.h"
@@ -76,7 +76,7 @@ class URLRequestJobManager {
URLRequestJobManager();
~URLRequestJobManager();
- mutable Lock lock_;
+ mutable base::Lock lock_;
FactoryMap factories_;
InterceptorList interceptors_;
bool enable_file_access_;