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

Unified Diff: chrome/browser/chromeos/net/network_portal_detector.h

Issue 245113003: Removed dependency on the UI from the NetworkPortalDetector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 7 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: chrome/browser/chromeos/net/network_portal_detector.h
diff --git a/chrome/browser/chromeos/net/network_portal_detector.h b/chrome/browser/chromeos/net/network_portal_detector.h
index 1add8ee1f5f459b2944b166d9ddf6e03c4b20e17..4a5872fb040bd4c36f8540543e8aa6f707ff19e0 100644
--- a/chrome/browser/chromeos/net/network_portal_detector.h
+++ b/chrome/browser/chromeos/net/network_portal_detector.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_DETECTOR_H_
#include "base/basictypes.h"
-#include "chrome/browser/chromeos/login/screens/error_screen.h"
+#include "chrome/browser/chromeos/net/network_portal_detector_strategy.h"
#include "net/url_request/url_fetcher.h"
namespace chromeos {
@@ -16,7 +16,7 @@ class NetworkState;
// This class handles all notifications about network changes from
// NetworkStateHandler and delegates portal detection for the active
// network to CaptivePortalService.
-class NetworkPortalDetector : public ErrorScreen::Observer {
+class NetworkPortalDetector {
public:
enum CaptivePortalStatus {
CAPTIVE_PORTAL_STATUS_UNKNOWN = 0,
@@ -96,8 +96,9 @@ class NetworkPortalDetector : public ErrorScreen::Observer {
// started.
virtual bool StartDetectionIfIdle() = 0;
- virtual void OnErrorScreenShow() OVERRIDE {}
- virtual void OnErrorScreenHide() OVERRIDE {}
+ // Sets current strategy according to |id|. If current detection id
+ // doesn't equal to |id|, detection is restarted.
+ virtual void SetStrategy(PortalDetectorStrategy::StrategyId id) = 0;
// Initializes network portal detector for testing. The
// |network_portal_detector| will be owned by the internal pointer
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_impl.cc ('k') | chrome/browser/chromeos/net/network_portal_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698