OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 28 matching lines...) Expand all Loading... |
39 : public URLFetcher::Delegate, | 39 : public URLFetcher::Delegate, |
40 public net::NetworkChangeNotifier::IPAddressObserver { | 40 public net::NetworkChangeNotifier::IPAddressObserver { |
41 public: | 41 public: |
42 // Only the main browser process loop should call this, when setting up | 42 // Only the main browser process loop should call this, when setting up |
43 // g_browser_process->intranet_redirect_detector_. No code other than the | 43 // g_browser_process->intranet_redirect_detector_. No code other than the |
44 // IntranetRedirectDetector itself should actually use | 44 // IntranetRedirectDetector itself should actually use |
45 // g_browser_process->intranet_redirect_detector() (which shouldn't be hard, | 45 // g_browser_process->intranet_redirect_detector() (which shouldn't be hard, |
46 // since there aren't useful public functions on this object for consumers to | 46 // since there aren't useful public functions on this object for consumers to |
47 // access anyway). | 47 // access anyway). |
48 IntranetRedirectDetector(); | 48 IntranetRedirectDetector(); |
49 ~IntranetRedirectDetector(); | 49 virtual ~IntranetRedirectDetector(); |
50 | 50 |
51 // Returns the current redirect origin. This will be empty if no redirection | 51 // Returns the current redirect origin. This will be empty if no redirection |
52 // is in place. | 52 // is in place. |
53 static GURL RedirectOrigin(); | 53 static GURL RedirectOrigin(); |
54 | 54 |
55 static void RegisterPrefs(PrefService* prefs); | 55 static void RegisterPrefs(PrefService* prefs); |
56 | 56 |
57 // The number of characters the fetcher will use for its randomly-generated | 57 // The number of characters the fetcher will use for its randomly-generated |
58 // hostnames. | 58 // hostnames. |
59 static const size_t kNumCharsInHostnames; | 59 static const size_t kNumCharsInHostnames; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 explicit IntranetRedirectHostResolverProc(net::HostResolverProc* previous); | 94 explicit IntranetRedirectHostResolverProc(net::HostResolverProc* previous); |
95 | 95 |
96 virtual int Resolve(const std::string& host, | 96 virtual int Resolve(const std::string& host, |
97 net::AddressFamily address_family, | 97 net::AddressFamily address_family, |
98 net::HostResolverFlags host_resolver_flags, | 98 net::HostResolverFlags host_resolver_flags, |
99 net::AddressList* addrlist, | 99 net::AddressList* addrlist, |
100 int* os_error); | 100 int* os_error); |
101 }; | 101 }; |
102 | 102 |
103 #endif // CHROME_BROWSER_INTRANET_REDIRECT_DETECTOR_H_ | 103 #endif // CHROME_BROWSER_INTRANET_REDIRECT_DETECTOR_H_ |
OLD | NEW |