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

Side by Side Diff: remoting/host/desktop_process.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 unified diff | Download patch
« no previous file with comments | « remoting/host/desktop_process.h ('k') | remoting/host/desktop_process_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file implements the Windows service controlling Me2Me host processes 5 // This file implements the Windows service controlling Me2Me host processes
6 // running within user sessions. 6 // running within user sessions.
7 7
8 #include "remoting/host/desktop_process.h" 8 #include "remoting/host/desktop_process.h"
9 9
10 #include <utility> 10 #include <utility>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 desktop_agent_->Stop(); 90 desktop_agent_->Stop();
91 desktop_agent_ = nullptr; 91 desktop_agent_ = nullptr;
92 } 92 }
93 93
94 caller_task_runner_ = nullptr; 94 caller_task_runner_ = nullptr;
95 input_task_runner_ = nullptr; 95 input_task_runner_ = nullptr;
96 desktop_environment_factory_.reset(); 96 desktop_environment_factory_.reset();
97 } 97 }
98 98
99 bool DesktopProcess::Start( 99 bool DesktopProcess::Start(
100 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory) { 100 std::unique_ptr<DesktopEnvironmentFactory> desktop_environment_factory) {
101 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 101 DCHECK(caller_task_runner_->BelongsToCurrentThread());
102 DCHECK(!desktop_environment_factory_); 102 DCHECK(!desktop_environment_factory_);
103 DCHECK(desktop_environment_factory); 103 DCHECK(desktop_environment_factory);
104 104
105 desktop_environment_factory_ = std::move(desktop_environment_factory); 105 desktop_environment_factory_ = std::move(desktop_environment_factory);
106 106
107 // Launch the audio capturing thread. 107 // Launch the audio capturing thread.
108 scoped_refptr<AutoThreadTaskRunner> audio_task_runner; 108 scoped_refptr<AutoThreadTaskRunner> audio_task_runner;
109 #if defined(OS_WIN) 109 #if defined(OS_WIN)
110 // On Windows the AudioCapturer requires COM, so we run a single-threaded 110 // On Windows the AudioCapturer requires COM, so we run a single-threaded
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 base::snprintf(message, sizeof(message), 163 base::snprintf(message, sizeof(message),
164 "Requested by %s at %s, line %d.", 164 "Requested by %s at %s, line %d.",
165 function_name.c_str(), file_name.c_str(), line_number); 165 function_name.c_str(), file_name.c_str(), line_number);
166 base::debug::Alias(message); 166 base::debug::Alias(message);
167 167
168 // The daemon requested us to crash the process. 168 // The daemon requested us to crash the process.
169 CHECK(false) << message; 169 CHECK(false) << message;
170 } 170 }
171 171
172 } // namespace remoting 172 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process.h ('k') | remoting/host/desktop_process_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698