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

Unified Diff: components/captive_portal/captive_portal_types.h

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
Index: components/captive_portal/captive_portal_types.h
diff --git a/components/captive_portal/captive_portal_types.h b/components/captive_portal/captive_portal_types.h
new file mode 100644
index 0000000000000000000000000000000000000000..57319d739cc384e12856106ef6d3f7987167b221
--- /dev/null
+++ b/components/captive_portal/captive_portal_types.h
@@ -0,0 +1,31 @@
+// 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.
+
+#ifndef NET_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TYPES_H_
+#define NET_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TYPES_H_
+
+#include <string>
+
+#include "components/captive_portal/captive_portal_export.h"
+
+namespace captive_portal {
+
+// Possible results of an attempt to detect a captive portal.
+enum CaptivePortalResult {
+ // There's a confirmed connection to the Internet.
+ RESULT_INTERNET_CONNECTED,
+ // The URL request received a network or HTTP error, or a non-HTTP response.
+ RESULT_NO_RESPONSE,
+ // The URL request apparently encountered a captive portal. It received a
+ // a valid HTTP response with a 2xx other than 204, 3xx, or 511 status code.
+ RESULT_BEHIND_CAPTIVE_PORTAL,
+ RESULT_COUNT
+};
+
+CAPTIVE_PORTAL_EXPORT extern std::string CaptivePortalResultToString(
+ CaptivePortalResult result);
+
+} // namespace captive_portal
+
+#endif // NET_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TYPES_H_
« no previous file with comments | « components/captive_portal/captive_portal_testing_utils.cc ('k') | components/captive_portal/captive_portal_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698