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

Unified Diff: net/socket/next_proto.cc

Issue 1371263002: Refactor SSLClientSocket::SerializeNextProtos(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move DisableHTTP2 to next_protos. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/next_proto.h ('k') | net/socket/ssl_client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/next_proto.cc
diff --git a/net/socket/next_proto.cc b/net/socket/next_proto.cc
index 0a803728ec8553598cf3f22fc76a07fa9b94abe7..0285044c21fa20a5adbad39e4e9e9cb1789c8013 100644
--- a/net/socket/next_proto.cc
+++ b/net/socket/next_proto.cc
@@ -40,4 +40,15 @@ bool NextProtoIsSPDY(NextProto next_proto) {
next_proto <= kProtoSPDYMaximumVersion;
}
+void DisableHTTP2(NextProtoVector* next_protos) {
+ for (NextProtoVector::iterator it = next_protos->begin();
+ it != next_protos->end();) {
+ if (*it == kProtoHTTP2) {
+ it = next_protos->erase(it);
+ continue;
+ }
+ ++it;
+ }
+}
+
} // namespace net
« no previous file with comments | « net/socket/next_proto.h ('k') | net/socket/ssl_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698