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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebURLResponse.cpp

Issue 2483793002: Mark WebURLResponse data size getters as ForTesting (Closed)
Patch Set: Created 4 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
OLDNEW
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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 } 418 }
419 419
420 unsigned short WebURLResponse::remotePort() const { 420 unsigned short WebURLResponse::remotePort() const {
421 return m_resourceResponse->remotePort(); 421 return m_resourceResponse->remotePort();
422 } 422 }
423 423
424 void WebURLResponse::setRemotePort(unsigned short remotePort) { 424 void WebURLResponse::setRemotePort(unsigned short remotePort) {
425 m_resourceResponse->setRemotePort(remotePort); 425 m_resourceResponse->setRemotePort(remotePort);
426 } 426 }
427 427
428 long long WebURLResponse::encodedDataLength() const { 428 long long WebURLResponse::encodedDataLengthForTesting() const {
429 return m_resourceResponse->encodedDataLength(); 429 return m_resourceResponse->encodedDataLength();
430 } 430 }
431 431
432 void WebURLResponse::addToEncodedDataLength(long long length) { 432 void WebURLResponse::addToEncodedDataLength(long long length) {
433 m_resourceResponse->addToEncodedDataLength(length); 433 m_resourceResponse->addToEncodedDataLength(length);
434 } 434 }
435 435
436 long long WebURLResponse::encodedBodyLength() const { 436 long long WebURLResponse::encodedBodyLengthForTesting() const {
437 return m_resourceResponse->encodedBodyLength(); 437 return m_resourceResponse->encodedBodyLength();
438 } 438 }
439 439
440 void WebURLResponse::addToEncodedBodyLength(long long length) { 440 void WebURLResponse::addToEncodedBodyLength(long long length) {
441 m_resourceResponse->addToEncodedBodyLength(length); 441 m_resourceResponse->addToEncodedBodyLength(length);
442 } 442 }
443 443
444 long long WebURLResponse::decodedBodyLength() const { 444 long long WebURLResponse::decodedBodyLengthForTesting() const {
445 return m_resourceResponse->decodedBodyLength(); 445 return m_resourceResponse->decodedBodyLength();
446 } 446 }
447 447
448 void WebURLResponse::addToDecodedBodyLength(long long bytes) { 448 void WebURLResponse::addToDecodedBodyLength(long long bytes) {
449 m_resourceResponse->addToDecodedBodyLength(bytes); 449 m_resourceResponse->addToDecodedBodyLength(bytes);
450 } 450 }
451 451
452 WebURLResponse::ExtraData* WebURLResponse::getExtraData() const { 452 WebURLResponse::ExtraData* WebURLResponse::getExtraData() const {
453 RefPtr<ResourceResponse::ExtraData> data = m_resourceResponse->getExtraData(); 453 RefPtr<ResourceResponse::ExtraData> data = m_resourceResponse->getExtraData();
454 if (!data) 454 if (!data)
455 return 0; 455 return 0;
456 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); 456 return static_cast<ExtraDataContainer*>(data.get())->getExtraData();
457 } 457 }
458 458
459 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) { 459 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) {
460 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData)); 460 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData));
461 } 461 }
462 462
463 void WebURLResponse::appendRedirectResponse(const WebURLResponse& response) { 463 void WebURLResponse::appendRedirectResponse(const WebURLResponse& response) {
464 m_resourceResponse->appendRedirectResponse(response.toResourceResponse()); 464 m_resourceResponse->appendRedirectResponse(response.toResourceResponse());
465 } 465 }
466 466
467 WebURLResponse::WebURLResponse(ResourceResponse& r) : m_resourceResponse(&r) {} 467 WebURLResponse::WebURLResponse(ResourceResponse& r) : m_resourceResponse(&r) {}
468 468
469 } // namespace blink 469 } // namespace blink
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl_unittest.cc ('k') | third_party/WebKit/public/platform/WebURLResponse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698