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

Side by Side Diff: net/cert_net/nss_ocsp.cc

Issue 2229393003: net: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
« no previous file with comments | « net/cert_net/cert_net_fetcher_impl.cc ('k') | net/dns/dns_session_unittest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/cert_net/nss_ocsp.h" 5 #include "net/cert_net/nss_ocsp.h"
6 6
7 #include <certt.h> 7 #include <certt.h>
8 #include <certdb.h> 8 #include <certdb.h>
9 #include <nspr.h> 9 #include <nspr.h>
10 #include <nss.h> 10 #include <nss.h>
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 if (io_loop_) 536 if (io_loop_)
537 io_loop_->task_runner()->PostTask(from_here, task); 537 io_loop_->task_runner()->PostTask(from_here, task);
538 } 538 }
539 539
540 void OCSPIOLoop::EnsureIOLoop() { 540 void OCSPIOLoop::EnsureIOLoop() {
541 base::AutoLock autolock(lock_); 541 base::AutoLock autolock(lock_);
542 DCHECK_EQ(base::MessageLoopForIO::current(), io_loop_); 542 DCHECK_EQ(base::MessageLoopForIO::current(), io_loop_);
543 } 543 }
544 544
545 void OCSPIOLoop::AddRequest(OCSPRequestSession* request) { 545 void OCSPIOLoop::AddRequest(OCSPRequestSession* request) {
546 DCHECK(!ContainsKey(requests_, request)); 546 DCHECK(!base::ContainsKey(requests_, request));
547 requests_.insert(request); 547 requests_.insert(request);
548 } 548 }
549 549
550 void OCSPIOLoop::RemoveRequest(OCSPRequestSession* request) { 550 void OCSPIOLoop::RemoveRequest(OCSPRequestSession* request) {
551 DCHECK(ContainsKey(requests_, request)); 551 DCHECK(base::ContainsKey(requests_, request));
552 requests_.erase(request); 552 requests_.erase(request);
553 } 553 }
554 554
555 void OCSPIOLoop::CancelAllRequests() { 555 void OCSPIOLoop::CancelAllRequests() {
556 // CancelURLRequest() always removes the request from the requests_ 556 // CancelURLRequest() always removes the request from the requests_
557 // set synchronously. 557 // set synchronously.
558 while (!requests_.empty()) 558 while (!requests_.empty())
559 (*requests_.begin())->CancelURLRequest(); 559 (*requests_.begin())->CancelURLRequest();
560 } 560 }
561 561
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) { 964 void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) {
965 pthread_mutex_lock(&g_request_context_lock); 965 pthread_mutex_lock(&g_request_context_lock);
966 if (request_context) { 966 if (request_context) {
967 DCHECK(!g_request_context); 967 DCHECK(!g_request_context);
968 } 968 }
969 g_request_context = request_context; 969 g_request_context = request_context;
970 pthread_mutex_unlock(&g_request_context_lock); 970 pthread_mutex_unlock(&g_request_context_lock);
971 } 971 }
972 972
973 } // namespace net 973 } // namespace net
OLDNEW
« no previous file with comments | « net/cert_net/cert_net_fetcher_impl.cc ('k') | net/dns/dns_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698