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

Side by Side Diff: Source/modules/serviceworkers/Request.cpp

Issue 433793002: Introducing the WebServiceWorkerCache. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remediate to dominicc review Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "Request.h" 6 #include "Request.h"
7 7
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "core/dom/ExecutionContext.h" 9 #include "core/dom/ExecutionContext.h"
10 #include "core/fetch/FetchUtils.h" 10 #include "core/fetch/FetchUtils.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 return "omit"; 297 return "omit";
298 case FetchRequestData::SameOriginCredentials: 298 case FetchRequestData::SameOriginCredentials:
299 return "same-origin"; 299 return "same-origin";
300 case FetchRequestData::IncludeCredentials: 300 case FetchRequestData::IncludeCredentials:
301 return "include"; 301 return "include";
302 } 302 }
303 ASSERT_NOT_REACHED(); 303 ASSERT_NOT_REACHED();
304 return ""; 304 return "";
305 } 305 }
306 306
307 void Request::populateWebServiceWorkerRequest(WebServiceWorkerRequest& webReques t) 307 void Request::populateWebServiceWorkerRequest(WebServiceWorkerRequest& webReques t) const
308 { 308 {
309 webRequest.setMethod(method()); 309 webRequest.setMethod(method());
310 webRequest.setURL(m_request->url()); 310 webRequest.setURL(m_request->url());
311 m_headers->forEach(adoptPtrWillBeNoop(new FillWebRequestHeaders(&webRequest) )); 311 m_headers->forEach(adoptPtrWillBeNoop(new FillWebRequestHeaders(&webRequest) ));
312 webRequest.setReferrer(m_request->referrer().referrer().referrer, static_cas t<WebReferrerPolicy>(m_request->referrer().referrer().referrerPolicy)); 312 webRequest.setReferrer(m_request->referrer().referrer().referrer, static_cas t<WebReferrerPolicy>(m_request->referrer().referrer().referrerPolicy));
313 // FIXME: How can we set isReload properly? What is the correct place to loa d it in to the Request object? We should investigate the right way 313 // FIXME: How can we set isReload properly? What is the correct place to loa d it in to the Request object? We should investigate the right way
314 // to plumb this information in to here. 314 // to plumb this information in to here.
315 } 315 }
316 316
317 void Request::setBodyBlobHandle(PassRefPtr<BlobDataHandle> blobDataHandle) 317 void Request::setBodyBlobHandle(PassRefPtr<BlobDataHandle> blobDataHandle)
318 { 318 {
319 m_request->setBlobDataHandle(blobDataHandle); 319 m_request->setBlobDataHandle(blobDataHandle);
320 } 320 }
321 321
322 PassRefPtr<BlobDataHandle> Request::blobDataHandle() 322 PassRefPtr<BlobDataHandle> Request::blobDataHandle()
323 { 323 {
324 return m_request->blobDataHandle(); 324 return m_request->blobDataHandle();
325 } 325 }
326 326
327 void Request::trace(Visitor* visitor) 327 void Request::trace(Visitor* visitor)
328 { 328 {
329 Body::trace(visitor); 329 Body::trace(visitor);
330 visitor->trace(m_request); 330 visitor->trace(m_request);
331 visitor->trace(m_headers); 331 visitor->trace(m_headers);
332 } 332 }
333 333
334 } // namespace blink 334 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698