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

Side by Side Diff: remoting/host/ipc_desktop_environment.cc

Issue 2253233004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ipc_desktop_environment.h" 5 #include "remoting/host/ipc_desktop_environment.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 io_task_runner_(io_task_runner), 87 io_task_runner_(io_task_runner),
88 daemon_channel_(daemon_channel), 88 daemon_channel_(daemon_channel),
89 connector_factory_(this) {} 89 connector_factory_(this) {}
90 90
91 IpcDesktopEnvironmentFactory::~IpcDesktopEnvironmentFactory() {} 91 IpcDesktopEnvironmentFactory::~IpcDesktopEnvironmentFactory() {}
92 92
93 std::unique_ptr<DesktopEnvironment> IpcDesktopEnvironmentFactory::Create( 93 std::unique_ptr<DesktopEnvironment> IpcDesktopEnvironmentFactory::Create(
94 base::WeakPtr<ClientSessionControl> client_session_control) { 94 base::WeakPtr<ClientSessionControl> client_session_control) {
95 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 95 DCHECK(caller_task_runner_->BelongsToCurrentThread());
96 96
97 return base::WrapUnique(new IpcDesktopEnvironment( 97 return base::MakeUnique<IpcDesktopEnvironment>(
98 audio_task_runner_, caller_task_runner_, io_task_runner_, 98 audio_task_runner_, caller_task_runner_, io_task_runner_,
99 client_session_control, connector_factory_.GetWeakPtr(), curtain_enabled_, 99 client_session_control, connector_factory_.GetWeakPtr(), curtain_enabled_,
100 supports_touch_events_)); 100 supports_touch_events_);
101 } 101 }
102 102
103 void IpcDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) { 103 void IpcDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {
104 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 104 DCHECK(caller_task_runner_->BelongsToCurrentThread());
105 105
106 curtain_enabled_ = enable; 106 curtain_enabled_ = enable;
107 } 107 }
108 108
109 bool IpcDesktopEnvironmentFactory::SupportsAudioCapture() const { 109 bool IpcDesktopEnvironmentFactory::SupportsAudioCapture() const {
110 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 110 DCHECK(caller_task_runner_->BelongsToCurrentThread());
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (i != active_connections_.end()) { 202 if (i != active_connections_.end()) {
203 DesktopSessionProxy* desktop_session_proxy = i->second; 203 DesktopSessionProxy* desktop_session_proxy = i->second;
204 active_connections_.erase(i); 204 active_connections_.erase(i);
205 205
206 // Disconnect the client session. 206 // Disconnect the client session.
207 desktop_session_proxy->DisconnectSession(protocol::OK); 207 desktop_session_proxy->DisconnectSession(protocol::OK);
208 } 208 }
209 } 209 }
210 210
211 } // namespace remoting 211 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/fake_host_extension.cc ('k') | remoting/host/mouse_cursor_monitor_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698