1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/sandbox/chromium/base/win/startup_information.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +// Copyright (c) 2012 The Chromium Authors. All rights reserved. 1.5 +// Use of this source code is governed by a BSD-style license that can be 1.6 +// found in the LICENSE file. 1.7 + 1.8 +#ifndef BASE_WIN_STARTUP_INFORMATION_H_ 1.9 +#define BASE_WIN_STARTUP_INFORMATION_H_ 1.10 + 1.11 +#include <windows.h> 1.12 + 1.13 +#include "base/base_export.h" 1.14 +#include "base/basictypes.h" 1.15 + 1.16 +namespace base { 1.17 +namespace win { 1.18 + 1.19 +// Manages the lifetime of additional attributes in STARTUPINFOEX. 1.20 +class BASE_EXPORT StartupInformation { 1.21 + public: 1.22 + StartupInformation(); 1.23 + 1.24 + ~StartupInformation(); 1.25 + 1.26 + // Initialize the attribute list for the specified number of entries. 1.27 + bool InitializeProcThreadAttributeList(DWORD attribute_count); 1.28 + 1.29 + // Sets one entry in the initialized attribute list. 1.30 + bool UpdateProcThreadAttribute(DWORD_PTR attribute, 1.31 + void* value, 1.32 + size_t size); 1.33 + 1.34 + LPSTARTUPINFOW startup_info() { return &startup_info_.StartupInfo; } 1.35 + const LPSTARTUPINFOW startup_info() const { 1.36 + return const_cast<const LPSTARTUPINFOW>(&startup_info_.StartupInfo); 1.37 + } 1.38 + 1.39 + bool has_extended_startup_info() const { 1.40 + return !!startup_info_.lpAttributeList; 1.41 + } 1.42 + 1.43 + private: 1.44 + STARTUPINFOEXW startup_info_; 1.45 + DISALLOW_COPY_AND_ASSIGN(StartupInformation); 1.46 +}; 1.47 + 1.48 +} // namespace win 1.49 +} // namespace base 1.50 + 1.51 +#endif // BASE_WIN_SCOPED_STARTUP_INFO_EX_H_ 1.52 +