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

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

Issue 706543002: [ServiceWorker] Stop using FetchRequestData::Mode and FetchRequestData::Credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | Source/modules/serviceworkers/FetchRequestData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/FetchManager.cpp
diff --git a/Source/modules/serviceworkers/FetchManager.cpp b/Source/modules/serviceworkers/FetchManager.cpp
index fd25997e85bb4bd27a3b79c656144635980b1dec..7af242a18ace3960464ef17750055459d1399997 100644
--- a/Source/modules/serviceworkers/FetchManager.cpp
+++ b/Source/modules/serviceworkers/FetchManager.cpp
@@ -175,14 +175,14 @@ void FetchManager::Loader::start()
}
// "- |request|'s mode is |same-origin|"
- if (m_request->mode() == FetchRequestData::SameOriginMode) {
+ if (m_request->mode() == WebURLRequest::FetchRequestModeSameOrigin) {
// "A network error."
performNetworkError();
return;
}
// "- |request|'s mode is |no CORS|"
- if (m_request->mode() == FetchRequestData::NoCORSMode) {
+ if (m_request->mode() == WebURLRequest::FetchRequestModeNoCORS) {
// "Set |request|'s response tainting to |opaque|."
m_request->setResponseTainting(FetchRequestData::OpaqueTainting);
// "The result of performing a basic fetch using |request|."
@@ -201,7 +201,7 @@ void FetchManager::Loader::start()
// "- |request|'s unsafe request flag is set and either |request|'s method
// is not a simple method or a header in |request|'s header list is not a
// simple header"
- if (m_request->mode() == FetchRequestData::CORSWithForcedPreflight
+ if (m_request->mode() == WebURLRequest::FetchRequestModeCORSWithForcedPreflight
|| (m_request->unsafeRequestFlag()
&& (!FetchUtils::isSimpleMethod(m_request->method())
|| m_request->headerList()->containsNonSimpleHeader()))) {
@@ -303,8 +303,8 @@ void FetchManager::Loader::performHTTPFetch()
// and the |CORS flag| is unset, and unset otherwise.
ResourceLoaderOptions resourceLoaderOptions;
resourceLoaderOptions.dataBufferingPolicy = DoNotBufferData;
- if (m_request->credentials() == FetchRequestData::IncludeCredentials
- || (m_request->credentials() == FetchRequestData::SameOriginCredentials && !m_corsFlag)) {
+ if (m_request->credentials() == WebURLRequest::FetchCredentialsModeInclude
+ || (m_request->credentials() == WebURLRequest::FetchCredentialsModeSameOrigin && !m_corsFlag)) {
resourceLoaderOptions.allowCredentials = AllowStoredCredentials;
}
« no previous file with comments | « no previous file | Source/modules/serviceworkers/FetchRequestData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698