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

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceRequest.h

Issue 2105503002: Skip foreign fetch when the skipServiceWorker flag is set on a request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments explaing why skip is set to ::Controlling for fallback requests Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 // True if request should be downloaded to file. 191 // True if request should be downloaded to file.
192 bool downloadToFile() const { return m_downloadToFile; } 192 bool downloadToFile() const { return m_downloadToFile; }
193 void setDownloadToFile(bool downloadToFile) { m_downloadToFile = downloadToF ile; } 193 void setDownloadToFile(bool downloadToFile) { m_downloadToFile = downloadToF ile; }
194 194
195 // True if the requestor wants to receive a response body as 195 // True if the requestor wants to receive a response body as
196 // WebDataConsumerHandle. 196 // WebDataConsumerHandle.
197 bool useStreamOnResponse() const { return m_useStreamOnResponse; } 197 bool useStreamOnResponse() const { return m_useStreamOnResponse; }
198 void setUseStreamOnResponse(bool useStreamOnResponse) { m_useStreamOnRespons e = useStreamOnResponse; } 198 void setUseStreamOnResponse(bool useStreamOnResponse) { m_useStreamOnRespons e = useStreamOnResponse; }
199 199
200 // True if the request should not be handled by the ServiceWorker. 200 // Indicates if the request should be handled by a ServiceWorker.
kinuko 2016/06/30 09:38:21 ditto
Marijn Kruisselbrink 2016/06/30 17:41:54 Done
201 bool skipServiceWorker() const { return m_skipServiceWorker; } 201 WebURLRequest::SkipServiceWorker skipServiceWorker() const { return m_skipSe rviceWorker; }
202 void setSkipServiceWorker(bool skipServiceWorker) { m_skipServiceWorker = sk ipServiceWorker; } 202 void setSkipServiceWorker(WebURLRequest::SkipServiceWorker skipServiceWorker ) { m_skipServiceWorker = skipServiceWorker; }
203 203
204 // True if corresponding AppCache group should be resetted. 204 // True if corresponding AppCache group should be resetted.
205 bool shouldResetAppCache() { return m_shouldResetAppCache; } 205 bool shouldResetAppCache() { return m_shouldResetAppCache; }
206 void setShouldResetAppCache(bool shouldResetAppCache) { m_shouldResetAppCach e = shouldResetAppCache; } 206 void setShouldResetAppCache(bool shouldResetAppCache) { m_shouldResetAppCach e = shouldResetAppCache; }
207 207
208 // Extra data associated with this request. 208 // Extra data associated with this request.
209 ExtraData* getExtraData() const { return m_extraData.get(); } 209 ExtraData* getExtraData() const { return m_extraData.get(); }
210 void setExtraData(PassRefPtr<ExtraData> extraData) { m_extraData = extraData ; } 210 void setExtraData(PassRefPtr<ExtraData> extraData) { m_extraData = extraData ; }
211 211
212 WebURLRequest::RequestContext requestContext() const { return m_requestConte xt; } 212 WebURLRequest::RequestContext requestContext() const { return m_requestConte xt; }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 AtomicString m_httpMethod; 260 AtomicString m_httpMethod;
261 HTTPHeaderMap m_httpHeaderFields; 261 HTTPHeaderMap m_httpHeaderFields;
262 RefPtr<EncodedFormData> m_httpBody; 262 RefPtr<EncodedFormData> m_httpBody;
263 RefPtr<EncodedFormData> m_attachedCredential; 263 RefPtr<EncodedFormData> m_attachedCredential;
264 bool m_allowStoredCredentials : 1; 264 bool m_allowStoredCredentials : 1;
265 bool m_reportUploadProgress : 1; 265 bool m_reportUploadProgress : 1;
266 bool m_reportRawHeaders : 1; 266 bool m_reportRawHeaders : 1;
267 bool m_hasUserGesture : 1; 267 bool m_hasUserGesture : 1;
268 bool m_downloadToFile : 1; 268 bool m_downloadToFile : 1;
269 bool m_useStreamOnResponse : 1; 269 bool m_useStreamOnResponse : 1;
270 bool m_skipServiceWorker : 1;
271 bool m_shouldResetAppCache : 1; 270 bool m_shouldResetAppCache : 1;
271 WebURLRequest::SkipServiceWorker m_skipServiceWorker;
272 ResourceLoadPriority m_priority; 272 ResourceLoadPriority m_priority;
273 int m_intraPriorityValue; 273 int m_intraPriorityValue;
274 int m_requestorID; 274 int m_requestorID;
275 int m_requestorProcessID; 275 int m_requestorProcessID;
276 int m_appCacheHostID; 276 int m_appCacheHostID;
277 RefPtr<ExtraData> m_extraData; 277 RefPtr<ExtraData> m_extraData;
278 WebURLRequest::RequestContext m_requestContext; 278 WebURLRequest::RequestContext m_requestContext;
279 WebURLRequest::FrameType m_frameType; 279 WebURLRequest::FrameType m_frameType;
280 WebURLRequest::FetchRequestMode m_fetchRequestMode; 280 WebURLRequest::FetchRequestMode m_fetchRequestMode;
281 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; 281 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode;
(...skipping 25 matching lines...) Expand all
307 RefPtr<SecurityOrigin> m_requestorOrigin; 307 RefPtr<SecurityOrigin> m_requestorOrigin;
308 308
309 String m_httpMethod; 309 String m_httpMethod;
310 std::unique_ptr<CrossThreadHTTPHeaderMapData> m_httpHeaders; 310 std::unique_ptr<CrossThreadHTTPHeaderMapData> m_httpHeaders;
311 RefPtr<EncodedFormData> m_httpBody; 311 RefPtr<EncodedFormData> m_httpBody;
312 RefPtr<EncodedFormData> m_attachedCredential; 312 RefPtr<EncodedFormData> m_attachedCredential;
313 bool m_allowStoredCredentials; 313 bool m_allowStoredCredentials;
314 bool m_reportUploadProgress; 314 bool m_reportUploadProgress;
315 bool m_hasUserGesture; 315 bool m_hasUserGesture;
316 bool m_downloadToFile; 316 bool m_downloadToFile;
317 bool m_skipServiceWorker; 317 WebURLRequest::SkipServiceWorker m_skipServiceWorker;
318 bool m_useStreamOnResponse; 318 bool m_useStreamOnResponse;
319 bool m_shouldResetAppCache; 319 bool m_shouldResetAppCache;
320 ResourceLoadPriority m_priority; 320 ResourceLoadPriority m_priority;
321 int m_intraPriorityValue; 321 int m_intraPriorityValue;
322 int m_requestorID; 322 int m_requestorID;
323 int m_requestorProcessID; 323 int m_requestorProcessID;
324 int m_appCacheHostID; 324 int m_appCacheHostID;
325 WebURLRequest::RequestContext m_requestContext; 325 WebURLRequest::RequestContext m_requestContext;
326 WebURLRequest::FrameType m_frameType; 326 WebURLRequest::FrameType m_frameType;
327 WebURLRequest::FetchRequestMode m_fetchRequestMode; 327 WebURLRequest::FetchRequestMode m_fetchRequestMode;
328 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; 328 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode;
329 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; 329 WebURLRequest::FetchRedirectMode m_fetchRedirectMode;
330 WebURLRequest::LoFiState m_loFiState; 330 WebURLRequest::LoFiState m_loFiState;
331 ReferrerPolicy m_referrerPolicy; 331 ReferrerPolicy m_referrerPolicy;
332 bool m_didSetHTTPReferrer; 332 bool m_didSetHTTPReferrer;
333 bool m_checkForBrowserSideNavigation; 333 bool m_checkForBrowserSideNavigation;
334 double m_uiStartTime; 334 double m_uiStartTime;
335 bool m_isExternalRequest; 335 bool m_isExternalRequest;
336 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; 336 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy;
337 ResourceRequest::RedirectStatus m_redirectStatus; 337 ResourceRequest::RedirectStatus m_redirectStatus;
338 }; 338 };
339 339
340 } // namespace blink 340 } // namespace blink
341 341
342 #endif // ResourceRequest_h 342 #endif // ResourceRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698