Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / network_error.h
blob8e9bb01db9add6c0aad19316cc333530bb27390b
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_ERROR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_ERROR_H_
8 namespace chromeos {
10 class NetworkError {
11 public:
12 enum UIState {
13 UI_STATE_UNKNOWN = 0,
14 UI_STATE_UPDATE,
15 UI_STATE_SIGNIN,
16 UI_STATE_SUPERVISED,
17 UI_STATE_KIOSK_MODE,
18 UI_STATE_LOCAL_STATE_ERROR,
19 UI_STATE_AUTO_ENROLLMENT_ERROR,
20 UI_STATE_ROLLBACK_ERROR,
23 enum ErrorState {
24 ERROR_STATE_UNKNOWN = 0,
25 ERROR_STATE_PORTAL,
26 ERROR_STATE_OFFLINE,
27 ERROR_STATE_PROXY,
28 ERROR_STATE_AUTH_EXT_TIMEOUT,
29 ERROR_STATE_NONE,
30 // States above are being logged to histograms.
31 // Please keep ERROR_STATE_NONE as the last one of the histogram values.
32 // ERROR_STATE_KIOSK_ONLINE is a special case (not an actual error) and is
33 // not reported in histogram.
34 ERROR_STATE_KIOSK_ONLINE,
37 // Possible network error reasons.
38 enum ErrorReason {
39 ERROR_REASON_PROXY_AUTH_CANCELLED = 0,
40 ERROR_REASON_PROXY_AUTH_SUPPLIED = 1,
41 ERROR_REASON_PROXY_CONNECTION_FAILED = 2,
42 ERROR_REASON_PROXY_CONFIG_CHANGED = 3,
43 ERROR_REASON_LOADING_TIMEOUT = 4,
44 ERROR_REASON_PORTAL_DETECTED = 5,
46 // Reason for a case when default network has changed.
47 ERROR_REASON_NETWORK_STATE_CHANGED = 6,
49 // Reason for a case when JS side requires error screen update.
50 ERROR_REASON_UPDATE = 7,
51 ERROR_REASON_FRAME_ERROR = 8,
53 // Used as an "uninitialized" state for cases when limiting number of
54 // GAIA reloads due to a single network error reason.
55 ERROR_REASON_NONE = 9
58 static const char* ErrorReasonString(ErrorReason reason);
61 } // namespace chromeos
63 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_ERROR_H_