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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 // The non-ex flavors are limited to IPv4 results. | 946 // The non-ex flavors are limited to IPv4 results. |
947 if (op == MY_IP_ADDRESS || op == DNS_RESOLVE) { | 947 if (op == MY_IP_ADDRESS || op == DNS_RESOLVE) { |
948 info.set_address_family(ADDRESS_FAMILY_IPV4); | 948 info.set_address_family(ADDRESS_FAMILY_IPV4); |
949 } | 949 } |
950 | 950 |
951 return info; | 951 return info; |
952 } | 952 } |
953 | 953 |
954 std::string ProxyResolverV8Tracing::Job::MakeDnsCacheKey( | 954 std::string ProxyResolverV8Tracing::Job::MakeDnsCacheKey( |
955 const std::string& host, ResolveDnsOperation op) { | 955 const std::string& host, ResolveDnsOperation op) { |
956 return StringPrintf("%d:%s", op, host.c_str()); | 956 return base::StringPrintf("%d:%s", op, host.c_str()); |
957 } | 957 } |
958 | 958 |
959 void ProxyResolverV8Tracing::Job::HandleAlertOrError(bool is_alert, | 959 void ProxyResolverV8Tracing::Job::HandleAlertOrError(bool is_alert, |
960 int line_number, | 960 int line_number, |
961 const string16& message) { | 961 const string16& message) { |
962 CheckIsOnWorkerThread(); | 962 CheckIsOnWorkerThread(); |
963 | 963 |
964 if (cancelled_.IsSet()) | 964 if (cancelled_.IsSet()) |
965 return; | 965 return; |
966 | 966 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 DCHECK(!set_pac_script_job_); | 1141 DCHECK(!set_pac_script_job_); |
1142 CHECK_EQ(0, num_outstanding_callbacks_); | 1142 CHECK_EQ(0, num_outstanding_callbacks_); |
1143 | 1143 |
1144 set_pac_script_job_ = new Job(this); | 1144 set_pac_script_job_ = new Job(this); |
1145 set_pac_script_job_->StartSetPacScript(script_data, callback); | 1145 set_pac_script_job_->StartSetPacScript(script_data, callback); |
1146 | 1146 |
1147 return ERR_IO_PENDING; | 1147 return ERR_IO_PENDING; |
1148 } | 1148 } |
1149 | 1149 |
1150 } // namespace net | 1150 } // namespace net |
OLD | NEW |