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

Unified Diff: remoting/host/setup/daemon_controller_delegate_linux.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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: remoting/host/setup/daemon_controller_delegate_linux.cc
diff --git a/remoting/host/setup/daemon_controller_delegate_linux.cc b/remoting/host/setup/daemon_controller_delegate_linux.cc
index f8096cae1d7af8a7ec86e43ac9de9b77f03c1cf8..c37bd5b99b0d14be3641f33f5d0af0e0e62afd11 100644
--- a/remoting/host/setup/daemon_controller_delegate_linux.cc
+++ b/remoting/host/setup/daemon_controller_delegate_linux.cc
@@ -16,6 +16,7 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/md5.h"
+#include "base/memory/ptr_util.h"
#include "base/path_service.h"
#include "base/process/launch.h"
#include "base/process/process.h"
@@ -125,13 +126,14 @@ DaemonController::State DaemonControllerDelegateLinux::GetState() {
}
}
-scoped_ptr<base::DictionaryValue> DaemonControllerDelegateLinux::GetConfig() {
- scoped_ptr<base::DictionaryValue> config(
+std::unique_ptr<base::DictionaryValue>
+DaemonControllerDelegateLinux::GetConfig() {
+ std::unique_ptr<base::DictionaryValue> config(
HostConfigFromJsonFile(GetConfigPath()));
if (!config)
return nullptr;
- scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
std::string value;
if (config->GetString(kHostIdConfigPath, &value)) {
result->SetString(kHostIdConfigPath, value);
@@ -143,7 +145,7 @@ scoped_ptr<base::DictionaryValue> DaemonControllerDelegateLinux::GetConfig() {
}
void DaemonControllerDelegateLinux::SetConfigAndStart(
- scoped_ptr<base::DictionaryValue> config,
+ std::unique_ptr<base::DictionaryValue> config,
bool consent,
const DaemonController::CompletionCallback& done) {
// Add the user to chrome-remote-desktop group first.
@@ -185,9 +187,9 @@ void DaemonControllerDelegateLinux::SetConfigAndStart(
}
void DaemonControllerDelegateLinux::UpdateConfig(
- scoped_ptr<base::DictionaryValue> config,
+ std::unique_ptr<base::DictionaryValue> config,
const DaemonController::CompletionCallback& done) {
- scoped_ptr<base::DictionaryValue> new_config(
+ std::unique_ptr<base::DictionaryValue> new_config(
HostConfigFromJsonFile(GetConfigPath()));
if (new_config)
new_config->MergeDictionary(config.get());
@@ -230,7 +232,7 @@ DaemonControllerDelegateLinux::GetUsageStatsConsent() {
scoped_refptr<DaemonController> DaemonController::Create() {
return new DaemonController(
- make_scoped_ptr(new DaemonControllerDelegateLinux()));
+ base::WrapUnique(new DaemonControllerDelegateLinux()));
}
} // namespace remoting
« no previous file with comments | « remoting/host/setup/daemon_controller_delegate_linux.h ('k') | remoting/host/setup/daemon_controller_delegate_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698