OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_BASE_LOAD_FLAGS_H__ | 5 #ifndef NET_BASE_LOAD_FLAGS_H_ |
6 #define NET_BASE_LOAD_FLAGS_H__ | 6 #define NET_BASE_LOAD_FLAGS_H_ |
7 | 7 |
8 namespace net { | 8 namespace net { |
9 | 9 |
10 // These flags provide metadata about the type of the load request. They are | 10 // These flags provide metadata about the type of the load request. They are |
11 // intended to be OR'd together. | 11 // intended to be OR'd together. |
12 enum { | 12 enum { |
13 LOAD_NORMAL = 0, | |
14 | 13 |
15 // This is "normal reload", meaning an if-none-match/if-modified-since query | 14 #define LOAD_FLAG(label, value) LOAD_ ## label = value, |
16 LOAD_VALIDATE_CACHE = 1 << 0, | 15 #include "net/base/load_flags_list.h" |
| 16 #undef LOAD_FLAG |
17 | 17 |
18 // This is "shift-reload", meaning a "pragma: no-cache" end-to-end fetch | |
19 LOAD_BYPASS_CACHE = 1 << 1, | |
20 | |
21 // This is a back/forward style navigation where the cached content should | |
22 // be preferred over any protocol specific cache validation. | |
23 LOAD_PREFERRING_CACHE = 1 << 2, | |
24 | |
25 // This is a navigation that will fail if it cannot serve the requested | |
26 // resource from the cache (or some equivalent local store). | |
27 LOAD_ONLY_FROM_CACHE = 1 << 3, | |
28 | |
29 // This is a navigation that will not use the cache at all. It does not | |
30 // impact the HTTP request headers. | |
31 LOAD_DISABLE_CACHE = 1 << 4, | |
32 | |
33 // This is a navigation that will not be intercepted by any registered | |
34 // URLRequest::Interceptors. | |
35 LOAD_DISABLE_INTERCEPT = 1 << 5, | |
36 | |
37 // If present, upload progress messages should be provided to initiator. | |
38 LOAD_ENABLE_UPLOAD_PROGRESS = 1 << 6, | |
39 | |
40 // If present, ignores certificate mismatches with the domain name. | |
41 // (The default behavior is to trigger an OnSSLCertificateError callback.) | |
42 LOAD_IGNORE_CERT_COMMON_NAME_INVALID = 1 << 8, | |
43 | |
44 // If present, ignores certificate expiration dates | |
45 // (The default behavior is to trigger an OnSSLCertificateError callback). | |
46 LOAD_IGNORE_CERT_DATE_INVALID = 1 << 9, | |
47 | |
48 // If present, trusts all certificate authorities | |
49 // (The default behavior is to trigger an OnSSLCertificateError callback). | |
50 LOAD_IGNORE_CERT_AUTHORITY_INVALID = 1 << 10, | |
51 | |
52 // If present, ignores certificate revocation | |
53 // (The default behavior is to trigger an OnSSLCertificateError callback). | |
54 LOAD_IGNORE_CERT_REVOCATION = 1 << 11, | |
55 | |
56 // If present, ignores wrong key usage of the certificate | |
57 // (The default behavior is to trigger an OnSSLCertificateError callback). | |
58 LOAD_IGNORE_CERT_WRONG_USAGE = 1 << 12, | |
59 | |
60 // This load will not make any changes to cookies, including storing new | |
61 // cookies or updating existing ones. | |
62 LOAD_DO_NOT_SAVE_COOKIES = 1 << 13, | |
63 | |
64 // Do not resolve proxies. This override is used when downloading PAC files | |
65 // to avoid having a circular dependency. | |
66 LOAD_BYPASS_PROXY = 1 << 14, | |
67 | |
68 // Indicate this request is for a download, as opposed to viewing. | |
69 LOAD_IS_DOWNLOAD = 1 << 15, | |
70 | |
71 // Requires EV certificate verification. | |
72 LOAD_VERIFY_EV_CERT = 1 << 16, | |
73 | |
74 // This load will not send any cookies. | |
75 LOAD_DO_NOT_SEND_COOKIES = 1 << 17, | |
76 | |
77 // This load will not send authentication data (user name/password) | |
78 // to the server (as opposed to the proxy). | |
79 LOAD_DO_NOT_SEND_AUTH_DATA = 1 << 18, | |
80 }; | 18 }; |
81 | 19 |
82 } // namespace net | 20 } // namespace net |
83 | 21 |
84 #endif // NET_BASE_LOAD_FLAGS_H__ | 22 #endif // NET_BASE_LOAD_FLAGS_H_ |
OLD | NEW |