Chromium Code Reviews| 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..9469f11181a2a533fb6fa12b623090c77c211e8c |
| --- /dev/null |
| +++ b/components/captive_portal/captive_portal_types.h |
| @@ -0,0 +1,43 @@ |
| +// 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 "net/base/net_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 |
| +}; |
| + |
| +enum CaptivePortalStatus { |
|
mmenke
2014/04/21 14:32:43
These don't seem to be used anywhere in the compon
stevenjb
2014/04/21 16:42:27
I agree with the second statement, but the intenti
mmenke
2014/04/21 17:46:50
I'm not at all averse to moving them, but I don't
|
| + 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 |
| +}; |
| + |
| +NET_EXPORT extern std::string CaptivePortalResultToString( |
| + CaptivePortalResult result); |
| + |
| +NET_EXPORT extern std::string CaptivePortalStatusString( |
| + CaptivePortalStatus status); |
| + |
| +} // namespace captive_portal |
| + |
| +#endif // NET_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TYPES_H_ |