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

Side by Side Diff: chrome/browser/chromeos/policy/remote_commands/device_commands_factory_chromeos.cc

Issue 2257103002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/policy/remote_commands/device_commands_factory _chromeos.h" 5 #include "chrome/browser/chromeos/policy/remote_commands/device_commands_factory _chromeos.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 "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 15 matching lines...) Expand all
26 DeviceCommandsFactoryChromeOS::~DeviceCommandsFactoryChromeOS() { 26 DeviceCommandsFactoryChromeOS::~DeviceCommandsFactoryChromeOS() {
27 } 27 }
28 28
29 std::unique_ptr<RemoteCommandJob> 29 std::unique_ptr<RemoteCommandJob>
30 DeviceCommandsFactoryChromeOS::BuildJobForType(em::RemoteCommand_Type type) { 30 DeviceCommandsFactoryChromeOS::BuildJobForType(em::RemoteCommand_Type type) {
31 switch (type) { 31 switch (type) {
32 case em::RemoteCommand_Type_DEVICE_REBOOT: 32 case em::RemoteCommand_Type_DEVICE_REBOOT:
33 return base::WrapUnique<RemoteCommandJob>(new DeviceCommandRebootJob( 33 return base::WrapUnique<RemoteCommandJob>(new DeviceCommandRebootJob(
34 chromeos::DBusThreadManager::Get()->GetPowerManagerClient())); 34 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()));
35 case em::RemoteCommand_Type_DEVICE_SCREENSHOT: 35 case em::RemoteCommand_Type_DEVICE_SCREENSHOT:
36 return base::WrapUnique<RemoteCommandJob>(new DeviceCommandScreenshotJob( 36 return base::WrapUnique<RemoteCommandJob>(
37 base::WrapUnique(new ScreenshotDelegate( 37 new DeviceCommandScreenshotJob(base::MakeUnique<ScreenshotDelegate>(
38 content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( 38 content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
39 content::BrowserThread::GetBlockingPool() 39 content::BrowserThread::GetBlockingPool()
40 ->GetSequenceToken()))))); 40 ->GetSequenceToken()))));
41 default: 41 default:
42 return nullptr; 42 return nullptr;
43 } 43 }
44 } 44 }
45 45
46 } // namespace policy 46 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698