OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_STRATEGY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 class PortalDetectorStrategy { | 15 class PortalDetectorStrategy { |
16 public: | 16 public: |
17 enum StrategyId { | 17 enum StrategyId { |
18 STRATEGY_ID_LOGIN_SCREEN, | 18 STRATEGY_ID_LOGIN_SCREEN, |
19 STRATEGY_ID_ERROR_SCREEN, | 19 STRATEGY_ID_ERROR_SCREEN, |
20 STRATEGY_ID_SESSION, | 20 STRATEGY_ID_SESSION, |
21 STRATEGY_ID_COUNT | |
22 }; | 21 }; |
23 | 22 |
24 class Delegate { | 23 class Delegate { |
25 public: | 24 public: |
26 virtual ~Delegate() {} | 25 virtual ~Delegate() {} |
27 | 26 |
28 // Returns number of performed attempts. | 27 // Returns number of performed attempts. |
29 virtual int AttemptCount() = 0; | 28 virtual int AttemptCount() = 0; |
30 | 29 |
31 // Returns time when current attempt was started. | 30 // Returns time when current attempt was started. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 104 |
106 // True when |next_attempt_timeout_for_testing_| is initialized. | 105 // True when |next_attempt_timeout_for_testing_| is initialized. |
107 static bool next_attempt_timeout_for_testing_initialized_; | 106 static bool next_attempt_timeout_for_testing_initialized_; |
108 | 107 |
109 DISALLOW_COPY_AND_ASSIGN(PortalDetectorStrategy); | 108 DISALLOW_COPY_AND_ASSIGN(PortalDetectorStrategy); |
110 }; | 109 }; |
111 | 110 |
112 } // namespace chromeos | 111 } // namespace chromeos |
113 | 112 |
114 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ | 113 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ |
OLD | NEW |