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

Unified Diff: Source/modules/serviceworkers/Request.cpp

Issue 379113002: Move fetch-related predicates to core/fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/serviceworkers/Request.cpp
diff --git a/Source/modules/serviceworkers/Request.cpp b/Source/modules/serviceworkers/Request.cpp
index 50d5304bf7dabee4a4f7a937f1177f011688f31b..1fe9fa91c97c6f73e14434a24243edb28987ea15 100644
--- a/Source/modules/serviceworkers/Request.cpp
+++ b/Source/modules/serviceworkers/Request.cpp
@@ -61,7 +61,7 @@ PassRefPtrWillBeRawPtr<Request> createRequestWithRequestData(PassRefPtrWillBeRaw
// these substeps:"
if (!init.method.isEmpty()) {
// "1. If |method| is not a useful method, throw a TypeError."
- if (!FetchManager::isUsefulMethod(init.method)) {
+ if (!CrossOriginAccessControl::isUsefulMethod(init.method)) {
exceptionState.throwTypeError("'" + init.method + "' HTTP method is unsupported.");
return nullptr;
}
@@ -93,7 +93,7 @@ PassRefPtrWillBeRawPtr<Request> createRequestWithRequestData(PassRefPtrWillBeRaw
if (r->request()->mode() == FetchRequestData::NoCORSMode) {
// "1. If |r|'s request's method is not a simple method, throw a
// TypeError."
- if (!FetchManager::isSimpleMethod(r->request()->method())) {
+ if (!CrossOriginAccessControl::isSimpleMethod(r->request()->method())) {
exceptionState.throwTypeError("'" + r->request()->method() + "' is unsupported in no-cors mode.");
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698