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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 27624002: Add a histogram for measuring the number of times we fall back to common name matching, when a cert… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 7 years, 1 month 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 | « net/cert/x509_certificate_unittest.cc ('k') | tools/metrics/histograms/histograms.xml » ('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/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 if (availability_state_ == STATE_CLOSED) 563 if (availability_state_ == STATE_CLOSED)
564 return false; 564 return false;
565 565
566 SSLInfo ssl_info; 566 SSLInfo ssl_info;
567 bool was_npn_negotiated; 567 bool was_npn_negotiated;
568 NextProto protocol_negotiated = kProtoUnknown; 568 NextProto protocol_negotiated = kProtoUnknown;
569 if (!GetSSLInfo(&ssl_info, &was_npn_negotiated, &protocol_negotiated)) 569 if (!GetSSLInfo(&ssl_info, &was_npn_negotiated, &protocol_negotiated))
570 return true; // This is not a secure session, so all domains are okay. 570 return true; // This is not a secure session, so all domains are okay.
571 571
572 bool unused = false;
572 return !ssl_info.client_cert_sent && 573 return !ssl_info.client_cert_sent &&
573 (enable_credential_frames_ || !ssl_info.channel_id_sent || 574 (enable_credential_frames_ || !ssl_info.channel_id_sent ||
574 ServerBoundCertService::GetDomainForHost(domain) == 575 ServerBoundCertService::GetDomainForHost(domain) ==
575 ServerBoundCertService::GetDomainForHost(host_port_pair().host())) && 576 ServerBoundCertService::GetDomainForHost(host_port_pair().host())) &&
576 ssl_info.cert->VerifyNameMatch(domain); 577 ssl_info.cert->VerifyNameMatch(domain, &unused);
577 } 578 }
578 579
579 int SpdySession::GetPushStream( 580 int SpdySession::GetPushStream(
580 const GURL& url, 581 const GURL& url,
581 base::WeakPtr<SpdyStream>* stream, 582 base::WeakPtr<SpdyStream>* stream,
582 const BoundNetLog& stream_net_log) { 583 const BoundNetLog& stream_net_log) {
583 CHECK(!in_io_loop_); 584 CHECK(!in_io_loop_);
584 585
585 stream->reset(); 586 stream->reset();
586 587
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2973 if (!queue->empty()) { 2974 if (!queue->empty()) {
2974 SpdyStreamId stream_id = queue->front(); 2975 SpdyStreamId stream_id = queue->front();
2975 queue->pop_front(); 2976 queue->pop_front();
2976 return stream_id; 2977 return stream_id;
2977 } 2978 }
2978 } 2979 }
2979 return 0; 2980 return 0;
2980 } 2981 }
2981 2982
2982 } // namespace net 2983 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate_unittest.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698