[go: nahoru, domu]

blob: a342d7615807c33f0ad103e5f24033374d21f565 [file] [log] [blame]
adamk@chromium.org8effd3f62011-03-25 16:29:071// Copyright (c) 2011 The Chromium Authors. All rights reserved.
eroman@chromium.orgf90ad122010-05-18 20:02:232// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Matt Mueller9dbbfe62018-03-20 00:56:575// 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.orgf90ad122010-05-18 20:02:2310// 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
17LOAD_FLAG(NORMAL, 0)
18
Miriam Gershenson2a01b162018-03-22 22:54:4719// This is "normal reload", meaning an if-none-match/if-modified-since query. It
20// has no effect on the host cache.
eroman@chromium.orgf90ad122010-05-18 20:02:2321LOAD_FLAG(VALIDATE_CACHE, 1 << 0)
22
Miriam Gershenson2a01b162018-03-22 22:54:4723// 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.orgf90ad122010-05-18 20:02:2326LOAD_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.
jkarlina067dee2016-10-27 14:48:3330LOAD_FLAG(SKIP_CACHE_VALIDATION, 1 << 2)
eroman@chromium.orgf90ad122010-05-18 20:02:2331
32// This is a navigation that will fail if it cannot serve the requested
33// resource from the cache (or some equivalent local store).
34LOAD_FLAG(ONLY_FROM_CACHE, 1 << 3)
35
36// This is a navigation that will not use the cache at all. It does not
Miriam Gershenson2a01b162018-03-22 22:54:4737// impact the HTTP request headers or use of the host cache.
g.mehndiratt5c8771e2015-04-27 08:51:3938LOAD_FLAG(DISABLE_CACHE, 1 << 4)
eroman@chromium.orgf90ad122010-05-18 20:02:2339
cevans@chromium.org6fbac162011-06-20 00:29:0440// If present, causes certificate revocation checks to be skipped on secure
41// connections.
g.mehndiratt5c8771e2015-04-27 08:51:3942LOAD_FLAG(DISABLE_CERT_REVOCATION_CHECKING, 1 << 5)
eroman@chromium.orgf90ad122010-05-18 20:02:2343
44// This load will not make any changes to cookies, including storing new
45// cookies or updating existing ones.
g.mehndiratt5c8771e2015-04-27 08:51:3946LOAD_FLAG(DO_NOT_SAVE_COOKIES, 1 << 6)
eroman@chromium.orgf90ad122010-05-18 20:02:2347
48// Do not resolve proxies. This override is used when downloading PAC files
49// to avoid having a circular dependency.
g.mehndiratt5c8771e2015-04-27 08:51:3950LOAD_FLAG(BYPASS_PROXY, 1 << 7)
eroman@chromium.orgf90ad122010-05-18 20:02:2351
eroman@chromium.orgf90ad122010-05-18 20:02:2352// This load will not send any cookies.
Ryan Sleevi5b4702a2018-04-06 22:23:5653LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 8)
eroman@chromium.orgf90ad122010-05-18 20:02:2354
55// This load will not send authentication data (user name/password)
56// to the server (as opposed to the proxy).
Ryan Sleevi5b4702a2018-04-06 22:23:5657LOAD_FLAG(DO_NOT_SEND_AUTH_DATA, 1 << 9)
eroman@chromium.orgf90ad122010-05-18 20:02:2358
vandebo@chromium.orge60e47a2010-07-14 03:37:1859// This should only be used for testing (set by HttpNetworkTransaction).
Ryan Sleevi5b4702a2018-04-06 22:23:5660LOAD_FLAG(IGNORE_ALL_CERT_ERRORS, 1 << 10)
jar@chromium.orgf4ef8612010-07-28 22:37:2361
rdsmith4de1fcf2016-08-30 05:35:2162// 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.orgf4ef8612010-07-28 22:37:2366// 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 Sleevi5b4702a2018-04-06 22:23:5669LOAD_FLAG(MAIN_FRAME_DEPRECATED, 1 << 11)
jar@chromium.orgf4ef8612010-07-28 22:37:2370
gavinp@chromium.org1d14ba552010-11-19 19:07:4071// Indicates that this load was motivated by the rel=prefetch feature,
72// and is (in theory) not intended for the current frame.
Ryan Sleevi5b4702a2018-04-06 22:23:5673LOAD_FLAG(PREFETCH, 1 << 12)
gavinp@chromium.org1d14ba552010-11-19 19:07:4074
ricea76515e82015-09-14 08:48:0375// 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 Sleevi5b4702a2018-04-06 22:23:5677LOAD_FLAG(IGNORE_LIMITS, 1 << 13)
asanka@chromium.orge5cd7b52011-04-13 15:35:2078
joi@chromium.org8ec98cd22011-08-09 22:31:3079// 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 Sleevi5b4702a2018-04-06 22:23:5682LOAD_FLAG(MAYBE_USER_GESTURE, 1 << 14)
tsepez@chromium.org2217aa22013-10-11 03:03:5483
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 Sleevi5b4702a2018-04-06 22:23:5686LOAD_FLAG(DO_NOT_USE_EMBEDDED_IDENTITY, 1 << 15)
ricea8bad09d92015-08-24 09:01:4987
jri4638d5f2016-03-04 04:02:5688// Indicates that this request is not to be migrated to a new network when QUIC
89// connection migration is enabled.
Ryan Sleevi5b4702a2018-04-06 22:23:5690LOAD_FLAG(DISABLE_CONNECTION_MIGRATION, 1 << 16)
jkarlindddb82a02016-12-08 21:31:0091
92// Indicates that the cache should not check that the request matches the
93// response's vary header.
Ryan Sleevi5b4702a2018-04-06 22:23:5694LOAD_FLAG(SKIP_VARY_CHECK, 1 << 17)