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

Side by Side Diff: net/ssl/server_bound_cert_service.cc

Issue 338093012: Fix SSLClientSocketOpenSSL error-handling for Channel ID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add error code. Created 6 years, 6 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 "net/ssl/server_bound_cert_service.h" 5 #include "net/ssl/server_bound_cert_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } 509 }
510 510
511 if (err == OK) { 511 if (err == OK) {
512 // Async DB lookup found a valid cert. 512 // Async DB lookup found a valid cert.
513 DVLOG(1) << "Cert store had valid cert for " << server_identifier; 513 DVLOG(1) << "Cert store had valid cert for " << server_identifier;
514 cert_store_hits_++; 514 cert_store_hits_++;
515 // ServerBoundCertServiceRequest::Post will do the histograms and stuff. 515 // ServerBoundCertServiceRequest::Post will do the histograms and stuff.
516 HandleResult(OK, server_identifier, key, cert); 516 HandleResult(OK, server_identifier, key, cert);
517 return; 517 return;
518 } 518 }
519 // Async lookup did not find a valid cert. If no request asked to create one, 519 // Async lookup failed. If lookup gave an error or failed to find a valid cert
wtc 2014/06/19 22:00:11 What does "lookup gave an error" mean? It seems to
davidben 2014/06/19 22:36:38 Oh yeah, I meant to explain this here. Yeah, ERR_F
520 // return the error directly. 520 // and no request asked to create one, return the error directly.
521 if (!j->second->CreateIfMissing()) { 521 if (err != ERR_FILE_NOT_FOUND || !j->second->CreateIfMissing()) {
522 HandleResult(err, server_identifier, key, cert); 522 HandleResult(err, server_identifier, key, cert);
523 return; 523 return;
524 } 524 }
525 // At least one request asked to create a cert => start generating a new one. 525 // At least one request asked to create a cert => start generating a new one.
526 workers_created_++; 526 workers_created_++;
527 ServerBoundCertServiceWorker* worker = new ServerBoundCertServiceWorker( 527 ServerBoundCertServiceWorker* worker = new ServerBoundCertServiceWorker(
528 server_identifier, 528 server_identifier,
529 base::Bind(&ServerBoundCertService::GeneratedServerBoundCert, 529 base::Bind(&ServerBoundCertService::GeneratedServerBoundCert,
530 weak_ptr_factory_.GetWeakPtr())); 530 weak_ptr_factory_.GetWeakPtr()));
531 if (!worker->Start(task_runner_)) { 531 if (!worker->Start(task_runner_)) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 667 }
668 668
669 return err; 669 return err;
670 } 670 }
671 671
672 int ServerBoundCertService::cert_count() { 672 int ServerBoundCertService::cert_count() {
673 return server_bound_cert_store_->GetCertCount(); 673 return server_bound_cert_store_->GetCertCount();
674 } 674 }
675 675
676 } // namespace net 676 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698