Index: trunk/src/chrome/browser/chromeos/net/network_portal_detector_impl.h |
=================================================================== |
--- trunk/src/chrome/browser/chromeos/net/network_portal_detector_impl.h (revision 268189) |
+++ trunk/src/chrome/browser/chromeos/net/network_portal_detector_impl.h (working copy) |
@@ -73,7 +73,6 @@ |
virtual bool IsEnabled() OVERRIDE; |
virtual void Enable(bool start_detection) OVERRIDE; |
virtual bool StartDetectionIfIdle() OVERRIDE; |
- virtual void SetStrategy(PortalDetectorStrategy::StrategyId id) OVERRIDE; |
// NetworkStateHandlerObserver implementation: |
virtual void DefaultNetworkChanged(const NetworkState* network) OVERRIDE; |
@@ -83,6 +82,10 @@ |
virtual base::TimeTicks AttemptStartTime() OVERRIDE; |
virtual base::TimeTicks GetCurrentTimeTicks() OVERRIDE; |
+ // ErrorScreen::Observer implementation: |
+ virtual void OnErrorScreenShow() OVERRIDE; |
+ virtual void OnErrorScreenHide() OVERRIDE; |
+ |
private: |
friend class NetworkPortalDetectorImplTest; |
friend class NetworkPortalDetectorImplBrowserTest; |
@@ -137,6 +140,14 @@ |
void NotifyDetectionCompleted(const NetworkState* network, |
const CaptivePortalState& state); |
+ // Updates current detection strategy according to the curren state: |
+ // error screen, login screen or user session. |
+ void UpdateCurrentStrategy(); |
+ |
+ // Sets current strategy according to |id|. If current detection id |
+ // doesn't equal to |id|, detection is restarted. |
+ void SetStrategy(PortalDetectorStrategy::StrategyId id); |
+ |
State state() const { return state_; } |
bool is_idle() const { |
@@ -226,6 +237,9 @@ |
// Current detection strategy. |
scoped_ptr<PortalDetectorStrategy> strategy_; |
+ // True when error screen is displayed. |
+ bool error_screen_displayed_; |
+ |
// UI notification controller about captive portal state. |
NetworkPortalNotificationController notification_controller_; |