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

Unified Diff: chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
index 0fd1cc2f75553a6fe921196fe8550ed850977e8b..a067776be5cc98a8898cccd9b675891368cb3d7d 100644
--- a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
@@ -106,7 +106,7 @@ class TestAutomaticRebootManagerTaskRunner
void OnAfterTimePassed() override;
void OnAfterTaskRun() override;
- scoped_ptr<MockUptimeProvider> uptime_provider_;
+ std::unique_ptr<MockUptimeProvider> uptime_provider_;
DISALLOW_COPY_AND_ASSIGN(TestAutomaticRebootManagerTaskRunner);
};
@@ -186,7 +186,7 @@ class AutomaticRebootManagerBasicTest : public testing::Test {
scoped_refptr<TestAutomaticRebootManagerTaskRunner> task_runner_;
MockAutomaticRebootManagerObserver automatic_reboot_manager_observer_;
- scoped_ptr<AutomaticRebootManager> automatic_reboot_manager_;
+ std::unique_ptr<AutomaticRebootManager> automatic_reboot_manager_;
private:
void VerifyTimerIsStopped(const base::OneShotTimer* timer) const;
@@ -333,14 +333,14 @@ void AutomaticRebootManagerBasicTest::SetUp() {
TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_);
AutomaticRebootManager::RegisterPrefs(local_state_.registry());
- scoped_ptr<DBusThreadManagerSetter> dbus_setter =
+ std::unique_ptr<DBusThreadManagerSetter> dbus_setter =
chromeos::DBusThreadManager::GetSetterForTesting();
power_manager_client_ = new FakePowerManagerClient;
dbus_setter->SetPowerManagerClient(
- scoped_ptr<PowerManagerClient>(power_manager_client_));
+ std::unique_ptr<PowerManagerClient>(power_manager_client_));
update_engine_client_ = new FakeUpdateEngineClient;
dbus_setter->SetUpdateEngineClient(
- scoped_ptr<UpdateEngineClient>(update_engine_client_));
+ std::unique_ptr<UpdateEngineClient>(update_engine_client_));
EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn())
.WillRepeatedly(ReturnPointee(&is_user_logged_in_));
@@ -460,7 +460,7 @@ void AutomaticRebootManagerBasicTest::ExpectNoRebootRequest() {
void AutomaticRebootManagerBasicTest::CreateAutomaticRebootManager(
bool expect_reboot) {
automatic_reboot_manager_.reset(new AutomaticRebootManager(
- scoped_ptr<base::TickClock>(task_runner_->GetMockTickClock())));
+ std::unique_ptr<base::TickClock>(task_runner_->GetMockTickClock())));
automatic_reboot_manager_observer_.Init(automatic_reboot_manager_.get());
task_runner_->RunUntilIdle();
EXPECT_EQ(expect_reboot ? 1 : 0,
« no previous file with comments | « chrome/browser/chromeos/system/automatic_reboot_manager.cc ('k') | chrome/browser/chromeos/system/device_change_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698