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

Side by Side Diff: components/domain_reliability/util.cc

Issue 724523002: Support HTTP/2 drafts 14 and 15 simultaneously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename CONNECTION_INFO_SPDY4 to CONNECTION_INFO_HTTP2. Created 6 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
« no previous file with comments | « chrome/browser/io_thread_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/domain_reliability/util.h" 5 #include "components/domain_reliability/util.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 std::string GetDomainReliabilityProtocol( 101 std::string GetDomainReliabilityProtocol(
102 net::HttpResponseInfo::ConnectionInfo connection_info, 102 net::HttpResponseInfo::ConnectionInfo connection_info,
103 bool ssl_info_populated) { 103 bool ssl_info_populated) {
104 switch (connection_info) { 104 switch (connection_info) {
105 case net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN: 105 case net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN:
106 return ""; 106 return "";
107 case net::HttpResponseInfo::CONNECTION_INFO_HTTP1: 107 case net::HttpResponseInfo::CONNECTION_INFO_HTTP1:
108 return ssl_info_populated ? "HTTPS" : "HTTP"; 108 return ssl_info_populated ? "HTTPS" : "HTTP";
109 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY2: 109 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY2:
110 case net::HttpResponseInfo::CONNECTION_INFO_SPDY3: 110 case net::HttpResponseInfo::CONNECTION_INFO_SPDY3:
111 case net::HttpResponseInfo::CONNECTION_INFO_SPDY4: 111 case net::HttpResponseInfo::CONNECTION_INFO_HTTP2_14:
112 case net::HttpResponseInfo::CONNECTION_INFO_HTTP2_15:
112 return "SPDY"; 113 return "SPDY";
113 case net::HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3: 114 case net::HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3:
114 return "QUIC"; 115 return "QUIC";
115 case net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS: 116 case net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS:
116 NOTREACHED(); 117 NOTREACHED();
117 return ""; 118 return "";
118 } 119 }
119 NOTREACHED(); 120 NOTREACHED();
120 return ""; 121 return "";
121 } 122 }
(...skipping 21 matching lines...) Expand all
143 time_(time) { 144 time_(time) {
144 } 145 }
145 146
146 MockableTimeBackoffEntry::~MockableTimeBackoffEntry() {} 147 MockableTimeBackoffEntry::~MockableTimeBackoffEntry() {}
147 148
148 base::TimeTicks MockableTimeBackoffEntry::ImplGetTimeNow() const { 149 base::TimeTicks MockableTimeBackoffEntry::ImplGetTimeNow() const {
149 return time_->NowTicks(); 150 return time_->NowTicks();
150 } 151 }
151 152
152 } // namespace domain_reliability 153 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « chrome/browser/io_thread_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698