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

Side by Side Diff: remoting/host/setup/daemon_controller.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "remoting/host/setup/daemon_controller.h" 5 #include "remoting/host/setup/daemon_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 base::Closure request = base::Bind( 121 base::Closure request = base::Bind(
122 &DaemonController::DoGetUsageStatsConsent, this, wrapped_done); 122 &DaemonController::DoGetUsageStatsConsent, this, wrapped_done);
123 ServiceOrQueueRequest(request); 123 ServiceOrQueueRequest(request);
124 } 124 }
125 125
126 DaemonController::~DaemonController() { 126 DaemonController::~DaemonController() {
127 // Make sure |delegate_| is deleted on the background thread. 127 // Make sure |delegate_| is deleted on the background thread.
128 delegate_task_runner_->DeleteSoon(FROM_HERE, delegate_.release()); 128 delegate_task_runner_->DeleteSoon(FROM_HERE, delegate_.release());
129 129
130 // Stop the thread. 130 // Stop the thread.
131 delegate_task_runner_ = NULL; 131 delegate_task_runner_ = nullptr;
132 caller_task_runner_->DeleteSoon(FROM_HERE, delegate_thread_.release()); 132 caller_task_runner_->DeleteSoon(FROM_HERE, delegate_thread_.release());
133 } 133 }
134 134
135 void DaemonController::DoGetConfig(const GetConfigCallback& done) { 135 void DaemonController::DoGetConfig(const GetConfigCallback& done) {
136 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); 136 DCHECK(delegate_task_runner_->BelongsToCurrentThread());
137 137
138 scoped_ptr<base::DictionaryValue> config = delegate_->GetConfig(); 138 scoped_ptr<base::DictionaryValue> config = delegate_->GetConfig();
139 caller_task_runner_->PostTask(FROM_HERE, 139 caller_task_runner_->PostTask(FROM_HERE,
140 base::Bind(done, base::Passed(&config))); 140 base::Bind(done, base::Passed(&config)));
141 } 141 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (!servicing_request) 248 if (!servicing_request)
249 ServiceNextRequest(); 249 ServiceNextRequest();
250 } 250 }
251 251
252 void DaemonController::ServiceNextRequest() { 252 void DaemonController::ServiceNextRequest() {
253 if (!pending_requests_.empty()) 253 if (!pending_requests_.empty())
254 delegate_task_runner_->PostTask(FROM_HERE, pending_requests_.front()); 254 delegate_task_runner_->PostTask(FROM_HERE, pending_requests_.front());
255 } 255 }
256 256
257 } // namespace remoting 257 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/daemon_controller.h ('k') | remoting/host/setup/daemon_controller_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698