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 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_H_ |
6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "net/url_request/url_fetcher.h" | 9 #include "net/url_request/url_fetcher.h" |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // If |start_detection| is true and NetworkPortalDetector was | 87 // If |start_detection| is true and NetworkPortalDetector was |
88 // disabled previously, portal detection for the active network is | 88 // disabled previously, portal detection for the active network is |
89 // initiated by this method. | 89 // initiated by this method. |
90 virtual void Enable(bool start_detection) = 0; | 90 virtual void Enable(bool start_detection) = 0; |
91 | 91 |
92 // Restarts portal detection for the default network if currently in | 92 // Restarts portal detection for the default network if currently in |
93 // the idle state. Returns true if new portal detection attempt was | 93 // the idle state. Returns true if new portal detection attempt was |
94 // started. | 94 // started. |
95 virtual bool StartDetectionIfIdle() = 0; | 95 virtual bool StartDetectionIfIdle() = 0; |
96 | 96 |
97 // Enables lazy detection mode. In this mode portal detection after | 97 // Enables detection strategy for the error screen. In this mode portal |
98 // first 3 consecutive attemps will be performed once in 5 seconds. | 98 // detection will be performed once in 5 seconds. |
99 virtual void EnableLazyDetection() = 0; | 99 virtual void EnableErrorScreenStrategy() = 0; |
100 | 100 |
101 // Dizables lazy detection mode. | 101 // Dizables detection strategy for the error screen. |
102 virtual void DisableLazyDetection() = 0; | 102 virtual void DisableErrorScreenStrategy() = 0; |
103 | 103 |
104 // Initializes network portal detector for testing. The | 104 // Initializes network portal detector for testing. The |
105 // |network_portal_detector| will be owned by the internal pointer | 105 // |network_portal_detector| will be owned by the internal pointer |
106 // and deleted by Shutdown(). | 106 // and deleted by Shutdown(). |
107 static void InitializeForTesting( | 107 static void InitializeForTesting( |
108 NetworkPortalDetector* network_portal_detector); | 108 NetworkPortalDetector* network_portal_detector); |
109 | 109 |
110 // Creates an instance of the NetworkPortalDetector. | 110 // Creates an instance of the NetworkPortalDetector. |
111 static void Initialize(); | 111 static void Initialize(); |
112 | 112 |
(...skipping 10 matching lines...) Expand all Loading... |
123 NetworkPortalDetector() {} | 123 NetworkPortalDetector() {} |
124 virtual ~NetworkPortalDetector() {} | 124 virtual ~NetworkPortalDetector() {} |
125 | 125 |
126 private: | 126 private: |
127 DISALLOW_COPY_AND_ASSIGN(NetworkPortalDetector); | 127 DISALLOW_COPY_AND_ASSIGN(NetworkPortalDetector); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace chromeos | 130 } // namespace chromeos |
131 | 131 |
132 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_H_ | 132 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_H_ |
OLD | NEW |