adamk@chromium.org | 8effd3f6 | 2011-03-25 16:29:07 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Matt Mueller | 9dbbfe6 | 2018-03-20 00:56:57 | [diff] [blame] | 5 | // This file intentionally does not have header guards, it's included |
| 6 | // inside a macro to generate values. The following line silences a |
| 7 | // presubmit warning that would otherwise be triggered by this: |
| 8 | // no-include-guard-because-multiply-included |
| 9 | |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 10 | // This is the list of load flags and their values. For the enum values, |
| 11 | // include the file "net/base/load_flags.h". |
| 12 | // |
| 13 | // Here we define the values using a macro LOAD_FLAG, so it can be |
| 14 | // expanded differently in some places (for example, to automatically |
| 15 | // map a load flag value to its symbolic name). |
| 16 | |
| 17 | LOAD_FLAG(NORMAL, 0) |
| 18 | |
Miriam Gershenson | 2a01b16 | 2018-03-22 22:54:47 | [diff] [blame] | 19 | // This is "normal reload", meaning an if-none-match/if-modified-since query. It |
| 20 | // has no effect on the host cache. |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 21 | LOAD_FLAG(VALIDATE_CACHE, 1 << 0) |
| 22 | |
Miriam Gershenson | 2a01b16 | 2018-03-22 22:54:47 | [diff] [blame] | 23 | // This is "shift-reload", meaning a "pragma: no-cache" end-to-end fetch. It |
| 24 | // also disables use of the host cache for resolutions that go through the |
| 25 | // socket pools. |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 26 | LOAD_FLAG(BYPASS_CACHE, 1 << 1) |
| 27 | |
| 28 | // This is a back/forward style navigation where the cached content should |
| 29 | // be preferred over any protocol specific cache validation. |
jkarlin | a067dee | 2016-10-27 14:48:33 | [diff] [blame] | 30 | LOAD_FLAG(SKIP_CACHE_VALIDATION, 1 << 2) |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 31 | |
| 32 | // This is a navigation that will fail if it cannot serve the requested |
| 33 | // resource from the cache (or some equivalent local store). |
| 34 | LOAD_FLAG(ONLY_FROM_CACHE, 1 << 3) |
| 35 | |
| 36 | // This is a navigation that will not use the cache at all. It does not |
Miriam Gershenson | 2a01b16 | 2018-03-22 22:54:47 | [diff] [blame] | 37 | // impact the HTTP request headers or use of the host cache. |
g.mehndiratt | 5c8771e | 2015-04-27 08:51:39 | [diff] [blame] | 38 | LOAD_FLAG(DISABLE_CACHE, 1 << 4) |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 39 | |
cevans@chromium.org | 6fbac16 | 2011-06-20 00:29:04 | [diff] [blame] | 40 | // If present, causes certificate revocation checks to be skipped on secure |
| 41 | // connections. |
g.mehndiratt | 5c8771e | 2015-04-27 08:51:39 | [diff] [blame] | 42 | LOAD_FLAG(DISABLE_CERT_REVOCATION_CHECKING, 1 << 5) |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 43 | |
| 44 | // This load will not make any changes to cookies, including storing new |
| 45 | // cookies or updating existing ones. |
g.mehndiratt | 5c8771e | 2015-04-27 08:51:39 | [diff] [blame] | 46 | LOAD_FLAG(DO_NOT_SAVE_COOKIES, 1 << 6) |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 47 | |
| 48 | // Do not resolve proxies. This override is used when downloading PAC files |
| 49 | // to avoid having a circular dependency. |
g.mehndiratt | 5c8771e | 2015-04-27 08:51:39 | [diff] [blame] | 50 | LOAD_FLAG(BYPASS_PROXY, 1 << 7) |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 51 | |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 52 | // This load will not send any cookies. |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 53 | LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 8) |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 54 | |
| 55 | // This load will not send authentication data (user name/password) |
| 56 | // to the server (as opposed to the proxy). |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 57 | LOAD_FLAG(DO_NOT_SEND_AUTH_DATA, 1 << 9) |
eroman@chromium.org | f90ad12 | 2010-05-18 20:02:23 | [diff] [blame] | 58 | |
vandebo@chromium.org | e60e47a | 2010-07-14 03:37:18 | [diff] [blame] | 59 | // This should only be used for testing (set by HttpNetworkTransaction). |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 60 | LOAD_FLAG(IGNORE_ALL_CERT_ERRORS, 1 << 10) |
jar@chromium.org | f4ef861 | 2010-07-28 22:37:23 | [diff] [blame] | 61 | |
rdsmith | 4de1fcf | 2016-08-30 05:35:21 | [diff] [blame] | 62 | // DO NOT USE THIS FLAG |
| 63 | // The network stack should not have frame level knowledge. Any pre-connect |
| 64 | // or pre-resolution requiring that knowledge should be done from the |
| 65 | // stack embedder. |
jar@chromium.org | f4ef861 | 2010-07-28 22:37:23 | [diff] [blame] | 66 | // Indicate that this is a top level frame, so that we don't assume it is a |
| 67 | // subresource and speculatively pre-connect or pre-resolve when a referring |
| 68 | // page is loaded. |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 69 | LOAD_FLAG(MAIN_FRAME_DEPRECATED, 1 << 11) |
jar@chromium.org | f4ef861 | 2010-07-28 22:37:23 | [diff] [blame] | 70 | |
gavinp@chromium.org | 1d14ba55 | 2010-11-19 19:07:40 | [diff] [blame] | 71 | // Indicates that this load was motivated by the rel=prefetch feature, |
| 72 | // and is (in theory) not intended for the current frame. |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 73 | LOAD_FLAG(PREFETCH, 1 << 12) |
gavinp@chromium.org | 1d14ba55 | 2010-11-19 19:07:40 | [diff] [blame] | 74 | |
ricea | 76515e8 | 2015-09-14 08:48:03 | [diff] [blame] | 75 | // Indicates that this load could cause deadlock if it has to wait for another |
| 76 | // request. Overrides socket limits. Must always be used with MAXIMUM_PRIORITY. |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 77 | LOAD_FLAG(IGNORE_LIMITS, 1 << 13) |
asanka@chromium.org | e5cd7b5 | 2011-04-13 15:35:20 | [diff] [blame] | 78 | |
joi@chromium.org | 8ec98cd2 | 2011-08-09 22:31:30 | [diff] [blame] | 79 | // Indicates that the operation is somewhat likely to be due to an |
| 80 | // explicit user action. This can be used as a hint to treat the |
| 81 | // request with higher priority. |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 82 | LOAD_FLAG(MAYBE_USER_GESTURE, 1 << 14) |
tsepez@chromium.org | 2217aa2 | 2013-10-11 03:03:54 | [diff] [blame] | 83 | |
| 84 | // Indicates that the username:password portion of the URL should not |
| 85 | // be honored, but that other forms of authority may be used. |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 86 | LOAD_FLAG(DO_NOT_USE_EMBEDDED_IDENTITY, 1 << 15) |
ricea | 8bad09d9 | 2015-08-24 09:01:49 | [diff] [blame] | 87 | |
jri | 4638d5f | 2016-03-04 04:02:56 | [diff] [blame] | 88 | // Indicates that this request is not to be migrated to a new network when QUIC |
| 89 | // connection migration is enabled. |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 90 | LOAD_FLAG(DISABLE_CONNECTION_MIGRATION, 1 << 16) |
jkarlin | dddb82a0 | 2016-12-08 21:31:00 | [diff] [blame] | 91 | |
| 92 | // Indicates that the cache should not check that the request matches the |
| 93 | // response's vary header. |
Ryan Sleevi | 5b4702a | 2018-04-06 22:23:56 | [diff] [blame] | 94 | LOAD_FLAG(SKIP_VARY_CHECK, 1 << 17) |