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

Side by Side Diff: remoting/host/curtain_mode_win.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/curtain_mode_mac.cc ('k') | remoting/host/daemon_process.h » ('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 #include "remoting/host/curtain_mode.h" 5 #include "remoting/host/curtain_mode.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h"
9 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
10 #include "base/win/windows_version.h" 11 #include "base/win/windows_version.h"
11 #include "remoting/host/client_session_control.h" 12 #include "remoting/host/client_session_control.h"
12 13
13 namespace remoting { 14 namespace remoting {
14 15
15 class CurtainModeWin : public CurtainMode { 16 class CurtainModeWin : public CurtainMode {
16 public: 17 public:
17 CurtainModeWin(); 18 CurtainModeWin();
18 19
(...skipping 18 matching lines...) Expand all
37 PLOG(ERROR) << "Failed to map the current PID to session ID"; 38 PLOG(ERROR) << "Failed to map the current PID to session ID";
38 return false; 39 return false;
39 } 40 }
40 41
41 // The current session is curtained if it is not attached to the local 42 // The current session is curtained if it is not attached to the local
42 // console. 43 // console.
43 return WTSGetActiveConsoleSessionId() != session_id; 44 return WTSGetActiveConsoleSessionId() != session_id;
44 } 45 }
45 46
46 // static 47 // static
47 scoped_ptr<CurtainMode> CurtainMode::Create( 48 std::unique_ptr<CurtainMode> CurtainMode::Create(
48 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 49 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
49 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 50 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
50 base::WeakPtr<ClientSessionControl> client_session_control) { 51 base::WeakPtr<ClientSessionControl> client_session_control) {
51 // |client_session_control| is not used because the client session is 52 // |client_session_control| is not used because the client session is
52 // disconnected as soon as the session is re-attached to the local console. 53 // disconnected as soon as the session is re-attached to the local console.
53 // See RdpDesktopSession for more details. 54 // See RdpDesktopSession for more details.
54 return make_scoped_ptr(new CurtainModeWin()); 55 return base::WrapUnique(new CurtainModeWin());
55 } 56 }
56 57
57 } // namespace remoting 58 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/curtain_mode_mac.cc ('k') | remoting/host/daemon_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698