Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / cloud_print / service / win / local_security_policy.h
bloba0c58a00bab3ad6d6de45d67f055005c87db1bad
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
3 // found in the LICENSE file.
5 #ifndef CLOUD_PRINT_SERVICE_WIN_LOCAL_SECURITY_POLICY_H_
6 #define CLOUD_PRINT_SERVICE_WIN_LOCAL_SECURITY_POLICY_H_
8 #include <wtypes.h> // Has to be before ntsecapi.h
9 #include <ntsecapi.h>
11 #include "base/basictypes.h"
12 #include "base/strings/string16.h"
14 extern const wchar_t kSeServiceLogonRight[];
16 class LocalSecurityPolicy {
17 public:
18 LocalSecurityPolicy();
19 ~LocalSecurityPolicy();
21 bool Open();
22 void Close();
24 bool IsPrivilegeSet(const base::string16& username,
25 const base::string16& privilage) const;
26 bool SetPrivilege(const base::string16& username,
27 const base::string16& privilage);
29 private:
30 LSA_HANDLE policy_;
32 DISALLOW_COPY_AND_ASSIGN(LocalSecurityPolicy);
35 #endif // CLOUD_PRINT_SERVICE_WIN_LOCAL_SECURITY_POLICY_H_