| 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/dns/dns_transaction.h" | 5 #include "net/dns/dns_transaction.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 case ERR_DNS_TIMED_OUT: | 497 case ERR_DNS_TIMED_OUT: |
| 498 if (MoreAttemptsAllowed()) { | 498 if (MoreAttemptsAllowed()) { |
| 499 result = MakeAttempt(); | 499 result = MakeAttempt(); |
| 500 } else { | 500 } else { |
| 501 return result; | 501 return result; |
| 502 } | 502 } |
| 503 break; | 503 break; |
| 504 default: | 504 default: |
| 505 // Server failure. | 505 // Server failure. |
| 506 DCHECK(result.attempt); | 506 DCHECK(result.attempt); |
| 507 if (result.attempt != attempts_->back()) { | 507 if (result.attempt != attempts_.back()) { |
| 508 // This attempt already timed out. Ignore it. | 508 // This attempt already timed out. Ignore it. |
| 509 return AttemptResult(ERR_IO_PENDING, NULL); | 509 return AttemptResult(ERR_IO_PENDING, NULL); |
| 510 } | 510 } |
| 511 if (MoreAttemptsAllowed()) { | 511 if (MoreAttemptsAllowed()) { |
| 512 result = MakeAttempt(); | 512 result = MakeAttempt(); |
| 513 } else { | 513 } else { |
| 514 return AttemptResult(ERR_DNS_SERVER_FAILED, NULL); | 514 return AttemptResult(ERR_DNS_SERVER_FAILED, NULL); |
| 515 } | 515 } |
| 516 break; | 516 break; |
| 517 } | 517 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 | 580 |
| 581 // static | 581 // static |
| 582 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory( | 582 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory( |
| 583 DnsSession* session) { | 583 DnsSession* session) { |
| 584 return scoped_ptr<DnsTransactionFactory>( | 584 return scoped_ptr<DnsTransactionFactory>( |
| 585 new DnsTransactionFactoryImpl(session)); | 585 new DnsTransactionFactoryImpl(session)); |
| 586 } | 586 } |
| 587 | 587 |
| 588 } // namespace net | 588 } // namespace net |
| 589 | 589 |
| OLD | NEW |