| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/quic/chromium/quic_stream_factory.h" | 5 #include "net/quic/chromium/quic_stream_factory.h" |
| 6 | 6 |
| 7 #include <openssl/aead.h> | 7 #include <openssl/aead.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 | 481 |
| 482 io_state_ = STATE_RESOLVE_HOST_COMPLETE; | 482 io_state_ = STATE_RESOLVE_HOST_COMPLETE; |
| 483 return host_resolver_->Resolve( | 483 return host_resolver_->Resolve( |
| 484 HostResolver::RequestInfo(key_.destination()), DEFAULT_PRIORITY, | 484 HostResolver::RequestInfo(key_.destination()), DEFAULT_PRIORITY, |
| 485 &address_list_, | 485 &address_list_, |
| 486 base::Bind(&QuicStreamFactory::Job::OnIOComplete, GetWeakPtr()), | 486 base::Bind(&QuicStreamFactory::Job::OnIOComplete, GetWeakPtr()), |
| 487 &request_, net_log_); | 487 &request_, net_log_); |
| 488 } | 488 } |
| 489 | 489 |
| 490 int QuicStreamFactory::Job::DoResolveHostComplete(int rv) { | 490 int QuicStreamFactory::Job::DoResolveHostComplete(int rv) { |
| 491 dns_resolution_end_time_ = base::TimeTicks::Now(); |
| 491 if (rv != OK) | 492 if (rv != OK) |
| 492 return rv; | 493 return rv; |
| 493 | 494 |
| 494 DCHECK(!factory_->HasActiveSession(key_.server_id())); | 495 DCHECK(!factory_->HasActiveSession(key_.server_id())); |
| 495 | 496 |
| 496 // Inform the factory of this resolution, which will set up | 497 // Inform the factory of this resolution, which will set up |
| 497 // a session alias, if possible. | 498 // a session alias, if possible. |
| 498 if (factory_->OnResolution(key_, address_list_)) | 499 if (factory_->OnResolution(key_, address_list_)) |
| 499 return OK; | 500 return OK; |
| 500 | 501 |
| (...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2053 // Since the session was active, there's no longer an | 2054 // Since the session was active, there's no longer an |
| 2054 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP | 2055 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP |
| 2055 // job also fails. So to avoid not using QUIC when we otherwise could, we mark | 2056 // job also fails. So to avoid not using QUIC when we otherwise could, we mark |
| 2056 // it as recently broken, which means that 0-RTT will be disabled but we'll | 2057 // it as recently broken, which means that 0-RTT will be disabled but we'll |
| 2057 // still race. | 2058 // still race. |
| 2058 http_server_properties_->MarkAlternativeServiceRecentlyBroken( | 2059 http_server_properties_->MarkAlternativeServiceRecentlyBroken( |
| 2059 alternative_service); | 2060 alternative_service); |
| 2060 } | 2061 } |
| 2061 | 2062 |
| 2062 } // namespace net | 2063 } // namespace net |
| OLD | NEW |