| OLD | NEW |
| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 } | 349 } |
| 350 | 350 |
| 351 void WebURLResponse::SetRemotePort(unsigned short remote_port) { | 351 void WebURLResponse::SetRemotePort(unsigned short remote_port) { |
| 352 resource_response_->SetRemotePort(remote_port); | 352 resource_response_->SetRemotePort(remote_port); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void WebURLResponse::SetEncodedDataLength(long long length) { | 355 void WebURLResponse::SetEncodedDataLength(long long length) { |
| 356 resource_response_->SetEncodedDataLength(length); | 356 resource_response_->SetEncodedDataLength(length); |
| 357 } | 357 } |
| 358 | 358 |
| 359 void WebURLResponse::AddToEncodedBodyLength(long long length) { | |
| 360 resource_response_->AddToEncodedBodyLength(length); | |
| 361 } | |
| 362 | |
| 363 void WebURLResponse::AddToDecodedBodyLength(long long bytes) { | |
| 364 resource_response_->AddToDecodedBodyLength(bytes); | |
| 365 } | |
| 366 | |
| 367 WebURLResponse::ExtraData* WebURLResponse::GetExtraData() const { | 359 WebURLResponse::ExtraData* WebURLResponse::GetExtraData() const { |
| 368 RefPtr<ResourceResponse::ExtraData> data = resource_response_->GetExtraData(); | 360 RefPtr<ResourceResponse::ExtraData> data = resource_response_->GetExtraData(); |
| 369 if (!data) | 361 if (!data) |
| 370 return 0; | 362 return 0; |
| 371 return static_cast<ExtraDataContainer*>(data.Get())->GetExtraData(); | 363 return static_cast<ExtraDataContainer*>(data.Get())->GetExtraData(); |
| 372 } | 364 } |
| 373 | 365 |
| 374 void WebURLResponse::SetExtraData(WebURLResponse::ExtraData* extra_data) { | 366 void WebURLResponse::SetExtraData(WebURLResponse::ExtraData* extra_data) { |
| 375 if (extra_data != GetExtraData()) | 367 if (extra_data != GetExtraData()) |
| 376 resource_response_->SetExtraData(ExtraDataContainer::Create(extra_data)); | 368 resource_response_->SetExtraData(ExtraDataContainer::Create(extra_data)); |
| 377 } | 369 } |
| 378 | 370 |
| 379 void WebURLResponse::AppendRedirectResponse(const WebURLResponse& response) { | 371 void WebURLResponse::AppendRedirectResponse(const WebURLResponse& response) { |
| 380 resource_response_->AppendRedirectResponse(response.ToResourceResponse()); | 372 resource_response_->AppendRedirectResponse(response.ToResourceResponse()); |
| 381 } | 373 } |
| 382 | 374 |
| 383 WebURLResponse::WebURLResponse(ResourceResponse& r) : resource_response_(&r) {} | 375 WebURLResponse::WebURLResponse(ResourceResponse& r) : resource_response_(&r) {} |
| 384 | 376 |
| 385 } // namespace blink | 377 } // namespace blink |
| OLD | NEW |