summaryrefslogtreecommitdiffstats
path: root/rlz/win/lib/process_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'rlz/win/lib/process_info.h')
-rw-r--r--rlz/win/lib/process_info.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/rlz/win/lib/process_info.h b/rlz/win/lib/process_info.h
new file mode 100644
index 0000000..84bd604
--- /dev/null
+++ b/rlz/win/lib/process_info.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Information about the current process.
+
+#ifndef RLZ_WIN_LIB_PROCESS_INFO_H_
+#define RLZ_WIN_LIB_PROCESS_INFO_H_
+
+#include "base/basictypes.h"
+
+namespace rlz_lib {
+
+class ProcessInfo {
+ public:
+ enum IntegrityLevel {
+ INTEGRITY_UNKNOWN,
+ LOW_INTEGRITY,
+ MEDIUM_INTEGRITY,
+ HIGH_INTEGRITY,
+ };
+
+ // All these functions cache the result after first run.
+ static bool IsRunningAsSystem();
+ static bool HasAdminRights(); // System / Admin / High Elevation on Vista
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ProcessInfo);
+}; // class
+}; // namespace
+
+#endif // RLZ_WIN_LIB_PROCESS_INFO_H_