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

Side by Side Diff: remoting/host/setup/me2me_native_messaging_host_unittest.cc

Issue 2253233004: 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, 4 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
« no previous file with comments | « remoting/host/setup/host_starter.cc ('k') | remoting/host/token_validator_factory_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "remoting/host/setup/me2me_native_messaging_host.h" 5 #include "remoting/host/setup/me2me_native_messaging_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstdint> 9 #include <cstdint>
10 #include <memory> 10 #include <memory>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 MockDaemonControllerDelegate::MockDaemonControllerDelegate() {} 191 MockDaemonControllerDelegate::MockDaemonControllerDelegate() {}
192 192
193 MockDaemonControllerDelegate::~MockDaemonControllerDelegate() {} 193 MockDaemonControllerDelegate::~MockDaemonControllerDelegate() {}
194 194
195 DaemonController::State MockDaemonControllerDelegate::GetState() { 195 DaemonController::State MockDaemonControllerDelegate::GetState() {
196 return DaemonController::STATE_STARTED; 196 return DaemonController::STATE_STARTED;
197 } 197 }
198 198
199 std::unique_ptr<base::DictionaryValue> 199 std::unique_ptr<base::DictionaryValue>
200 MockDaemonControllerDelegate::GetConfig() { 200 MockDaemonControllerDelegate::GetConfig() {
201 return base::WrapUnique(new base::DictionaryValue()); 201 return base::MakeUnique<base::DictionaryValue>();
202 } 202 }
203 203
204 void MockDaemonControllerDelegate::SetConfigAndStart( 204 void MockDaemonControllerDelegate::SetConfigAndStart(
205 std::unique_ptr<base::DictionaryValue> config, 205 std::unique_ptr<base::DictionaryValue> config,
206 bool consent, 206 bool consent,
207 const DaemonController::CompletionCallback& done) { 207 const DaemonController::CompletionCallback& done) {
208 // Verify parameters passed in. 208 // Verify parameters passed in.
209 if (consent && config && config->HasKey("start")) { 209 if (consent && config && config->HasKey("start")) {
210 done.Run(DaemonController::RESULT_OK); 210 done.Run(DaemonController::RESULT_OK);
211 } else { 211 } else {
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 } 643 }
644 644
645 // Verify rejection if getCredentialsFromAuthCode has no auth code. 645 // Verify rejection if getCredentialsFromAuthCode has no auth code.
646 TEST_F(Me2MeNativeMessagingHostTest, GetCredentialsFromAuthCodeNoAuthCode) { 646 TEST_F(Me2MeNativeMessagingHostTest, GetCredentialsFromAuthCodeNoAuthCode) {
647 base::DictionaryValue message; 647 base::DictionaryValue message;
648 message.SetString("type", "getCredentialsFromAuthCode"); 648 message.SetString("type", "getCredentialsFromAuthCode");
649 TestBadRequest(message); 649 TestBadRequest(message);
650 } 650 }
651 651
652 } // namespace remoting 652 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/host_starter.cc ('k') | remoting/host/token_validator_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698