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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/Response.cpp

Issue 2292763002: [Fetch API] Implement Request.formData and Response.formData. (Closed)
Patch Set: More global-interface-listing*-expected.txt, urlencoded-parser-expected.txt Created 3 years, 7 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
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 "modules/fetch/Response.h" 5 #include "modules/fetch/Response.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/V8ArrayBuffer.h" 10 #include "bindings/core/v8/V8ArrayBuffer.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 424
425 bool Response::bodyUsed() { 425 bool Response::bodyUsed() {
426 return InternalBodyBuffer() && InternalBodyBuffer()->IsStreamDisturbed(); 426 return InternalBodyBuffer() && InternalBodyBuffer()->IsStreamDisturbed();
427 } 427 }
428 428
429 String Response::MimeType() const { 429 String Response::MimeType() const {
430 return response_->MimeType(); 430 return response_->MimeType();
431 } 431 }
432 432
433 String Response::ContentType() const {
434 String result;
435 response_->HeaderList()->Get(HTTPNames::Content_Type, result);
436 return result;
437 }
438
433 String Response::InternalMIMEType() const { 439 String Response::InternalMIMEType() const {
434 return response_->InternalMIMEType(); 440 return response_->InternalMIMEType();
435 } 441 }
436 442
437 const Vector<KURL>& Response::InternalURLList() const { 443 const Vector<KURL>& Response::InternalURLList() const {
438 return response_->InternalURLList(); 444 return response_->InternalURLList();
439 } 445 }
440 446
441 void Response::InstallBody() { 447 void Response::InstallBody() {
442 if (!InternalBodyBuffer()) 448 if (!InternalBodyBuffer())
(...skipping 16 matching lines...) Expand all
459 .Set(response.As<v8::Object>(), body_buffer); 465 .Set(response.As<v8::Object>(), body_buffer);
460 } 466 }
461 467
462 DEFINE_TRACE(Response) { 468 DEFINE_TRACE(Response) {
463 Body::Trace(visitor); 469 Body::Trace(visitor);
464 visitor->Trace(response_); 470 visitor->Trace(response_);
465 visitor->Trace(headers_); 471 visitor->Trace(headers_);
466 } 472 }
467 473
468 } // namespace blink 474 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Response.h ('k') | third_party/WebKit/Source/platform/network/HTTPParsers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698