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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(result.rv, NULL); |
515 } | 515 } |
516 break; | 516 break; |
517 } | 517 } |
518 } | 518 } |
519 return result; | 519 return result; |
520 } | 520 } |
521 | 521 |
522 void OnTimeout() { | 522 void OnTimeout() { |
523 if (callback_.is_null()) | 523 if (callback_.is_null()) |
524 return; | 524 return; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 } // namespace | 579 } // namespace |
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 |
OLD | NEW |