OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 const wchar_t* app_id); | 65 const wchar_t* app_id); |
66 | 66 |
67 // Adds the specified |command| using the specified |name| to the AutoRun key. | 67 // Adds the specified |command| using the specified |name| to the AutoRun key. |
68 // |root_key| could be HKCU or HKLM or the root of any user hive. | 68 // |root_key| could be HKCU or HKLM or the root of any user hive. |
69 bool AddCommandToAutoRun(HKEY root_key, const string16& name, | 69 bool AddCommandToAutoRun(HKEY root_key, const string16& name, |
70 const string16& command); | 70 const string16& command); |
71 // Removes the command specified by |name| from the AutoRun key. |root_key| | 71 // Removes the command specified by |name| from the AutoRun key. |root_key| |
72 // could be HKCU or HKLM or the root of any user hive. | 72 // could be HKCU or HKLM or the root of any user hive. |
73 bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name); | 73 bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name); |
74 | 74 |
| 75 // Reads the command specified by |name| from the AutoRun key. |root_key| |
| 76 // could be HKCU or HKLM or the root of any user hive. Used for unit-tests. |
| 77 bool ReadCommandFromAutoRun(HKEY root_key, |
| 78 const string16& name, |
| 79 string16* command); |
75 } // namespace win | 80 } // namespace win |
76 } // namespace base | 81 } // namespace base |
77 | 82 |
78 #endif // BASE_WIN_WIN_UTIL_H_ | 83 #endif // BASE_WIN_WIN_UTIL_H_ |
OLD | NEW |