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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp

Issue 2714423002: Rename SkipServiceWorker to ServiceWorkerMode (Closed)
Patch Set: typos-- Created 3 years, 9 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 DCHECK(requestURL.user().isEmpty()); 93 DCHECK(requestURL.user().isEmpty());
94 DCHECK(requestURL.pass().isEmpty()); 94 DCHECK(requestURL.pass().isEmpty());
95 95
96 ResourceRequest preflightRequest(requestURL); 96 ResourceRequest preflightRequest(requestURL);
97 preflightRequest.setAllowStoredCredentials(false); 97 preflightRequest.setAllowStoredCredentials(false);
98 preflightRequest.setHTTPMethod(HTTPNames::OPTIONS); 98 preflightRequest.setHTTPMethod(HTTPNames::OPTIONS);
99 preflightRequest.setHTTPHeaderField(HTTPNames::Access_Control_Request_Method, 99 preflightRequest.setHTTPHeaderField(HTTPNames::Access_Control_Request_Method,
100 AtomicString(request.httpMethod())); 100 AtomicString(request.httpMethod()));
101 preflightRequest.setPriority(request.priority()); 101 preflightRequest.setPriority(request.priority());
102 preflightRequest.setRequestContext(request.requestContext()); 102 preflightRequest.setRequestContext(request.requestContext());
103 preflightRequest.setSkipServiceWorker(WebURLRequest::SkipServiceWorker::All); 103 preflightRequest.setServiceWorkerMode(WebURLRequest::ServiceWorkerMode::None);
104 104
105 if (request.isExternalRequest()) { 105 if (request.isExternalRequest()) {
106 preflightRequest.setHTTPHeaderField( 106 preflightRequest.setHTTPHeaderField(
107 HTTPNames::Access_Control_Request_External, "true"); 107 HTTPNames::Access_Control_Request_External, "true");
108 } 108 }
109 109
110 AtomicString requestHeaders = 110 AtomicString requestHeaders =
111 createAccessControlRequestHeadersHeader(request.httpHeaderFields()); 111 createAccessControlRequestHeadersHeader(request.httpHeaderFields());
112 if (requestHeaders != nullAtom) { 112 if (requestHeaders != nullAtom) {
113 preflightRequest.setHTTPHeaderField( 113 preflightRequest.setHTTPHeaderField(
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // 532 //
533 // This is equivalent to the step 2 in 533 // This is equivalent to the step 2 in
534 // https://fetch.spec.whatwg.org/#http-network-or-cache-fetch 534 // https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
535 if (options.credentialsRequested == ClientDidNotRequestCredentials) 535 if (options.credentialsRequested == ClientDidNotRequestCredentials)
536 options.allowCredentials = DoNotAllowStoredCredentials; 536 options.allowCredentials = DoNotAllowStoredCredentials;
537 } 537 }
538 return true; 538 return true;
539 } 539 }
540 540
541 } // namespace blink 541 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698