| OLD | NEW |
| 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/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 return "cors"; | 328 return "cors"; |
| 329 case FetchResponseData::kDefaultType: | 329 case FetchResponseData::kDefaultType: |
| 330 return "default"; | 330 return "default"; |
| 331 case FetchResponseData::kErrorType: | 331 case FetchResponseData::kErrorType: |
| 332 return "error"; | 332 return "error"; |
| 333 case FetchResponseData::kOpaqueType: | 333 case FetchResponseData::kOpaqueType: |
| 334 return "opaque"; | 334 return "opaque"; |
| 335 case FetchResponseData::kOpaqueRedirectType: | 335 case FetchResponseData::kOpaqueRedirectType: |
| 336 return "opaqueredirect"; | 336 return "opaqueredirect"; |
| 337 } | 337 } |
| 338 ASSERT_NOT_REACHED(); | 338 NOTREACHED(); |
| 339 return ""; | 339 return ""; |
| 340 } | 340 } |
| 341 | 341 |
| 342 String Response::url() const { | 342 String Response::url() const { |
| 343 // "The url attribute's getter must return the empty string if response's | 343 // "The url attribute's getter must return the empty string if response's |
| 344 // url is null and response's url, serialized with the exclude fragment | 344 // url is null and response's url, serialized with the exclude fragment |
| 345 // flag set, otherwise." | 345 // flag set, otherwise." |
| 346 const KURL* response_url = response_->Url(); | 346 const KURL* response_url = response_->Url(); |
| 347 if (!response_url) | 347 if (!response_url) |
| 348 return g_empty_string; | 348 return g_empty_string; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 .Set(response.As<v8::Object>(), body_buffer); | 463 .Set(response.As<v8::Object>(), body_buffer); |
| 464 } | 464 } |
| 465 | 465 |
| 466 DEFINE_TRACE(Response) { | 466 DEFINE_TRACE(Response) { |
| 467 Body::Trace(visitor); | 467 Body::Trace(visitor); |
| 468 visitor->Trace(response_); | 468 visitor->Trace(response_); |
| 469 visitor->Trace(headers_); | 469 visitor->Trace(headers_); |
| 470 } | 470 } |
| 471 | 471 |
| 472 } // namespace blink | 472 } // namespace blink |
| OLD | NEW |