| 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 }; | 21 }; |
| 22 | 22 |
| 23 class Delegate { | 23 class Delegate { |
| 24 public: | 24 public: |
| 25 virtual ~Delegate() {} | 25 virtual ~Delegate() {} |
| 26 | 26 |
| 27 // Returns number of performed attempts. | 27 // Returns number of performed attempts. |
| 28 virtual int AttemptCount() = 0; | 28 virtual int AttemptCount() = 0; |
| 29 | 29 |
| 30 // 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... |
| 104 | 104 |
| 105 // True when |next_attempt_timeout_for_testing_| is initialized. | 105 // True when |next_attempt_timeout_for_testing_| is initialized. |
| 106 static bool next_attempt_timeout_for_testing_initialized_; | 106 static bool next_attempt_timeout_for_testing_initialized_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(PortalDetectorStrategy); | 108 DISALLOW_COPY_AND_ASSIGN(PortalDetectorStrategy); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace chromeos | 111 } // namespace chromeos |
| 112 | 112 |
| 113 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ | 113 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ |
| OLD | NEW |