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

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

Issue 242483003: Move CaptivePortalDetector to src/components/captive_portal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move CaptivePortalDetector to a component Created 6 years, 8 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..b0013bdafe5b7381de07d9c045fc6fce3d3f42c5 100644
--- a/chrome/browser/chromeos/net/network_portal_detector.h
+++ b/chrome/browser/chromeos/net/network_portal_detector.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "chrome/browser/chromeos/login/screens/error_screen.h"
+#include "components/captive_portal/captive_portal_types.h"
#include "net/url_request/url_fetcher.h"
namespace chromeos {
@@ -18,18 +19,9 @@ class NetworkState;
// network to CaptivePortalService.
class NetworkPortalDetector : public ErrorScreen::Observer {
public:
- enum CaptivePortalStatus {
- CAPTIVE_PORTAL_STATUS_UNKNOWN = 0,
- CAPTIVE_PORTAL_STATUS_OFFLINE = 1,
- CAPTIVE_PORTAL_STATUS_ONLINE = 2,
- CAPTIVE_PORTAL_STATUS_PORTAL = 3,
- CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED = 4,
- CAPTIVE_PORTAL_STATUS_COUNT
- };
-
struct CaptivePortalState {
CaptivePortalState()
- : status(CAPTIVE_PORTAL_STATUS_UNKNOWN),
+ : status(captive_portal::CAPTIVE_PORTAL_STATUS_UNKNOWN),
response_code(net::URLFetcher::RESPONSE_CODE_INVALID) {
}
@@ -37,7 +29,7 @@ class NetworkPortalDetector : public ErrorScreen::Observer {
return status == o.status && response_code == o.response_code;
}
- CaptivePortalStatus status;
+ captive_portal::CaptivePortalStatus status;
int response_code;
base::TimeTicks time;
};
@@ -117,7 +109,8 @@ class NetworkPortalDetector : public ErrorScreen::Observer {
static NetworkPortalDetector* Get();
// Returns non-localized string representation of |status|.
- static std::string CaptivePortalStatusString(CaptivePortalStatus status);
+ static std::string CaptivePortalStatusString(
+ captive_portal::CaptivePortalStatus status);
// Returns |true| if NetworkPortalDetector was Initialized and it is safe to
// call Get.

Powered by Google App Engine
This is Rietveld 408576698