| OLD | NEW |
| 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 Loading... |
| 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_SPDY4_14: |
| 112 case net::HttpResponseInfo::CONNECTION_INFO_SPDY4_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 Loading... |
| 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 |
| OLD | NEW |