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

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: Created 6 years, 4 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
« no previous file with comments | « Source/modules/serviceworkers/Headers.cpp ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/Request.cpp
diff --git a/Source/modules/serviceworkers/Request.cpp b/Source/modules/serviceworkers/Request.cpp
index 76180b6bb969f52b6c9757dc0cd4f7c589cf93db..43ffd21b7e10cdec12413cfc7a72a5cb8935d2cd 100644
--- a/Source/modules/serviceworkers/Request.cpp
+++ b/Source/modules/serviceworkers/Request.cpp
@@ -7,7 +7,7 @@
#include "bindings/core/v8/Dictionary.h"
#include "core/dom/ExecutionContext.h"
-#include "core/fetch/CrossOriginAccessControl.h"
+#include "core/fetch/FetchUtils.h"
#include "core/fetch/ResourceLoaderOptions.h"
#include "core/loader/ThreadableLoader.h"
#include "core/xml/XMLHttpRequest.h"
@@ -60,7 +60,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 (!FetchUtils::isUsefulMethod(init.method)) {
exceptionState.throwTypeError("'" + init.method + "' HTTP method is unsupported.");
return nullptr;
}
@@ -92,7 +92,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 (!FetchUtils::isSimpleMethod(r->request()->method())) {
exceptionState.throwTypeError("'" + r->request()->method() + "' is unsupported in no-cors mode.");
return nullptr;
}
« no previous file with comments | « Source/modules/serviceworkers/Headers.cpp ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698