Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2232)

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h

Issue 2391523002: Do not revalidate when ResourceLoaderOptions.synchronousPolicy is different (Closed)
Patch Set: git cl format Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Answers the question "can a separate request with these different options 97 // Answers the question "can a separate request with these different options
98 // be re-used" (e.g. preload request) The safe (but possibly slow) answer is 98 // be re-used" (e.g. preload request) The safe (but possibly slow) answer is
99 // always false. 99 // always false.
100 bool canReuseRequest(const ResourceLoaderOptions& other) const { 100 bool canReuseRequest(const ResourceLoaderOptions& other) const {
101 // dataBufferingPolicy differences are believed to be safe for re-use. 101 // dataBufferingPolicy differences are believed to be safe for re-use.
102 // FIXME: check allowCredentials. 102 // FIXME: check allowCredentials.
103 // FIXME: check credentialsRequested. 103 // FIXME: check credentialsRequested.
104 // FIXME: check contentSecurityPolicyOption. 104 // FIXME: check contentSecurityPolicyOption.
105 // initiatorInfo is purely informational and should be benign for re-use. 105 // initiatorInfo is purely informational and should be benign for re-use.
106 // requestInitiatorContext is benign (indicates document vs. worker) 106 // requestInitiatorContext is benign (indicates document vs. worker)
107 // synchronousPolicy (safe to re-use an async XHR response for sync, etc.) 107 if (synchronousPolicy != other.synchronousPolicy)
108 return false;
108 return corsEnabled == other.corsEnabled; 109 return corsEnabled == other.corsEnabled;
109 // securityOrigin has more complicated checks which callers are responsible 110 // securityOrigin has more complicated checks which callers are responsible
110 // for. 111 // for.
111 } 112 }
112 113
113 // When adding members, CrossThreadResourceLoaderOptionsData should be 114 // When adding members, CrossThreadResourceLoaderOptionsData should be
114 // updated. 115 // updated.
115 DataBufferingPolicy dataBufferingPolicy; 116 DataBufferingPolicy dataBufferingPolicy;
116 117
117 // Whether HTTP credentials and cookies are sent with the request. 118 // Whether HTTP credentials and cookies are sent with the request.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 struct CrossThreadCopier<ResourceLoaderOptions> { 186 struct CrossThreadCopier<ResourceLoaderOptions> {
186 using Type = CrossThreadResourceLoaderOptionsData; 187 using Type = CrossThreadResourceLoaderOptionsData;
187 static Type copy(const ResourceLoaderOptions& options) { 188 static Type copy(const ResourceLoaderOptions& options) {
188 return CrossThreadResourceLoaderOptionsData(options); 189 return CrossThreadResourceLoaderOptionsData(options);
189 } 190 }
190 }; 191 };
191 192
192 } // namespace blink 193 } // namespace blink
193 194
194 #endif // ResourceLoaderOptions_h 195 #endif // ResourceLoaderOptions_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698