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 #include "chrome/browser/chromeos/login/screens/network_error.h"
7 #include "base/logging.h"
13 const char kErrorReasonProxyAuthCancelled
[] = "proxy auth cancelled";
14 const char kErrorReasonProxyAuthSupplied
[] = "proxy auth supplied";
15 const char kErrorReasonProxyConnectionFailed
[] = "proxy connection failed";
16 const char kErrorReasonProxyConfigChanged
[] = "proxy config changed";
17 const char kErrorReasonLoadingTimeout
[] = "loading timeout";
18 const char kErrorReasonPortalDetected
[] = "portal detected";
19 const char kErrorReasonNetworkStateChanged
[] = "network state changed";
20 const char kErrorReasonUpdate
[] = "update";
21 const char kErrorReasonFrameError
[] = "frame error";
26 const char* NetworkError::ErrorReasonString(ErrorReason reason
) {
28 case ERROR_REASON_PROXY_AUTH_CANCELLED
:
29 return kErrorReasonProxyAuthCancelled
;
30 case ERROR_REASON_PROXY_AUTH_SUPPLIED
:
31 return kErrorReasonProxyAuthSupplied
;
32 case ERROR_REASON_PROXY_CONNECTION_FAILED
:
33 return kErrorReasonProxyConnectionFailed
;
34 case ERROR_REASON_PROXY_CONFIG_CHANGED
:
35 return kErrorReasonProxyConfigChanged
;
36 case ERROR_REASON_LOADING_TIMEOUT
:
37 return kErrorReasonLoadingTimeout
;
38 case ERROR_REASON_PORTAL_DETECTED
:
39 return kErrorReasonPortalDetected
;
40 case ERROR_REASON_NETWORK_STATE_CHANGED
:
41 return kErrorReasonNetworkStateChanged
;
42 case ERROR_REASON_UPDATE
:
43 return kErrorReasonUpdate
;
44 case ERROR_REASON_FRAME_ERROR
:
45 return kErrorReasonFrameError
;
52 } // namespace chromeos