Index: remoting/host/setup/daemon_controller_delegate_mac.mm |
diff --git a/remoting/host/setup/daemon_controller_delegate_mac.mm b/remoting/host/setup/daemon_controller_delegate_mac.mm |
index 4363a405d7cf2219c9663b6de2255f6aec5ab843..c8386ead79b682f67c8ad5e4b43f3651edddcbb3 100644 |
--- a/remoting/host/setup/daemon_controller_delegate_mac.mm |
+++ b/remoting/host/setup/daemon_controller_delegate_mac.mm |
@@ -2,10 +2,9 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include <CoreFoundation/CoreFoundation.h> |
- |
#include "remoting/host/setup/daemon_controller_delegate_mac.h" |
+#include <CoreFoundation/CoreFoundation.h> |
#include <launch.h> |
#include <stdio.h> |
#include <sys/types.h> |
@@ -21,6 +20,7 @@ |
#include "base/mac/mac_logging.h" |
#include "base/mac/mac_util.h" |
#include "base/mac/scoped_launch_data.h" |
+#include "base/memory/ptr_util.h" |
#include "base/time/time.h" |
#include "base/values.h" |
#include "remoting/host/constants_mac.h" |
@@ -48,14 +48,15 @@ DaemonController::State DaemonControllerDelegateMac::GetState() { |
} |
} |
-scoped_ptr<base::DictionaryValue> DaemonControllerDelegateMac::GetConfig() { |
+std::unique_ptr<base::DictionaryValue> |
+DaemonControllerDelegateMac::GetConfig() { |
base::FilePath config_path(kHostConfigFilePath); |
- scoped_ptr<base::DictionaryValue> host_config( |
+ std::unique_ptr<base::DictionaryValue> host_config( |
HostConfigFromJsonFile(config_path)); |
if (!host_config) |
return nullptr; |
- scoped_ptr<base::DictionaryValue> config(new base::DictionaryValue); |
+ std::unique_ptr<base::DictionaryValue> config(new base::DictionaryValue); |
std::string value; |
if (host_config->GetString(kHostIdConfigPath, &value)) |
config->SetString(kHostIdConfigPath, value); |
@@ -65,7 +66,7 @@ scoped_ptr<base::DictionaryValue> DaemonControllerDelegateMac::GetConfig() { |
} |
void DaemonControllerDelegateMac::SetConfigAndStart( |
- scoped_ptr<base::DictionaryValue> config, |
+ std::unique_ptr<base::DictionaryValue> config, |
bool consent, |
const DaemonController::CompletionCallback& done) { |
config->SetBoolean(kUsageStatsConsentConfigPath, consent); |
@@ -73,10 +74,10 @@ void DaemonControllerDelegateMac::SetConfigAndStart( |
} |
void DaemonControllerDelegateMac::UpdateConfig( |
- scoped_ptr<base::DictionaryValue> config, |
+ std::unique_ptr<base::DictionaryValue> config, |
const DaemonController::CompletionCallback& done) { |
base::FilePath config_file_path(kHostConfigFilePath); |
- scoped_ptr<base::DictionaryValue> host_config( |
+ std::unique_ptr<base::DictionaryValue> host_config( |
HostConfigFromJsonFile(config_file_path)); |
if (!host_config) { |
done.Run(DaemonController::RESULT_FAILED); |
@@ -101,7 +102,7 @@ DaemonControllerDelegateMac::GetUsageStatsConsent() { |
consent.set_by_policy = false; |
base::FilePath config_file_path(kHostConfigFilePath); |
- scoped_ptr<base::DictionaryValue> host_config( |
+ std::unique_ptr<base::DictionaryValue> host_config( |
HostConfigFromJsonFile(config_file_path)); |
if (host_config) { |
host_config->GetBoolean(kUsageStatsConsentConfigPath, &consent.allowed); |
@@ -250,7 +251,7 @@ void DaemonControllerDelegateMac::PreferencePaneCallback( |
scoped_refptr<DaemonController> DaemonController::Create() { |
return new DaemonController( |
- make_scoped_ptr(new DaemonControllerDelegateMac())); |
+ base::WrapUnique(new DaemonControllerDelegateMac())); |
} |
} // namespace remoting |