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

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

Issue 708703002: Service Worker: Cache.put() consumes request/response bodies (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Cleaned up Cache::put code 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 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool Request::hasBody() const
323 {
324 return m_request->blobDataHandle();
325 }
326
322 void Request::clearHeaderList() 327 void Request::clearHeaderList()
323 { 328 {
324 m_request->headerList()->clearList(); 329 m_request->headerList()->clearList();
325 } 330 }
326 331
327 PassRefPtr<BlobDataHandle> Request::blobDataHandle() 332 PassRefPtr<BlobDataHandle> Request::blobDataHandle()
328 { 333 {
329 return m_request->blobDataHandle(); 334 return m_request->blobDataHandle();
330 } 335 }
331 336
332 void Request::trace(Visitor* visitor) 337 void Request::trace(Visitor* visitor)
333 { 338 {
334 Body::trace(visitor); 339 Body::trace(visitor);
335 visitor->trace(m_request); 340 visitor->trace(m_request);
336 visitor->trace(m_headers); 341 visitor->trace(m_headers);
337 } 342 }
338 343
339 } // namespace blink 344 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698