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

Side by Side Diff: net/base/cert_verifier.cc

Issue 6079009: Move some misc thread-related stuff from base to base/thread and into the bas... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/renderer/pepper_devices.h ('k') | net/base/dnsrr_resolver.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/base/cert_verifier.h" 5 #include "net/base/cert_verifier.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/lock.h" 8 #include "base/lock.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
11 #include "base/worker_pool.h" 11 #include "base/threading/worker_pool.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "net/base/x509_certificate.h" 13 #include "net/base/x509_certificate.h"
14 14
15 #if defined(USE_NSS) 15 #if defined(USE_NSS)
16 #include <private/pprthred.h> // PR_DetachThread 16 #include <private/pprthred.h> // PR_DetachThread
17 #endif 17 #endif
18 18
19 namespace net { 19 namespace net {
20 20
21 //////////////////////////////////////////////////////////////////////////// 21 ////////////////////////////////////////////////////////////////////////////
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 flags_(flags), 129 flags_(flags),
130 origin_loop_(MessageLoop::current()), 130 origin_loop_(MessageLoop::current()),
131 cert_verifier_(cert_verifier), 131 cert_verifier_(cert_verifier),
132 canceled_(false), 132 canceled_(false),
133 error_(ERR_FAILED) { 133 error_(ERR_FAILED) {
134 } 134 }
135 135
136 bool Start() { 136 bool Start() {
137 DCHECK_EQ(MessageLoop::current(), origin_loop_); 137 DCHECK_EQ(MessageLoop::current(), origin_loop_);
138 138
139 return WorkerPool::PostTask( 139 return base::WorkerPool::PostTask(
140 FROM_HERE, NewRunnableMethod(this, &CertVerifierWorker::Run), 140 FROM_HERE, NewRunnableMethod(this, &CertVerifierWorker::Run),
141 true /* task is slow */); 141 true /* task is slow */);
142 } 142 }
143 143
144 // Cancel is called from the origin loop when the CertVerifier is getting 144 // Cancel is called from the origin loop when the CertVerifier is getting
145 // deleted. 145 // deleted.
146 void Cancel() { 146 void Cancel() {
147 DCHECK_EQ(MessageLoop::current(), origin_loop_); 147 DCHECK_EQ(MessageLoop::current(), origin_loop_);
148 AutoLock locked(lock_); 148 AutoLock locked(lock_);
149 canceled_ = true; 149 canceled_ = true;
150 } 150 }
151 151
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 cur_request_callback_ = NULL; 472 cur_request_callback_ = NULL;
473 473
474 // Call the user's original callback. 474 // Call the user's original callback.
475 callback->Run(result); 475 callback->Run(result);
476 } 476 }
477 477
478 } // namespace net 478 } // namespace net
479 479
480 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::CertVerifierWorker); 480 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::CertVerifierWorker);
481 481
OLDNEW
« no previous file with comments | « chrome/renderer/pepper_devices.h ('k') | net/base/dnsrr_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698