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

Side by Side Diff: cloud_print/service/win/local_security_policy.cc

Issue 1540213002: Switch to standard integer types in cloud_print/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 "cloud_print/service/win/local_security_policy.h" 5 #include "cloud_print/service/win/local_security_policy.h"
6 6
7 #include <atlsecurity.h> 7 #include <atlsecurity.h>
8 #include <ntsecapi.h> 8 #include <ntsecapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #include <stddef.h>
10 11
11 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/macros.h"
12 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
13 15
14 const wchar_t kSeServiceLogonRight[] = L"SeServiceLogonRight"; 16 const wchar_t kSeServiceLogonRight[] = L"SeServiceLogonRight";
15 17
16 #ifndef STATUS_SUCCESS 18 #ifndef STATUS_SUCCESS
17 #define STATUS_SUCCESS ((NTSTATUS)0x00000000L) 19 #define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
18 #endif 20 #endif
19 21
20 namespace { 22 namespace {
21 23
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 privilege_string.Buffer = &privilage_copy[0]; 113 privilege_string.Buffer = &privilage_copy[0];
112 privilege_string.Length = static_cast<USHORT>( 114 privilege_string.Length = static_cast<USHORT>(
113 wcslen(privilege_string.Buffer) * sizeof(privilege_string.Buffer[0])); 115 wcslen(privilege_string.Buffer) * sizeof(privilege_string.Buffer[0]));
114 privilege_string.MaximumLength = privilege_string.Length + 116 privilege_string.MaximumLength = privilege_string.Length +
115 sizeof(privilege_string.Buffer[0]); 117 sizeof(privilege_string.Buffer[0]);
116 return STATUS_SUCCESS == 118 return STATUS_SUCCESS ==
117 ::LsaAddAccountRights(policy_, const_cast<SID*>(user_sid.GetPSID()), 119 ::LsaAddAccountRights(policy_, const_cast<SID*>(user_sid.GetPSID()),
118 &privilege_string, 1); 120 &privilege_string, 1);
119 } 121 }
120 122
OLDNEW
« no previous file with comments | « cloud_print/service/win/local_security_policy.h ('k') | cloud_print/service/win/service_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698