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

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: include <utility> Created 4 years, 12 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 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 HostConfigFromJsonFile(config_path)); 54 HostConfigFromJsonFile(config_path));
55 if (!host_config) 55 if (!host_config)
56 return nullptr; 56 return nullptr;
57 57
58 scoped_ptr<base::DictionaryValue> config(new base::DictionaryValue); 58 scoped_ptr<base::DictionaryValue> config(new base::DictionaryValue);
59 std::string value; 59 std::string value;
60 if (host_config->GetString(kHostIdConfigPath, &value)) 60 if (host_config->GetString(kHostIdConfigPath, &value))
61 config->SetString(kHostIdConfigPath, value); 61 config->SetString(kHostIdConfigPath, value);
62 if (host_config->GetString(kXmppLoginConfigPath, &value)) 62 if (host_config->GetString(kXmppLoginConfigPath, &value))
63 config->SetString(kXmppLoginConfigPath, value); 63 config->SetString(kXmppLoginConfigPath, value);
64 return config.Pass(); 64 return config;
65 } 65 }
66 66
67 void DaemonControllerDelegateMac::SetConfigAndStart( 67 void DaemonControllerDelegateMac::SetConfigAndStart(
68 scoped_ptr<base::DictionaryValue> config, 68 scoped_ptr<base::DictionaryValue> config,
69 bool consent, 69 bool consent,
70 const DaemonController::CompletionCallback& done) { 70 const DaemonController::CompletionCallback& done) {
71 config->SetBoolean(kUsageStatsConsentConfigPath, consent); 71 config->SetBoolean(kUsageStatsConsentConfigPath, consent);
72 ShowPreferencePane(HostConfigToJson(*config), done); 72 ShowPreferencePane(HostConfigToJson(*config), done);
73 } 73 }
74 74
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 reinterpret_cast<DaemonControllerDelegateMac*>(observer); 242 reinterpret_cast<DaemonControllerDelegateMac*>(observer);
243 if (!self) { 243 if (!self) {
244 LOG(WARNING) << "Ignoring notification with nullptr observer: " << name; 244 LOG(WARNING) << "Ignoring notification with nullptr observer: " << name;
245 return; 245 return;
246 } 246 }
247 247
248 self->PreferencePaneCallbackDelegate(name); 248 self->PreferencePaneCallbackDelegate(name);
249 } 249 }
250 250
251 scoped_refptr<DaemonController> DaemonController::Create() { 251 scoped_refptr<DaemonController> DaemonController::Create() {
252 scoped_ptr<DaemonController::Delegate> delegate( 252 return new DaemonController(
253 new DaemonControllerDelegateMac()); 253 make_scoped_ptr(new DaemonControllerDelegateMac()));
254 return new DaemonController(delegate.Pass());
255 } 254 }
256 255
257 } // namespace remoting 256 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/daemon_controller_delegate_linux.cc ('k') | remoting/host/setup/daemon_controller_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698