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

Unified Diff: remoting/host/setup/daemon_controller.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
« no previous file with comments | « remoting/host/setup/daemon_controller.h ('k') | remoting/host/setup/daemon_controller_delegate_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/daemon_controller.cc
diff --git a/remoting/host/setup/daemon_controller.cc b/remoting/host/setup/daemon_controller.cc
index f871d43d963bc1b1007742fb72bbcb348abbf092..d8677b74b822121f83e3adbc1f5c9e17022d3986 100644
--- a/remoting/host/setup/daemon_controller.cc
+++ b/remoting/host/setup/daemon_controller.cc
@@ -20,7 +20,7 @@ namespace remoting {
// Name of the Daemon Controller's worker thread.
const char kDaemonControllerThreadName[] = "Daemon Controller thread";
-DaemonController::DaemonController(scoped_ptr<Delegate> delegate)
+DaemonController::DaemonController(std::unique_ptr<Delegate> delegate)
: caller_task_runner_(base::ThreadTaskRunnerHandle::Get()),
delegate_(std::move(delegate)) {
// Launch the delegate thread.
@@ -51,7 +51,7 @@ void DaemonController::GetConfig(const GetConfigCallback& done) {
}
void DaemonController::SetConfigAndStart(
- scoped_ptr<base::DictionaryValue> config,
+ std::unique_ptr<base::DictionaryValue> config,
bool consent,
const CompletionCallback& done) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
@@ -64,8 +64,9 @@ void DaemonController::SetConfigAndStart(
ServiceOrQueueRequest(request);
}
-void DaemonController::UpdateConfig(scoped_ptr<base::DictionaryValue> config,
- const CompletionCallback& done) {
+void DaemonController::UpdateConfig(
+ std::unique_ptr<base::DictionaryValue> config,
+ const CompletionCallback& done) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
DaemonController::CompletionCallback wrapped_done = base::Bind(
@@ -109,13 +110,13 @@ DaemonController::~DaemonController() {
void DaemonController::DoGetConfig(const GetConfigCallback& done) {
DCHECK(delegate_task_runner_->BelongsToCurrentThread());
- scoped_ptr<base::DictionaryValue> config = delegate_->GetConfig();
+ std::unique_ptr<base::DictionaryValue> config = delegate_->GetConfig();
caller_task_runner_->PostTask(FROM_HERE,
base::Bind(done, base::Passed(&config)));
}
void DaemonController::DoSetConfigAndStart(
- scoped_ptr<base::DictionaryValue> config,
+ std::unique_ptr<base::DictionaryValue> config,
bool consent,
const CompletionCallback& done) {
DCHECK(delegate_task_runner_->BelongsToCurrentThread());
@@ -124,7 +125,7 @@ void DaemonController::DoSetConfigAndStart(
}
void DaemonController::DoUpdateConfig(
- scoped_ptr<base::DictionaryValue> config,
+ std::unique_ptr<base::DictionaryValue> config,
const CompletionCallback& done) {
DCHECK(delegate_task_runner_->BelongsToCurrentThread());
@@ -163,7 +164,7 @@ void DaemonController::InvokeCompletionCallbackAndScheduleNext(
void DaemonController::InvokeConfigCallbackAndScheduleNext(
const GetConfigCallback& done,
- scoped_ptr<base::DictionaryValue> config) {
+ std::unique_ptr<base::DictionaryValue> config) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
done.Run(std::move(config));
« no previous file with comments | « remoting/host/setup/daemon_controller.h ('k') | remoting/host/setup/daemon_controller_delegate_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698