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

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

Issue 10860073: SPDY - A histogram to track spdy versions negotiated by chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« net/socket/next_proto.h ('K') | « net/socket/next_proto.h ('k') | no next file » | 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 <map> 7 #include <map>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 398
399 DCHECK(protocol >= kProtoSPDY2); 399 DCHECK(protocol >= kProtoSPDY2);
400 DCHECK(protocol <= kProtoSPDY3); 400 DCHECK(protocol <= kProtoSPDY3);
401 int version = (protocol == kProtoSPDY3) ? 3 : 2; 401 int version = (protocol == kProtoSPDY3) ? 3 : 2;
402 flow_control_ = (protocol >= kProtoSPDY3); 402 flow_control_ = (protocol >= kProtoSPDY3);
403 403
404 buffered_spdy_framer_.reset(new BufferedSpdyFramer(version)); 404 buffered_spdy_framer_.reset(new BufferedSpdyFramer(version));
405 buffered_spdy_framer_->set_visitor(this); 405 buffered_spdy_framer_->set_visitor(this);
406 SendInitialSettings(); 406 SendInitialSettings();
407 UMA_HISTOGRAM_ENUMERATION("Net.SpdyVersion", protocol, kProtoMaximumVersion);
407 408
408 // Write out any data that we might have to send, such as the settings frame. 409 // Write out any data that we might have to send, such as the settings frame.
409 WriteSocketLater(); 410 WriteSocketLater();
410 net::Error error = ReadSocket(); 411 net::Error error = ReadSocket();
411 if (error == ERR_IO_PENDING) 412 if (error == ERR_IO_PENDING)
412 return OK; 413 return OK;
413 return error; 414 return error;
414 } 415 }
415 416
416 bool SpdySession::VerifyDomainAuthentication(const std::string& domain) { 417 bool SpdySession::VerifyDomainAuthentication(const std::string& domain) {
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 SSLClientSocket* SpdySession::GetSSLClientSocket() const { 1991 SSLClientSocket* SpdySession::GetSSLClientSocket() const {
1991 if (!is_secure_) 1992 if (!is_secure_)
1992 return NULL; 1993 return NULL;
1993 SSLClientSocket* ssl_socket = 1994 SSLClientSocket* ssl_socket =
1994 reinterpret_cast<SSLClientSocket*>(connection_->socket()); 1995 reinterpret_cast<SSLClientSocket*>(connection_->socket());
1995 DCHECK(ssl_socket); 1996 DCHECK(ssl_socket);
1996 return ssl_socket; 1997 return ssl_socket;
1997 } 1998 }
1998 1999
1999 } // namespace net 2000 } // namespace net
OLDNEW
« net/socket/next_proto.h ('K') | « net/socket/next_proto.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698