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