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

Unified Diff: chromeos/network/portal_detector/network_portal_detector_interface.cc

Issue 1353933002: NetworkPortalDetectorInterface class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@portal_refactor
Patch Set: rebase 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
« no previous file with comments | « chromeos/network/portal_detector/network_portal_detector_interface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/portal_detector/network_portal_detector_interface.cc
diff --git a/chromeos/network/portal_detector/network_portal_detector_interface.cc b/chromeos/network/portal_detector/network_portal_detector_interface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cfde715c7d0f8402377e0aff44feb1ed4d8fc17c
--- /dev/null
+++ b/chromeos/network/portal_detector/network_portal_detector_interface.cc
@@ -0,0 +1,31 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/network/portal_detector/network_portal_detector_interface.h"
+
+#include "base/logging.h"
+
+namespace chromeos {
+
+// static
+std::string NetworkPortalDetectorInterface::CaptivePortalStatusString(
+ CaptivePortalStatus status) {
+ switch (status) {
+ case CAPTIVE_PORTAL_STATUS_UNKNOWN:
+ return "Unknown";
+ case CAPTIVE_PORTAL_STATUS_OFFLINE:
+ return "Offline";
+ case CAPTIVE_PORTAL_STATUS_ONLINE:
+ return "Online";
+ case CAPTIVE_PORTAL_STATUS_PORTAL:
+ return "Portal";
+ case CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED:
+ return "ProxyAuthRequired";
+ case CAPTIVE_PORTAL_STATUS_COUNT:
+ NOTREACHED();
+ }
+ return "Unrecognized";
+}
+
+} // namespace chromeos
« no previous file with comments | « chromeos/network/portal_detector/network_portal_detector_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698