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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 1271733002: [2/3 chromium] Support redirect option of Request and "opaqueredirect" response type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add _MODE to avoid compile error at Windows. Created 5 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 | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index c09713f64895a7a807f14a60483cb4240bd9fba3..06b60b8c7c509f053cd2ebc90227ad79ce09a56f 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -195,6 +195,17 @@ FetchCredentialsMode GetFetchCredentialsMode(const WebURLRequest& request) {
return static_cast<FetchCredentialsMode>(request.fetchCredentialsMode());
}
+STATIC_ASSERT_MATCHING_ENUMS(FetchRedirectMode::FOLLOW_MODE,
+ WebURLRequest::FetchRedirectModeFollow);
+STATIC_ASSERT_MATCHING_ENUMS(FetchRedirectMode::ERROR_MODE,
+ WebURLRequest::FetchRedirectModeError);
+STATIC_ASSERT_MATCHING_ENUMS(FetchRedirectMode::MANUAL_MODE,
+ WebURLRequest::FetchRedirectModeManual);
+
+FetchRedirectMode GetFetchRedirectMode(const WebURLRequest& request) {
+ return static_cast<FetchRedirectMode>(request.fetchRedirectMode());
+}
+
STATIC_ASSERT_MATCHING_ENUMS(REQUEST_CONTEXT_FRAME_TYPE_AUXILIARY,
WebURLRequest::FrameTypeAuxiliary);
STATIC_ASSERT_MATCHING_ENUMS(REQUEST_CONTEXT_FRAME_TYPE_NESTED,
@@ -590,6 +601,7 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
request_info.should_reset_appcache = request.shouldResetAppCache();
request_info.fetch_request_mode = GetFetchRequestMode(request);
request_info.fetch_credentials_mode = GetFetchCredentialsMode(request);
+ request_info.fetch_redirect_mode = GetFetchRedirectMode(request);
request_info.fetch_request_context_type = GetRequestContextType(request);
request_info.fetch_frame_type = GetRequestContextFrameType(request);
request_info.extra_data = request.extraData();
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698