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. 4 5 #ifndef BASE_PROCESS_PROCESS_INFO_H_ 6 #define BASE_PROCESS_PROCESS_INFO_H_ 7 8 #include "base/base_export.h" 9 #include "build/build_config.h" 10 11 namespace base { 12 13 class Time; 14 15 // Vends information about the current process. 16 class BASE_EXPORT CurrentProcessInfo { 17 public: 18 // Returns the time at which the process was launched. May be empty if an 19 // error occurred retrieving the information. 20 static const Time CreationTime(); 21 }; 22 23 #if defined(OS_WIN) 24 enum IntegrityLevel { 25 INTEGRITY_UNKNOWN, 26 UNTRUSTED_INTEGRITY, 27 LOW_INTEGRITY, 28 MEDIUM_INTEGRITY, 29 HIGH_INTEGRITY, 30 }; 31 32 // Returns the integrity level of the process. Returns INTEGRITY_UNKNOWN in the 33 // case of an underlying system failure. 34 BASE_EXPORT IntegrityLevel GetCurrentProcessIntegrityLevel(); 35 36 // Determines whether the current process is elevated. 37 BASE_EXPORT bool IsCurrentProcessElevated(); 38 39 #endif // defined(OS_WIN) 40 41 } // namespace base 42 43 #endif // BASE_PROCESS_PROCESS_INFO_H_ 44