| 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 #ifndef CHROME_BROWSER_INTRANET_REDIRECT_DETECTOR_H_ | 5 #ifndef CHROME_BROWSER_INTRANET_REDIRECT_DETECTOR_H_ |
| 6 #define CHROME_BROWSER_INTRANET_REDIRECT_DETECTOR_H_ | 6 #define CHROME_BROWSER_INTRANET_REDIRECT_DETECTOR_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 // This is for use in testing, where we don't want our fetches to actually go | 95 // This is for use in testing, where we don't want our fetches to actually go |
| 96 // over the network. It captures the requests and causes them to fail. | 96 // over the network. It captures the requests and causes them to fail. |
| 97 class IntranetRedirectHostResolverProc : public net::HostResolverProc { | 97 class IntranetRedirectHostResolverProc : public net::HostResolverProc { |
| 98 public: | 98 public: |
| 99 explicit IntranetRedirectHostResolverProc(net::HostResolverProc* previous); | 99 explicit IntranetRedirectHostResolverProc(net::HostResolverProc* previous); |
| 100 | 100 |
| 101 virtual int Resolve(const std::string& host, | 101 virtual int Resolve(const std::string& host, |
| 102 net::AddressFamily address_family, | 102 net::AddressFamily address_family, |
| 103 net::HostResolverFlags host_resolver_flags, |
| 103 net::AddressList* addrlist); | 104 net::AddressList* addrlist); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 #endif // CHROME_BROWSER_INTRANET_REDIRECT_DETECTOR_H_ | 107 #endif // CHROME_BROWSER_INTRANET_REDIRECT_DETECTOR_H_ |
| OLD | NEW |