| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // ============================================================================= | 5 // ============================================================================= |
| 6 // PLEASE READ | 6 // PLEASE READ |
| 7 // | 7 // |
| 8 // In general, you should not be adding stuff to this file. | 8 // In general, you should not be adding stuff to this file. |
| 9 // | 9 // |
| 10 // - If your thing is only used in one place, just put it in a reasonable | 10 // - If your thing is only used in one place, just put it in a reasonable |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Removes the command specified by |name| from the AutoRun key. |root_key| | 80 // Removes the command specified by |name| from the AutoRun key. |root_key| |
| 81 // could be HKCU or HKLM or the root of any user hive. | 81 // could be HKCU or HKLM or the root of any user hive. |
| 82 BASE_EXPORT bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name); | 82 BASE_EXPORT bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name); |
| 83 | 83 |
| 84 // Reads the command specified by |name| from the AutoRun key. |root_key| | 84 // Reads the command specified by |name| from the AutoRun key. |root_key| |
| 85 // could be HKCU or HKLM or the root of any user hive. Used for unit-tests. | 85 // could be HKCU or HKLM or the root of any user hive. Used for unit-tests. |
| 86 BASE_EXPORT bool ReadCommandFromAutoRun(HKEY root_key, | 86 BASE_EXPORT bool ReadCommandFromAutoRun(HKEY root_key, |
| 87 const string16& name, | 87 const string16& name, |
| 88 string16* command); | 88 string16* command); |
| 89 | 89 |
| 90 // Get the size of a struct up to and including the specified member. |
| 91 // This is necessary to set compatible struct sizes for different versions |
| 92 // of certain Windows APIs (e.g. SystemParametersInfo). |
| 93 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ |
| 94 offsetof(struct_name, member) + \ |
| 95 (sizeof static_cast<struct_name*>(NULL)->member) |
| 96 |
| 90 } // namespace win | 97 } // namespace win |
| 91 } // namespace base | 98 } // namespace base |
| 92 | 99 |
| 93 #endif // BASE_WIN_WIN_UTIL_H_ | 100 #endif // BASE_WIN_WIN_UTIL_H_ |
| OLD | NEW |