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

Side by Side Diff: chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler_unittest.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler .h" 5 #include "chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler .h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "chrome/browser/signin/easy_unlock_service.h" 10 #include "chrome/browser/signin/easy_unlock_service.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 class TestEasyUnlockSettingsHandler : public EasyUnlockSettingsHandler { 89 class TestEasyUnlockSettingsHandler : public EasyUnlockSettingsHandler {
90 public: 90 public:
91 explicit TestEasyUnlockSettingsHandler(Profile* profile) 91 explicit TestEasyUnlockSettingsHandler(Profile* profile)
92 : EasyUnlockSettingsHandler(profile) {} 92 : EasyUnlockSettingsHandler(profile) {}
93 93
94 using EasyUnlockSettingsHandler::set_web_ui; 94 using EasyUnlockSettingsHandler::set_web_ui;
95 }; 95 };
96 96
97 std::unique_ptr<KeyedService> CreateEasyUnlockServiceForTest( 97 std::unique_ptr<KeyedService> CreateEasyUnlockServiceForTest(
98 content::BrowserContext* context) { 98 content::BrowserContext* context) {
99 return base::WrapUnique( 99 return base::MakeUnique<FakeEasyUnlockService>(
100 new FakeEasyUnlockService(Profile::FromBrowserContext(context))); 100 Profile::FromBrowserContext(context));
101 } 101 }
102 102
103 } // namespace 103 } // namespace
104 104
105 class EasyUnlockSettingsHandlerTest : public testing::Test { 105 class EasyUnlockSettingsHandlerTest : public testing::Test {
106 public: 106 public:
107 EasyUnlockSettingsHandlerTest() {} 107 EasyUnlockSettingsHandlerTest() {}
108 108
109 void SetUp() override { 109 void SetUp() override {
110 TestingProfile::Builder builder; 110 TestingProfile::Builder builder;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 base::ListValue list_args4; 256 base::ListValue list_args4;
257 list_args4.Append(new base::StringValue("test-callback-id-4")); 257 list_args4.Append(new base::StringValue("test-callback-id-4"));
258 handler->HandleGetTurnOffFlowStatus(&list_args4); 258 handler->HandleGetTurnOffFlowStatus(&list_args4);
259 VerifyTurnOffFlowStatusWebUIResponse(7U, "test-callback-id-4", 259 VerifyTurnOffFlowStatusWebUIResponse(7U, "test-callback-id-4",
260 "server-error"); 260 "server-error");
261 } 261 }
262 262
263 } // namespace settings 263 } // namespace settings
264 } // namespace chromeos 264 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698