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 |