Remove useless code from HttpFetcher unittests.
This code has no action, other than read the passed memory.
BUG=None
TEST=Build.
Change-Id: I19e8b99b5daaa82e1f77ad327161f7bbe39c2bc4
Reviewed-on: https://chromium-review.googlesource.com/192967
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/http_fetcher_unittest.cc b/http_fetcher_unittest.cc
index 9044129..91a0d10 100644
--- a/http_fetcher_unittest.cc
+++ b/http_fetcher_unittest.cc
@@ -372,12 +372,8 @@
is_expect_error_(false), times_transfer_complete_called_(0),
times_transfer_terminated_called_(0), times_received_bytes_called_(0) {}
- virtual void ReceivedBytes(HttpFetcher* fetcher,
- const char* bytes, int length) {
- char str[length + 1];
- memset(str, 0, length + 1);
- memcpy(str, bytes, length);
-
+ virtual void ReceivedBytes(HttpFetcher* /* fetcher */,
+ const char* /* bytes */, int /* length */) {
// Update counters
times_received_bytes_called_++;
}
@@ -537,10 +533,7 @@
class PausingHttpFetcherTestDelegate : public HttpFetcherDelegate {
public:
virtual void ReceivedBytes(HttpFetcher* fetcher,
- const char* bytes, int length) {
- char str[length + 1];
- memset(str, 0, length + 1);
- memcpy(str, bytes, length);
+ const char* /* bytes */, int /* length */) {
CHECK(!paused_);
paused_ = true;
fetcher->Pause();