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

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

Issue 609923004: Cleanup usage of scoped_ptr<> in remoting for C++11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 "remoting/host/setup/me2me_native_messaging_host_main.h" 5 #include "remoting/host/setup/me2me_native_messaging_host_main.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 return kInitializationFailed; 225 return kInitializationFailed;
226 } 226 }
227 } 227 }
228 228
229 // Initialize the pairing registry delegate and set the root keys. 229 // Initialize the pairing registry delegate and set the root keys.
230 scoped_ptr<PairingRegistryDelegateWin> delegate( 230 scoped_ptr<PairingRegistryDelegateWin> delegate(
231 new PairingRegistryDelegateWin()); 231 new PairingRegistryDelegateWin());
232 if (!delegate->SetRootKeys(privileged.Take(), unprivileged.Take())) 232 if (!delegate->SetRootKeys(privileged.Take(), unprivileged.Take()))
233 return kInitializationFailed; 233 return kInitializationFailed;
234 234
235 pairing_registry = new PairingRegistry( 235 pairing_registry =
236 io_thread.task_runner(), 236 new PairingRegistry(io_thread.task_runner(), delegate.Pass());
237 delegate.PassAs<PairingRegistry::Delegate>());
238 #else // defined(OS_WIN) 237 #else // defined(OS_WIN)
239 pairing_registry = 238 pairing_registry =
240 CreatePairingRegistry(io_thread.task_runner()); 239 CreatePairingRegistry(io_thread.task_runner());
241 #endif // !defined(OS_WIN) 240 #endif // !defined(OS_WIN)
242 241
243 // Set up the native messaging channel. 242 // Set up the native messaging channel.
244 scoped_ptr<extensions::NativeMessagingChannel> channel( 243 scoped_ptr<extensions::NativeMessagingChannel> channel(
245 new PipeMessagingChannel(read_file.Pass(), write_file.Pass())); 244 new PipeMessagingChannel(read_file.Pass(), write_file.Pass()));
246 245
247 // Create the native messaging host. 246 // Create the native messaging host.
(...skipping 16 matching lines...) Expand all
264 // This object instance is required by Chrome code (such as MessageLoop). 263 // This object instance is required by Chrome code (such as MessageLoop).
265 base::AtExitManager exit_manager; 264 base::AtExitManager exit_manager;
266 265
267 base::CommandLine::Init(argc, argv); 266 base::CommandLine::Init(argc, argv);
268 remoting::InitHostLogging(); 267 remoting::InitHostLogging();
269 268
270 return StartMe2MeNativeMessagingHost(); 269 return StartMe2MeNativeMessagingHost();
271 } 270 }
272 271
273 } // namespace remoting 272 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698