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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // previous handshake message. | 248 // previous handshake message. |
249 { net::QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO, | 249 { net::QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO, |
250 "quic.crypto_message_while_validating_client_hello" }, | 250 "quic.crypto_message_while_validating_client_hello" }, |
251 // A server config update arrived before the handshake is complete. | 251 // A server config update arrived before the handshake is complete. |
252 { net::QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE, | 252 { net::QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE, |
253 "quic.crypto.update_before_handshake_complete" }, | 253 "quic.crypto.update_before_handshake_complete" }, |
254 // This connection involved a version negotiation which appears to have been | 254 // This connection involved a version negotiation which appears to have been |
255 // tampered with. | 255 // tampered with. |
256 { net::QUIC_VERSION_NEGOTIATION_MISMATCH, | 256 { net::QUIC_VERSION_NEGOTIATION_MISMATCH, |
257 "quic.version_negotiation_mismatch" }, | 257 "quic.version_negotiation_mismatch" }, |
| 258 |
| 259 // Network change and connection migration errors. |
| 260 |
| 261 // IP address changed causing connection close. |
| 262 { net::QUIC_IP_ADDRESS_CHANGED, "quic.ip_address_changed" }, |
| 263 // Network changed, but connection had no migratable streams. |
| 264 { net::QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS, |
| 265 "quic.connection_migration_no_migratable_streams" }, |
| 266 // Connection changed networks too many times. |
| 267 { net::QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES, |
| 268 "quic.connection_migration_too_many_changes" }, |
| 269 // Connection migration was attempted, but there was no new network to |
| 270 // migrate to. |
| 271 { net::QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK, |
| 272 "quic.connection_migration_no_new_network" }, |
| 273 |
258 // No error. Used as bound while iterating. | 274 // No error. Used as bound while iterating. |
259 { net::QUIC_LAST_ERROR, "quic.last_error"} | 275 { net::QUIC_LAST_ERROR, "quic.last_error"} |
260 }; | 276 }; |
261 | 277 |
262 // static | 278 // static |
263 const int quic_error_map_size = | 279 const int quic_error_map_size = |
264 sizeof(quic_error_map) / sizeof(QuicErrorMapping); | 280 sizeof(quic_error_map) / sizeof(QuicErrorMapping); |
265 | 281 |
266 static_assert(quic_error_map_size == net::kActiveQuicErrorCount, | 282 static_assert(quic_error_map_size == net::kActiveQuicErrorCount, |
267 "quic_error_map is not in sync with quic protocol!"); | 283 "quic_error_map is not in sync with quic protocol!"); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 ActualTime::~ActualTime() {} | 455 ActualTime::~ActualTime() {} |
440 | 456 |
441 base::Time ActualTime::Now() { return base::Time::Now(); } | 457 base::Time ActualTime::Now() { return base::Time::Now(); } |
442 base::TimeTicks ActualTime::NowTicks() { return base::TimeTicks::Now(); } | 458 base::TimeTicks ActualTime::NowTicks() { return base::TimeTicks::Now(); } |
443 | 459 |
444 scoped_ptr<MockableTime::Timer> ActualTime::CreateTimer() { | 460 scoped_ptr<MockableTime::Timer> ActualTime::CreateTimer() { |
445 return scoped_ptr<MockableTime::Timer>(new ActualTimer()); | 461 return scoped_ptr<MockableTime::Timer>(new ActualTimer()); |
446 } | 462 } |
447 | 463 |
448 } // namespace domain_reliability | 464 } // namespace domain_reliability |
OLD | NEW |