OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/proxy/proxy_resolver_v8_tracing.h" | 5 #include "net/proxy/proxy_resolver_v8_tracing.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 CheckIsOnOriginThread(); | 703 CheckIsOnOriginThread(); |
704 DCHECK(!pending_dns_); | 704 DCHECK(!pending_dns_); |
705 | 705 |
706 if (cancelled_.IsSet()) | 706 if (cancelled_.IsSet()) |
707 return; | 707 return; |
708 | 708 |
709 std::unique_ptr<HostResolver::Request> dns_request; | 709 std::unique_ptr<HostResolver::Request> dns_request; |
710 int result = host_resolver()->Resolve( | 710 int result = host_resolver()->Resolve( |
711 MakeDnsRequestInfo(pending_dns_host_, pending_dns_op_), DEFAULT_PRIORITY, | 711 MakeDnsRequestInfo(pending_dns_host_, pending_dns_op_), DEFAULT_PRIORITY, |
712 &pending_dns_addresses_, base::Bind(&Job::OnDnsOperationComplete, this), | 712 &pending_dns_addresses_, base::Bind(&Job::OnDnsOperationComplete, this), |
713 &dns_request, bindings_->GetBoundNetLog()); | 713 &dns_request, bindings_->GetNetLogWithSource()); |
714 | 714 |
715 pending_dns_completed_synchronously_ = result != ERR_IO_PENDING; | 715 pending_dns_completed_synchronously_ = result != ERR_IO_PENDING; |
716 | 716 |
717 // Check if the request was cancelled as a side-effect of calling into the | 717 // Check if the request was cancelled as a side-effect of calling into the |
718 // HostResolver. This isn't the ordinary execution flow, however it is | 718 // HostResolver. This isn't the ordinary execution flow, however it is |
719 // exercised by unit-tests. | 719 // exercised by unit-tests. |
720 if (cancelled_.IsSet()) | 720 if (cancelled_.IsSet()) |
721 return; | 721 return; |
722 | 722 |
723 if (pending_dns_completed_synchronously_) { | 723 if (pending_dns_completed_synchronously_) { |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 | 1093 |
1094 } // namespace | 1094 } // namespace |
1095 | 1095 |
1096 // static | 1096 // static |
1097 std::unique_ptr<ProxyResolverV8TracingFactory> | 1097 std::unique_ptr<ProxyResolverV8TracingFactory> |
1098 ProxyResolverV8TracingFactory::Create() { | 1098 ProxyResolverV8TracingFactory::Create() { |
1099 return base::WrapUnique(new ProxyResolverV8TracingFactoryImpl()); | 1099 return base::WrapUnique(new ProxyResolverV8TracingFactoryImpl()); |
1100 } | 1100 } |
1101 | 1101 |
1102 } // namespace net | 1102 } // namespace net |
OLD | NEW |