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

Side by Side Diff: content/browser/ssl/ssl_client_auth_handler.cc

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 "content/browser/ssl/ssl_client_auth_handler.h" 5 #include "content/browser/ssl/ssl_client_auth_handler.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // to outlive SSLClientAuthHandler if needbe. 81 // to outlive SSLClientAuthHandler if needbe.
82 class SSLClientAuthHandler::Core : public base::RefCountedThreadSafe<Core> { 82 class SSLClientAuthHandler::Core : public base::RefCountedThreadSafe<Core> {
83 public: 83 public:
84 Core(const base::WeakPtr<SSLClientAuthHandler>& handler, 84 Core(const base::WeakPtr<SSLClientAuthHandler>& handler,
85 scoped_ptr<net::ClientCertStore> client_cert_store, 85 scoped_ptr<net::ClientCertStore> client_cert_store,
86 net::SSLCertRequestInfo* cert_request_info) 86 net::SSLCertRequestInfo* cert_request_info)
87 : handler_(handler), 87 : handler_(handler),
88 client_cert_store_(std::move(client_cert_store)), 88 client_cert_store_(std::move(client_cert_store)),
89 cert_request_info_(cert_request_info) {} 89 cert_request_info_(cert_request_info) {}
90 90
91 bool has_client_cert_store() const { return client_cert_store_; } 91 bool has_client_cert_store() const { return !!client_cert_store_; }
92 92
93 void GetClientCerts() { 93 void GetClientCerts() {
94 if (client_cert_store_) { 94 if (client_cert_store_) {
95 // TODO(davidben): This is still a cyclical ownership where 95 // TODO(davidben): This is still a cyclical ownership where
96 // GetClientCerts' requirement that |client_cert_store_| remains alive 96 // GetClientCerts' requirement that |client_cert_store_| remains alive
97 // until the call completes is maintained by the reference held in the 97 // until the call completes is maintained by the reference held in the
98 // callback. 98 // callback.
99 client_cert_store_->GetClientCerts( 99 client_cert_store_->GetClientCerts(
100 *cert_request_info_, &cert_request_info_->client_certs, 100 *cert_request_info_, &cert_request_info_->client_certs,
101 base::Bind(&SSLClientAuthHandler::Core::DidGetClientCerts, this)); 101 base::Bind(&SSLClientAuthHandler::Core::DidGetClientCerts, this));
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 197
198 BrowserThread::PostTask( 198 BrowserThread::PostTask(
199 BrowserThread::UI, FROM_HERE, 199 BrowserThread::UI, FROM_HERE,
200 base::Bind(&SelectCertificateOnUIThread, render_process_host_id, 200 base::Bind(&SelectCertificateOnUIThread, render_process_host_id,
201 render_frame_host_id, cert_request_info_, 201 render_frame_host_id, cert_request_info_,
202 weak_factory_.GetWeakPtr())); 202 weak_factory_.GetWeakPtr()));
203 } 203 }
204 204
205 } // namespace content 205 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698