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

Unified Diff: chrome/browser/chromeos/policy/remote_commands/device_commands_factory_chromeos.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/remote_commands/device_commands_factory_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/remote_commands/device_commands_factory_chromeos.cc b/chrome/browser/chromeos/policy/remote_commands/device_commands_factory_chromeos.cc
index ae77c1676bafd4d67cc7b880051bf8085f406a00..094254a044e1f16b36ae3e5921d5e69914fb0aa6 100644
--- a/chrome/browser/chromeos/policy/remote_commands/device_commands_factory_chromeos.cc
+++ b/chrome/browser/chromeos/policy/remote_commands/device_commands_factory_chromeos.cc
@@ -4,7 +4,9 @@
#include "chrome/browser/chromeos/policy/remote_commands/device_commands_factory_chromeos.h"
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.h"
#include "chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h"
@@ -24,15 +26,15 @@ DeviceCommandsFactoryChromeOS::DeviceCommandsFactoryChromeOS() {
DeviceCommandsFactoryChromeOS::~DeviceCommandsFactoryChromeOS() {
}
-scoped_ptr<RemoteCommandJob> DeviceCommandsFactoryChromeOS::BuildJobForType(
- em::RemoteCommand_Type type) {
+std::unique_ptr<RemoteCommandJob>
+DeviceCommandsFactoryChromeOS::BuildJobForType(em::RemoteCommand_Type type) {
switch (type) {
case em::RemoteCommand_Type_DEVICE_REBOOT:
- return make_scoped_ptr<RemoteCommandJob>(new DeviceCommandRebootJob(
+ return base::WrapUnique<RemoteCommandJob>(new DeviceCommandRebootJob(
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()));
case em::RemoteCommand_Type_DEVICE_SCREENSHOT:
- return make_scoped_ptr<RemoteCommandJob>(
- new DeviceCommandScreenshotJob(make_scoped_ptr(new ScreenshotDelegate(
+ return base::WrapUnique<RemoteCommandJob>(new DeviceCommandScreenshotJob(
+ base::WrapUnique(new ScreenshotDelegate(
content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
content::BrowserThread::GetBlockingPool()
->GetSequenceToken())))));

Powered by Google App Engine
This is Rietveld 408576698