| 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 #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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> |
| 12 | 13 |
| 13 #include "chrome/installer/util/work_item.h" | 14 #include "chrome/installer/util/work_item.h" |
| 14 | 15 |
| 15 // A WorkItem subclass that sets a registry value with REG_SZ, REG_DWORD, or | 16 // A WorkItem subclass that sets a registry value with REG_SZ, REG_DWORD, or |
| 16 // REG_QWORD type at the specified path. The value is only set if the target key | 17 // REG_QWORD type at the specified path. The value is only set if the target key |
| 17 // exists. | 18 // exists. |
| 18 class SetRegValueWorkItem : public WorkItem { | 19 class SetRegValueWorkItem : public WorkItem { |
| 19 public: | 20 public: |
| 20 virtual ~SetRegValueWorkItem(); | 21 virtual ~SetRegValueWorkItem(); |
| 21 | 22 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Root key of the target key under which the value is set. The root key can | 60 // Root key of the target key under which the value is set. The root key can |
| 60 // only be one of the predefined keys on Windows. | 61 // only be one of the predefined keys on Windows. |
| 61 HKEY predefined_root_; | 62 HKEY predefined_root_; |
| 62 | 63 |
| 63 // Path of the target key under which the value is set. | 64 // Path of the target key under which the value is set. |
| 64 std::wstring key_path_; | 65 std::wstring key_path_; |
| 65 | 66 |
| 66 // Name of the value to be set. | 67 // Name of the value to be set. |
| 67 std::wstring value_name_; | 68 std::wstring value_name_; |
| 68 | 69 |
| 69 // Data of the value to be set. | |
| 70 std::wstring value_data_str_; // if data is of type REG_SZ | |
| 71 DWORD value_data_dword_; // if data is of type REG_DWORD | |
| 72 int64 value_data_qword_; // if data is of type REG_QWORD | |
| 73 | |
| 74 // Whether to overwrite the existing value under the target key. | 70 // Whether to overwrite the existing value under the target key. |
| 75 bool overwrite_; | 71 bool overwrite_; |
| 76 | 72 |
| 77 // Type of data to store | 73 // Type of data to store |
| 78 DWORD type_; | 74 DWORD type_; |
| 75 std::vector<uint8> value_; |
| 76 DWORD previous_type_; |
| 77 std::vector<uint8> previous_value_; |
| 79 | 78 |
| 80 SettingStatus status_; | 79 SettingStatus status_; |
| 81 | |
| 82 // Data of the previous value. | |
| 83 std::wstring previous_value_str_; // if data is of type REG_SZ | |
| 84 DWORD previous_value_dword_; // if data is of type REG_DWORD | |
| 85 int64 previous_value_qword_; // if data is of type REG_QWORD | |
| 86 }; | 80 }; |
| 87 | 81 |
| 88 #endif // CHROME_INSTALLER_UTIL_SET_REG_VALUE_WORK_ITEM_H__ | 82 #endif // CHROME_INSTALLER_UTIL_SET_REG_VALUE_WORK_ITEM_H__ |
| OLD | NEW |