| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_INSTALLER_UTIL_SET_REG_VALUE_WORK_ITEM_H__ | 5 #ifndef CHROME_INSTALLER_UTIL_SET_REG_VALUE_WORK_ITEM_H__ |
| 6 #define CHROME_INSTALLER_UTIL_SET_REG_VALUE_WORK_ITEM_H__ | 6 #define CHROME_INSTALLER_UTIL_SET_REG_VALUE_WORK_ITEM_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include "chrome/installer/util/work_item.h" | 10 #include "chrome/installer/util/work_item.h" |
| 11 | 11 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 31 // been overwritten. | 31 // been overwritten. |
| 32 VALUE_OVERWRITTEN, | 32 VALUE_OVERWRITTEN, |
| 33 // One possible outcome after Do(). No change is applied, either | 33 // One possible outcome after Do(). No change is applied, either |
| 34 // because we are not allowed to overwrite the previous value, or due to | 34 // because we are not allowed to overwrite the previous value, or due to |
| 35 // some errors like the key does not exist. | 35 // some errors like the key does not exist. |
| 36 VALUE_UNCHANGED, | 36 VALUE_UNCHANGED, |
| 37 // The status after Do and Rollback is called. | 37 // The status after Do and Rollback is called. |
| 38 VALUE_ROLL_BACK | 38 VALUE_ROLL_BACK |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 SetRegValueWorkItem(HKEY predefined_root, std::wstring key_path, | 41 SetRegValueWorkItem(HKEY predefined_root, |
| 42 std::wstring value_name, std::wstring value_data, | 42 const std::wstring& key_path, |
| 43 const std::wstring& value_name, |
| 44 const std::wstring& value_data, |
| 43 bool overwrite); | 45 bool overwrite); |
| 44 | 46 |
| 45 SetRegValueWorkItem(HKEY predefined_root, std::wstring key_path, | 47 SetRegValueWorkItem(HKEY predefined_root, const std::wstring& key_path, |
| 46 std::wstring value_name, DWORD value_data, | 48 const std::wstring& value_name, DWORD value_data, |
| 47 bool overwrite); | 49 bool overwrite); |
| 48 | 50 |
| 49 // Root key of the target key under which the value is set. The root key can | 51 // Root key of the target key under which the value is set. The root key can |
| 50 // only be one of the predefined keys on Windows. | 52 // only be one of the predefined keys on Windows. |
| 51 HKEY predefined_root_; | 53 HKEY predefined_root_; |
| 52 | 54 |
| 53 // Path of the target key under which the value is set. | 55 // Path of the target key under which the value is set. |
| 54 std::wstring key_path_; | 56 std::wstring key_path_; |
| 55 | 57 |
| 56 // Name of the value to be set. | 58 // Name of the value to be set. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 67 bool is_str_type_; | 69 bool is_str_type_; |
| 68 | 70 |
| 69 SettingStatus status_; | 71 SettingStatus status_; |
| 70 | 72 |
| 71 // Data of the previous value. | 73 // Data of the previous value. |
| 72 std::wstring previous_value_str_; // if data is of type REG_SZ | 74 std::wstring previous_value_str_; // if data is of type REG_SZ |
| 73 DWORD previous_value_dword_; // if data is of type REG_DWORD | 75 DWORD previous_value_dword_; // if data is of type REG_DWORD |
| 74 }; | 76 }; |
| 75 | 77 |
| 76 #endif // CHROME_INSTALLER_UTIL_SET_REG_VALUE_WORK_ITEM_H__ | 78 #endif // CHROME_INSTALLER_UTIL_SET_REG_VALUE_WORK_ITEM_H__ |
| OLD | NEW |