| Index: net/socket/next_proto.cc
|
| diff --git a/net/socket/next_proto.cc b/net/socket/next_proto.cc
|
| index c9172365c383fec7e0a1089b3284fb1c0d7aa7cd..d7f8abb3c88ec86eee7f7f1bee0e0de6b3d94fef 100644
|
| --- a/net/socket/next_proto.cc
|
| +++ b/net/socket/next_proto.cc
|
| @@ -2,10 +2,32 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "next_proto.h"
|
| +#include "net/socket/next_proto.h"
|
| +
|
| +#include "base/logging.h"
|
|
|
| namespace net {
|
|
|
| +unsigned int SpdyProtoPermanentValue(NextProto protocol) {
|
| + // These values are collected by UMA, do not change or reuse them. When
|
| + // adding new values, do not forget to update spdyProtoPermanentValueBoundary.
|
| + switch (protocol) {
|
| + case kProtoDeprecatedSPDY2:
|
| + return 1;
|
| + case kProtoSPDY3:
|
| + return 2;
|
| + case kProtoSPDY31:
|
| + return 3;
|
| + // SPDY4 currently is HTTP/2 draft-14.
|
| + // TODO(bnc): increment when we update to new draft or final specification.
|
| + case kProtoSPDY4:
|
| + return 4;
|
| + default:
|
| + NOTREACHED() << "Invalid SPDY protocol.";
|
| + return 0;
|
| + }
|
| +}
|
| +
|
| NextProtoVector NextProtosHttpOnly() {
|
| NextProtoVector next_protos;
|
| next_protos.push_back(kProtoHTTP11);
|
|
|