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

Side by Side Diff: remoting/host/setup/daemon_controller_delegate_mac.mm

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: Created 5 years 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 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 <CoreFoundation/CoreFoundation.h> 5 #include <CoreFoundation/CoreFoundation.h>
6 6
7 #include "remoting/host/setup/daemon_controller_delegate_mac.h" 7 #include "remoting/host/setup/daemon_controller_delegate_mac.h"
8 8
9 #include <launch.h> 9 #include <launch.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 HostConfigFromJsonFile(config_path)); 55 HostConfigFromJsonFile(config_path));
56 if (!host_config) 56 if (!host_config)
57 return nullptr; 57 return nullptr;
58 58
59 scoped_ptr<base::DictionaryValue> config(new base::DictionaryValue); 59 scoped_ptr<base::DictionaryValue> config(new base::DictionaryValue);
60 std::string value; 60 std::string value;
61 if (host_config->GetString(kHostIdConfigPath, &value)) 61 if (host_config->GetString(kHostIdConfigPath, &value))
62 config->SetString(kHostIdConfigPath, value); 62 config->SetString(kHostIdConfigPath, value);
63 if (host_config->GetString(kXmppLoginConfigPath, &value)) 63 if (host_config->GetString(kXmppLoginConfigPath, &value))
64 config->SetString(kXmppLoginConfigPath, value); 64 config->SetString(kXmppLoginConfigPath, value);
65 return config.Pass(); 65 return config;
66 } 66 }
67 67
68 void DaemonControllerDelegateMac::SetConfigAndStart( 68 void DaemonControllerDelegateMac::SetConfigAndStart(
69 scoped_ptr<base::DictionaryValue> config, 69 scoped_ptr<base::DictionaryValue> config,
70 bool consent, 70 bool consent,
71 const DaemonController::CompletionCallback& done) { 71 const DaemonController::CompletionCallback& done) {
72 config->SetBoolean(kUsageStatsConsentConfigPath, consent); 72 config->SetBoolean(kUsageStatsConsentConfigPath, consent);
73 ShowPreferencePane(HostConfigToJson(*config), done); 73 ShowPreferencePane(HostConfigToJson(*config), done);
74 } 74 }
75 75
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 reinterpret_cast<DaemonControllerDelegateMac*>(observer); 243 reinterpret_cast<DaemonControllerDelegateMac*>(observer);
244 if (!self) { 244 if (!self) {
245 LOG(WARNING) << "Ignoring notification with nullptr observer: " << name; 245 LOG(WARNING) << "Ignoring notification with nullptr observer: " << name;
246 return; 246 return;
247 } 247 }
248 248
249 self->PreferencePaneCallbackDelegate(name); 249 self->PreferencePaneCallbackDelegate(name);
250 } 250 }
251 251
252 scoped_refptr<DaemonController> DaemonController::Create() { 252 scoped_refptr<DaemonController> DaemonController::Create() {
253 scoped_ptr<DaemonController::Delegate> delegate( 253 return new DaemonController(
254 new DaemonControllerDelegateMac()); 254 make_scoped_ptr(new DaemonControllerDelegateMac()));
255 return new DaemonController(delegate.Pass());
256 } 255 }
257 256
258 } // namespace remoting 257 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698