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

Side by Side Diff: rlz/win/lib/process_info.cc

Issue 12092068: Get rid of vista_winnt (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « rlz/rlz.gyp ('k') | rlz/win/lib/vista_winnt.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 // Information about the current process. 5 // Information about the current process.
6 6
7 #include "rlz/win/lib/process_info.h" 7 #include "rlz/win/lib/process_info.h"
8 8
9 #include <windows.h> 9 #include <windows.h>
10 #include <Sddl.h> // For ConvertSidToStringSid. 10 #include <Sddl.h> // For ConvertSidToStringSid.
11 #include <LMCons.h> // For UNLEN 11 #include <LMCons.h> // For UNLEN
12 12
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/process_util.h" 15 #include "base/process_util.h"
16 #include "base/win/scoped_handle.h" 16 #include "base/win/scoped_handle.h"
17 #include "base/win/windows_version.h" 17 #include "base/win/windows_version.h"
18 #include "rlz/lib/assert.h" 18 #include "rlz/lib/assert.h"
19 #include "rlz/win/lib/vista_winnt.h"
20 19
21 namespace { 20 namespace {
22 21
23 HRESULT GetCurrentUser(std::wstring* name, 22 HRESULT GetCurrentUser(std::wstring* name,
24 std::wstring* domain, 23 std::wstring* domain,
25 std::wstring* sid) { 24 std::wstring* sid) {
26 DWORD err; 25 DWORD err;
27 26
28 // Get the current username & domain the hard way. (GetUserNameEx would be 27 // Get the current username & domain the hard way. (GetUserNameEx would be
29 // nice, but unfortunately requires connectivity to a domain controller. 28 // nice, but unfortunately requires connectivity to a domain controller.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 186 }
188 187
189 evaluated = true; 188 evaluated = true;
190 if (!has_rights) 189 if (!has_rights)
191 ASSERT_STRING("ProcessInfo::HasAdminRights: Does not have admin rights."); 190 ASSERT_STRING("ProcessInfo::HasAdminRights: Does not have admin rights.");
192 191
193 return has_rights; 192 return has_rights;
194 } 193 }
195 194
196 }; // namespace 195 }; // namespace
OLDNEW
« no previous file with comments | « rlz/rlz.gyp ('k') | rlz/win/lib/vista_winnt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698