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

Unified Diff: net/url_request/url_request_simple_job_unittest.cc

Issue 1180373004: Cleanup: Remove various DoNothing functions and use base::DoNothing(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_stream_test_util.h ('k') | sandbox/linux/services/scoped_process_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_simple_job_unittest.cc
diff --git a/net/url_request/url_request_simple_job_unittest.cc b/net/url_request/url_request_simple_job_unittest.cc
index 1f8d5a4038f20cc4554ac2854928d96935be4dfb..439995a3b8ebdc0121e81462025d83d9d1181c79 100644
--- a/net/url_request/url_request_simple_job_unittest.cc
+++ b/net/url_request/url_request_simple_job_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/bind_helpers.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
@@ -28,10 +29,6 @@ static_assert(kRangeFirstPosition > 0 &&
static_cast<int>(arraysize(kTestData) - 1),
"invalid range");
-// This function does nothing.
-void DoNothing() {
-}
-
class MockSimpleJob : public URLRequestSimpleJob {
public:
MockSimpleJob(URLRequest* request,
@@ -70,7 +67,7 @@ class MockSimpleJob : public URLRequestSimpleJob {
class CancelURLRequestDelegate : public URLRequest::Delegate {
public:
- explicit CancelURLRequestDelegate()
+ CancelURLRequestDelegate()
: buf_(new IOBuffer(kBufferSize)), run_loop_(new base::RunLoop) {}
void OnResponseStarted(URLRequest* request) override {
@@ -222,8 +219,8 @@ TEST_F(URLRequestSimpleJobTest, CancelAfterFirstRead) {
// Feed a dummy task to the SequencedTaskRunner to make sure that the
// callbacks which are invoked in ReadRawData have completed safely.
base::RunLoop run_loop;
- EXPECT_TRUE(task_runner_->PostTaskAndReply(FROM_HERE, base::Bind(&DoNothing),
- run_loop.QuitClosure()));
+ EXPECT_TRUE(task_runner_->PostTaskAndReply(
+ FROM_HERE, base::Bind(&base::DoNothing), run_loop.QuitClosure()));
run_loop.Run();
}
« no previous file with comments | « net/spdy/spdy_stream_test_util.h ('k') | sandbox/linux/services/scoped_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698