| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 bool ssl_info_populated) { | 99 bool ssl_info_populated) { |
| 100 switch (connection_info) { | 100 switch (connection_info) { |
| 101 case net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN: | 101 case net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN: |
| 102 return ""; | 102 return ""; |
| 103 case net::HttpResponseInfo::CONNECTION_INFO_HTTP1: | 103 case net::HttpResponseInfo::CONNECTION_INFO_HTTP1: |
| 104 return ssl_info_populated ? "HTTPS" : "HTTP"; | 104 return ssl_info_populated ? "HTTPS" : "HTTP"; |
| 105 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY2: | 105 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY2: |
| 106 case net::HttpResponseInfo::CONNECTION_INFO_SPDY3: | 106 case net::HttpResponseInfo::CONNECTION_INFO_SPDY3: |
| 107 case net::HttpResponseInfo::CONNECTION_INFO_HTTP2_14: | 107 case net::HttpResponseInfo::CONNECTION_INFO_HTTP2_14: |
| 108 case net::HttpResponseInfo::CONNECTION_INFO_HTTP2_15: | 108 case net::HttpResponseInfo::CONNECTION_INFO_HTTP2_15: |
| 109 case net::HttpResponseInfo::CONNECTION_INFO_HTTP2: |
| 109 return "SPDY"; | 110 return "SPDY"; |
| 110 case net::HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3: | 111 case net::HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3: |
| 111 return "QUIC"; | 112 return "QUIC"; |
| 112 case net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS: | 113 case net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS: |
| 113 NOTREACHED(); | 114 NOTREACHED(); |
| 114 return ""; | 115 return ""; |
| 115 } | 116 } |
| 116 NOTREACHED(); | 117 NOTREACHED(); |
| 117 return ""; | 118 return ""; |
| 118 } | 119 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 time_(time) { | 203 time_(time) { |
| 203 } | 204 } |
| 204 | 205 |
| 205 MockableTimeBackoffEntry::~MockableTimeBackoffEntry() {} | 206 MockableTimeBackoffEntry::~MockableTimeBackoffEntry() {} |
| 206 | 207 |
| 207 base::TimeTicks MockableTimeBackoffEntry::ImplGetTimeNow() const { | 208 base::TimeTicks MockableTimeBackoffEntry::ImplGetTimeNow() const { |
| 208 return time_->NowTicks(); | 209 return time_->NowTicks(); |
| 209 } | 210 } |
| 210 | 211 |
| 211 } // namespace domain_reliability | 212 } // namespace domain_reliability |
| OLD | NEW |