Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1074)

Unified Diff: chromeos/network/portal_detector/network_portal_detector.h

Issue 1346843003: Refactor NetworkPortalDetector and NetworkPortalNotificationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stub Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/network/portal_detector/network_portal_detector.h
diff --git a/chromeos/network/portal_detector/network_portal_detector.h b/chromeos/network/portal_detector/network_portal_detector.h
index 3639a17bf9f102fbdbc2c97ce0babb6f40b35d3f..38843fe8c22bf1a6ebad28de199350757eb4d278 100644
--- a/chromeos/network/portal_detector/network_portal_detector.h
+++ b/chromeos/network/portal_detector/network_portal_detector.h
@@ -101,6 +101,12 @@ class CHROMEOS_EXPORT NetworkPortalDetector {
// doesn't equal to |id|, detection is restarted.
virtual void SetStrategy(PortalDetectorStrategy::StrategyId id) = 0;
+ // Closes portal login window before screen is locked.
+ virtual void OnLockScreenRequest() = 0;
+
+ // Returns non-localized string representation of |status|.
+ static std::string CaptivePortalStatusString(CaptivePortalStatus status);
+
// Initializes network portal detector for testing. The
// |network_portal_detector| will be owned by the internal pointer
// and deleted by Shutdown().
@@ -119,12 +125,6 @@ class CHROMEOS_EXPORT NetworkPortalDetector {
// by calls to InitializeForTesting().
static NetworkPortalDetector* Get();
- // Returns non-localized string representation of |status|.
- static std::string CaptivePortalStatusString(CaptivePortalStatus status);
-
- // Closes portal login window before screen is locked.
- virtual void OnLockScreenRequest() = 0;
-
protected:
NetworkPortalDetector() {}
virtual ~NetworkPortalDetector() {}
@@ -145,29 +145,6 @@ class CHROMEOS_EXPORT NetworkPortalDetector {
DISALLOW_COPY_AND_ASSIGN(NetworkPortalDetector);
};
-class CHROMEOS_EXPORT NetworkPortalDetectorStubImpl
- : public NetworkPortalDetector {
- public:
- NetworkPortalDetectorStubImpl();
- ~NetworkPortalDetectorStubImpl() override;
-
- protected:
- // NetworkPortalDetector
- void AddObserver(Observer* observer) override;
- void AddAndFireObserver(Observer* observer) override;
- void RemoveObserver(Observer* observer) override;
- CaptivePortalState GetCaptivePortalState(
- const std::string& service_path) override;
- bool IsEnabled() override;
- void Enable(bool start_detection) override;
- bool StartDetectionIfIdle() override;
- void SetStrategy(PortalDetectorStrategy::StrategyId id) override;
- void OnLockScreenRequest() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkPortalDetectorStubImpl);
-};
-
} // namespace chromeos
#endif // CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698