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

Unified Diff: components/captive_portal/captive_portal_types.cc

Issue 242483003: Move CaptivePortalDetector to src/components/captive_portal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« no previous file with comments | « components/captive_portal/captive_portal_types.h ('k') | components/components.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/captive_portal/captive_portal_types.cc
diff --git a/components/captive_portal/captive_portal_types.cc b/components/captive_portal/captive_portal_types.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a7aec2f448bd4bdf5550461d9e569989278dd0ff
--- /dev/null
+++ b/components/captive_portal/captive_portal_types.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 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 "components/captive_portal/captive_portal_types.h"
+
+#include "base/logging.h"
+
+namespace captive_portal {
+
+namespace {
+
+const char* const kCaptivePortalResultNames[] = {
+ "InternetConnected",
+ "NoResponse",
+ "BehindCaptivePortal",
+ "NumCaptivePortalResults",
+};
+COMPILE_ASSERT(arraysize(kCaptivePortalResultNames) == RESULT_COUNT + 1,
+ captive_portal_result_name_count_mismatch);
+
+} // namespace
+
+
+std::string CaptivePortalResultToString(CaptivePortalResult result) {
+ DCHECK_GE(result, 0);
+ DCHECK_LT(static_cast<unsigned int>(result),
+ arraysize(kCaptivePortalResultNames));
+ return kCaptivePortalResultNames[result];
+}
+
+} // namespace captive_portal
« no previous file with comments | « components/captive_portal/captive_portal_types.h ('k') | components/components.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698