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

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 18121007: *WIP* Store NSS slots per profile. Move keygen to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanups, add test for chrome keygen class Created 7 years, 3 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
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/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 net::URLRequest* unused, 299 net::URLRequest* unused,
300 net::SSLCertRequestInfo* cert_info) { 300 net::SSLCertRequestInfo* cert_info) {
301 DCHECK_EQ(request_.get(), unused); 301 DCHECK_EQ(request_.get(), unused);
302 302
303 if (!delegate_->AcceptSSLClientCertificateRequest(this, cert_info)) { 303 if (!delegate_->AcceptSSLClientCertificateRequest(this, cert_info)) {
304 request_->Cancel(); 304 request_->Cancel();
305 return; 305 return;
306 } 306 }
307 307
308 #if !defined(USE_OPENSSL) 308 #if !defined(USE_OPENSSL)
309 // XXX
310 //ResourceRequestInfoImpl* info = GetRequestInfo();
311 //ResourceContext* context = info->context;
312 //XXX: needs to go through chrome:
313 //ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
314 //crypto::ScopedPK11Slot slot(io_data->GetFooNSSKeySlot())
315 //XX maybe:
316 //ClientCertStore should be a content interface, implemneted by chrome/, and
317 //takes resourceContext argument. Chrome impl can get proper slot and call
318 //into per-platform net implementation of clientcertstore, similar to keygen.
319 // XXX how would we get the chrome impl of ClientCertStore into this class?
309 client_cert_store_->GetClientCerts(*cert_info, &cert_info->client_certs); 320 client_cert_store_->GetClientCerts(*cert_info, &cert_info->client_certs);
310 if (cert_info->client_certs.empty()) { 321 if (cert_info->client_certs.empty()) {
311 // No need to query the user if there are no certs to choose from. 322 // No need to query the user if there are no certs to choose from.
312 request_->ContinueWithCertificate(NULL); 323 request_->ContinueWithCertificate(NULL);
313 return; 324 return;
314 } 325 }
315 #endif 326 #endif
316 327
317 DCHECK(!ssl_client_auth_handler_.get()) 328 DCHECK(!ssl_client_auth_handler_.get())
318 << "OnCertificateRequested called with ssl_client_auth_handler pending"; 329 << "OnCertificateRequested called with ssl_client_auth_handler pending";
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // we resume. 677 // we resume.
667 deferred_stage_ = DEFERRED_FINISH; 678 deferred_stage_ = DEFERRED_FINISH;
668 } 679 }
669 } 680 }
670 681
671 void ResourceLoader::CallDidFinishLoading() { 682 void ResourceLoader::CallDidFinishLoading() {
672 delegate_->DidFinishLoading(this); 683 delegate_->DidFinishLoading(this);
673 } 684 }
674 685
675 } // namespace content 686 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698