xref: /aosp_15_r20/external/cronet/net/proxy_resolution/win/winhttp_status.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_PROXY_RESOLUTION_WIN_WINHTTP_STATUS_H_
6 #define NET_PROXY_RESOLUTION_WIN_WINHTTP_STATUS_H_
7 
8 namespace net {
9 
10 // This describes the full set of failure points that could occur when calling
11 // into the proxy_resolver_win service. Further detail is additionally provided
12 // by the Windows error code, which will be supplied alongside this enum.
13 //
14 // Keep in sync with proxy_resolver_win.mojom.WinHttpStatus.
15 enum class WinHttpStatus {
16   // No Error.
17   kOk,
18 
19   // Aborted by caller.
20   kAborted,
21 
22   // WinHttpOpen() API failed.
23   kWinHttpOpenFailed,
24 
25   // WinHttpSetTimeouts() API failed.
26   kWinHttpSetTimeoutsFailed,
27 
28   // WinHttpSetStatusCallback() API failed.
29   kWinHttpSetStatusCallbackFailed,
30 
31   // WinHttpGetIEProxyConfigForCurrentUser() API failed.
32   kWinHttpGetIEProxyConfigForCurrentUserFailed,
33 
34   // WinHttpCreateProxyResolver() API failed.
35   kWinHttpCreateProxyResolverFailed,
36 
37   // WinHttpGetProxyForURLEx() API failed.
38   kWinHttpGetProxyForURLExFailed,
39 
40   // Proxy resolution callback returned an error.
41   kStatusCallbackFailed,
42 
43   // WinHttpGetProxyResult() API failed.
44   kWinHttpGetProxyResultFailed,
45 
46   // WinHttpGetProxyResult() API unexpectedly returned an empty list.
47   kEmptyProxyList,
48 };
49 
50 }  // namespace net
51 
52 #endif  // NET_PROXY_RESOLUTION_WIN_WINHTTP_STATUS_H_
53