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

Side by Side Diff: remoting/host/win/wts_terminal_monitor.cc

Issue 924793003: Cleanup: Convert const char* kFoo to const char kFoo[]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 5 years 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/win/wts_terminal_monitor.h" 5 #include "remoting/host/win/wts_terminal_monitor.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <wtsapi32.h> 8 #include <wtsapi32.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 // Session id that does not represent any session. 16 // Session id that does not represent any session.
17 const uint32 kInvalidSessionId = 0xffffffffu; 17 const uint32 kInvalidSessionId = 0xffffffffu;
18 18
19 const char* WtsTerminalMonitor::kConsole = "console"; 19 const char WtsTerminalMonitor::kConsole[] = "console";
20 20
21 WtsTerminalMonitor::~WtsTerminalMonitor() { 21 WtsTerminalMonitor::~WtsTerminalMonitor() {
22 } 22 }
23 23
24 // static 24 // static
25 bool WtsTerminalMonitor::LookupTerminalId(uint32 session_id, 25 bool WtsTerminalMonitor::LookupTerminalId(uint32 session_id,
26 std::string* terminal_id) { 26 std::string* terminal_id) {
27 // Fast path for the case when |session_id| is currently attached to 27 // Fast path for the case when |session_id| is currently attached to
28 // the physical console. 28 // the physical console.
29 if (session_id == WTSGetActiveConsoleSessionId()) { 29 if (session_id == WTSGetActiveConsoleSessionId()) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // |terminal_id| is not associated with any session. 77 // |terminal_id| is not associated with any session.
78 WTSFreeMemory(session_info); 78 WTSFreeMemory(session_info);
79 return kInvalidSessionId; 79 return kInvalidSessionId;
80 } 80 }
81 81
82 WtsTerminalMonitor::WtsTerminalMonitor() { 82 WtsTerminalMonitor::WtsTerminalMonitor() {
83 } 83 }
84 84
85 } // namespace remoting 85 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/wts_terminal_monitor.h ('k') | sandbox/linux/suid/common/suid_unsafe_environment_variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698