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

Side by Side Diff: third_party/WebKit/Source/web/WebDataSourceImpl.cpp

Issue 2461043003: Fix for the RedirectTest.ClientServerServer test. (Closed)
Patch Set: More build error fixes Created 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebDataSourceImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
34 #include "public/platform/WebDocumentSubresourceFilter.h" 34 #include "public/platform/WebDocumentSubresourceFilter.h"
35 #include "public/platform/WebURL.h" 35 #include "public/platform/WebURL.h"
36 #include "public/platform/WebURLError.h" 36 #include "public/platform/WebURLError.h"
37 #include "public/platform/WebVector.h" 37 #include "public/platform/WebVector.h"
38 #include "wtf/PtrUtil.h" 38 #include "wtf/PtrUtil.h"
39 #include <memory> 39 #include <memory>
40 40
41 namespace blink { 41 namespace blink {
42 42
43 WebDataSourceImpl* WebDataSourceImpl::create(LocalFrame* frame, 43 WebDataSourceImpl* WebDataSourceImpl::create(
44 const ResourceRequest& request, 44 LocalFrame* frame,
45 const SubstituteData& data) { 45 const ResourceRequest& request,
46 return new WebDataSourceImpl(frame, request, data); 46 const SubstituteData& data,
47 ClientRedirectPolicy clientRedirectPolicy) {
48 return new WebDataSourceImpl(frame, request, data, clientRedirectPolicy);
47 } 49 }
48 50
49 const WebURLRequest& WebDataSourceImpl::originalRequest() const { 51 const WebURLRequest& WebDataSourceImpl::originalRequest() const {
50 return m_originalRequestWrapper; 52 return m_originalRequestWrapper;
51 } 53 }
52 54
53 const WebURLRequest& WebDataSourceImpl::request() const { 55 const WebURLRequest& WebDataSourceImpl::request() const {
54 return m_requestWrapper; 56 return m_requestWrapper;
55 } 57 }
56 58
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 case NavigationTypeFormResubmitted: 131 case NavigationTypeFormResubmitted:
130 return WebNavigationTypeFormResubmitted; 132 return WebNavigationTypeFormResubmitted;
131 case NavigationTypeOther: 133 case NavigationTypeOther:
132 default: 134 default:
133 return WebNavigationTypeOther; 135 return WebNavigationTypeOther;
134 } 136 }
135 } 137 }
136 138
137 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, 139 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame,
138 const ResourceRequest& request, 140 const ResourceRequest& request,
139 const SubstituteData& data) 141 const SubstituteData& data,
140 : DocumentLoader(frame, request, data), 142 ClientRedirectPolicy clientRedirectPolicy)
143 : DocumentLoader(frame, request, data, clientRedirectPolicy),
141 m_originalRequestWrapper(DocumentLoader::originalRequest()), 144 m_originalRequestWrapper(DocumentLoader::originalRequest()),
142 m_requestWrapper(DocumentLoader::request()), 145 m_requestWrapper(DocumentLoader::request()),
143 m_responseWrapper(DocumentLoader::response()) {} 146 m_responseWrapper(DocumentLoader::response()) {}
144 147
145 WebDataSourceImpl::~WebDataSourceImpl() { 148 WebDataSourceImpl::~WebDataSourceImpl() {
146 // Verify that detachFromFrame() has been called. 149 // Verify that detachFromFrame() has been called.
147 DCHECK(!m_extraData); 150 DCHECK(!m_extraData);
148 } 151 }
149 152
150 void WebDataSourceImpl::detachFromFrame() { 153 void WebDataSourceImpl::detachFromFrame() {
151 DocumentLoader::detachFromFrame(); 154 DocumentLoader::detachFromFrame();
152 m_extraData.reset(); 155 m_extraData.reset();
153 } 156 }
154 157
155 void WebDataSourceImpl::setSubresourceFilter( 158 void WebDataSourceImpl::setSubresourceFilter(
156 WebDocumentSubresourceFilter* subresourceFilter) { 159 WebDocumentSubresourceFilter* subresourceFilter) {
157 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); 160 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter));
158 } 161 }
159 162
160 DEFINE_TRACE(WebDataSourceImpl) { 163 DEFINE_TRACE(WebDataSourceImpl) {
161 DocumentLoader::trace(visitor); 164 DocumentLoader::trace(visitor);
162 } 165 }
163 166
164 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDataSourceImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698