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

Unified Diff: remoting/host/gcd_state_updater_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 | « remoting/host/gcd_state_updater.cc ('k') | remoting/host/heartbeat_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/gcd_state_updater_unittest.cc
diff --git a/remoting/host/gcd_state_updater_unittest.cc b/remoting/host/gcd_state_updater_unittest.cc
index 249634165ae2a358b8b2316cf2a7c38b5aded257..fc50f39104f43f699f799ac62fb6bcee729c671c 100644
--- a/remoting/host/gcd_state_updater_unittest.cc
+++ b/remoting/host/gcd_state_updater_unittest.cc
@@ -8,6 +8,7 @@
#include <utility>
#include <vector>
+#include "base/memory/ptr_util.h"
#include "base/strings/stringize_macros.h"
#include "base/test/simple_test_clock.h"
#include "base/test/test_mock_time_task_runner.h"
@@ -40,7 +41,7 @@ class GcdStateUpdaterTest : public testing::Test {
nullptr,
&token_getter_)),
signal_strategy_("local_jid") {
- rest_client_->SetClockForTest(make_scoped_ptr(new base::SimpleTestClock));
+ rest_client_->SetClockForTest(base::WrapUnique(new base::SimpleTestClock));
}
void OnSuccess() { on_success_count_++; }
@@ -50,17 +51,17 @@ class GcdStateUpdaterTest : public testing::Test {
protected:
scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
base::ThreadTaskRunnerHandle runner_handler_;
- scoped_ptr<base::Clock> clock_;
+ std::unique_ptr<base::Clock> clock_;
net::TestURLFetcherFactory url_fetcher_factory_;
FakeOAuthTokenGetter token_getter_;
- scoped_ptr<GcdRestClient> rest_client_;
+ std::unique_ptr<GcdRestClient> rest_client_;
FakeSignalStrategy signal_strategy_;
int on_success_count_ = 0;
int on_host_id_error_count_ = 0;
};
TEST_F(GcdStateUpdaterTest, Success) {
- scoped_ptr<GcdStateUpdater> updater(new GcdStateUpdater(
+ std::unique_ptr<GcdStateUpdater> updater(new GcdStateUpdater(
base::Bind(&GcdStateUpdaterTest::OnSuccess, base::Unretained(this)),
base::Bind(&GcdStateUpdaterTest::OnHostIdError, base::Unretained(this)),
&signal_strategy_, std::move(rest_client_)));
@@ -84,7 +85,7 @@ TEST_F(GcdStateUpdaterTest, Success) {
}
TEST_F(GcdStateUpdaterTest, QueuedRequests) {
- scoped_ptr<GcdStateUpdater> updater(new GcdStateUpdater(
+ std::unique_ptr<GcdStateUpdater> updater(new GcdStateUpdater(
base::Bind(&GcdStateUpdaterTest::OnSuccess, base::Unretained(this)),
base::Bind(&GcdStateUpdaterTest::OnHostIdError, base::Unretained(this)),
&signal_strategy_, std::move(rest_client_)));
@@ -128,7 +129,7 @@ TEST_F(GcdStateUpdaterTest, QueuedRequests) {
}
TEST_F(GcdStateUpdaterTest, Retry) {
- scoped_ptr<GcdStateUpdater> updater(new GcdStateUpdater(
+ std::unique_ptr<GcdStateUpdater> updater(new GcdStateUpdater(
base::Bind(&GcdStateUpdaterTest::OnSuccess, base::Unretained(this)),
base::Bind(&GcdStateUpdaterTest::OnHostIdError, base::Unretained(this)),
&signal_strategy_, std::move(rest_client_)));
@@ -153,7 +154,7 @@ TEST_F(GcdStateUpdaterTest, Retry) {
}
TEST_F(GcdStateUpdaterTest, UnknownHost) {
- scoped_ptr<GcdStateUpdater> updater(new GcdStateUpdater(
+ std::unique_ptr<GcdStateUpdater> updater(new GcdStateUpdater(
base::Bind(&GcdStateUpdaterTest::OnSuccess, base::Unretained(this)),
base::Bind(&GcdStateUpdaterTest::OnHostIdError, base::Unretained(this)),
&signal_strategy_, std::move(rest_client_)));
« no previous file with comments | « remoting/host/gcd_state_updater.cc ('k') | remoting/host/heartbeat_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698