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

Side by Side Diff: net/cert/multi_threaded_cert_verifier.cc

Issue 2101863004: net: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/ct_known_logs.cc ('k') | net/cookies/cookie_monster.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/multi_threaded_cert_verifier.h" 5 #include "net/cert/multi_threaded_cert_verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // Posts a task to the worker pool to do the verification. Once the 226 // Posts a task to the worker pool to do the verification. Once the
227 // verification has completed on the worker thread, it will call 227 // verification has completed on the worker thread, it will call
228 // OnJobCompleted() on the origin thread. 228 // OnJobCompleted() on the origin thread.
229 bool Start(const scoped_refptr<CertVerifyProc>& verify_proc, 229 bool Start(const scoped_refptr<CertVerifyProc>& verify_proc,
230 const scoped_refptr<CRLSet>& crl_set) { 230 const scoped_refptr<CRLSet>& crl_set) {
231 // Owned by the bound reply callback. 231 // Owned by the bound reply callback.
232 std::unique_ptr<ResultHelper> owned_result(new ResultHelper()); 232 std::unique_ptr<ResultHelper> owned_result(new ResultHelper());
233 233
234 // Parameter evaluation order is undefined in C++. Ensure the pointer value 234 // Parameter evaluation order is undefined in C++. Ensure the pointer value
235 // is gotten before calling base::Passed(). 235 // is gotten before calling base::Passed().
236 auto result = owned_result.get(); 236 auto* result = owned_result.get();
237 237
238 return base::WorkerPool::PostTaskAndReply( 238 return base::WorkerPool::PostTaskAndReply(
239 FROM_HERE, 239 FROM_HERE,
240 base::Bind(&DoVerifyOnWorkerThread, verify_proc, key_.certificate(), 240 base::Bind(&DoVerifyOnWorkerThread, verify_proc, key_.certificate(),
241 key_.hostname(), key_.ocsp_response(), key_.flags(), crl_set, 241 key_.hostname(), key_.ocsp_response(), key_.flags(), crl_set,
242 key_.additional_trust_anchors(), &result->error, 242 key_.additional_trust_anchors(), &result->error,
243 &result->result), 243 &result->result),
244 base::Bind(&CertVerifierJob::OnJobCompleted, 244 base::Bind(&CertVerifierJob::OnJobCompleted,
245 weak_ptr_factory_.GetWeakPtr(), base::Passed(&owned_result)), 245 weak_ptr_factory_.GetWeakPtr(), base::Passed(&owned_result)),
246 true /* task is slow */); 246 true /* task is slow */);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // The JobSet is kept in sorted order so items can be found using binary 417 // The JobSet is kept in sorted order so items can be found using binary
418 // search. 418 // search.
419 auto it = std::lower_bound(inflight_.begin(), inflight_.end(), key, 419 auto it = std::lower_bound(inflight_.begin(), inflight_.end(), key,
420 JobToRequestParamsComparator()); 420 JobToRequestParamsComparator());
421 if (it != inflight_.end() && !(key < (*it)->key())) 421 if (it != inflight_.end() && !(key < (*it)->key()))
422 return *it; 422 return *it;
423 return nullptr; 423 return nullptr;
424 } 424 }
425 425
426 } // namespace net 426 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/ct_known_logs.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698