| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/base/host_resolver_impl.h" | 5 #include "net/base/host_resolver_impl.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <Winsock2.h> | 8 #include <Winsock2.h> |
| 9 #elif defined(OS_POSIX) | 9 #elif defined(OS_POSIX) |
| 10 #include <netdb.h> | 10 #include <netdb.h> |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 dict->Set("source_dependency", source_.ToValue()); | 168 dict->Set("source_dependency", source_.ToValue()); |
| 169 | 169 |
| 170 return dict; | 170 return dict; |
| 171 } | 171 } |
| 172 | 172 |
| 173 private: | 173 private: |
| 174 const HostResolver::RequestInfo info_; | 174 const HostResolver::RequestInfo info_; |
| 175 const NetLog::Source source_; | 175 const NetLog::Source source_; |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 // Parameters associated with the creation of a HostResolveImpl::Job. | 178 // Parameters associated with the creation of a HostResolverImpl::Job. |
| 179 class JobCreationParameters : public NetLog::EventParameters { | 179 class JobCreationParameters : public NetLog::EventParameters { |
| 180 public: | 180 public: |
| 181 JobCreationParameters(const std::string& host, const NetLog::Source& source) | 181 JobCreationParameters(const std::string& host, const NetLog::Source& source) |
| 182 : host_(host), source_(source) {} | 182 : host_(host), source_(source) {} |
| 183 | 183 |
| 184 virtual Value* ToValue() const { | 184 virtual Value* ToValue() const { |
| 185 DictionaryValue* dict = new DictionaryValue(); | 185 DictionaryValue* dict = new DictionaryValue(); |
| 186 dict->SetString("host", host_); | 186 dict->SetString("host", host_); |
| 187 dict->Set("source_dependency", source_.ToValue()); | 187 dict->Set("source_dependency", source_.ToValue()); |
| 188 return dict; | 188 return dict; |
| (...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1452 additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY; | 1452 additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY; |
| 1453 } else { | 1453 } else { |
| 1454 additional_resolver_flags_ &= ~HOST_RESOLVER_LOOPBACK_ONLY; | 1454 additional_resolver_flags_ &= ~HOST_RESOLVER_LOOPBACK_ONLY; |
| 1455 } | 1455 } |
| 1456 #endif | 1456 #endif |
| 1457 AbortAllInProgressJobs(); | 1457 AbortAllInProgressJobs(); |
| 1458 // |this| may be deleted inside AbortAllInProgressJobs(). | 1458 // |this| may be deleted inside AbortAllInProgressJobs(). |
| 1459 } | 1459 } |
| 1460 | 1460 |
| 1461 } // namespace net | 1461 } // namespace net |
| OLD | NEW |