Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: chrome/installer/util/delete_reg_value_work_item.h

Issue 6090006: Regkey functions return error code instead of bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_DELETE_REG_VALUE_WORK_ITEM_H_ 5 #ifndef CHROME_INSTALLER_UTIL_DELETE_REG_VALUE_WORK_ITEM_H_
6 #define CHROME_INSTALLER_UTIL_DELETE_REG_VALUE_WORK_ITEM_H_ 6 #define CHROME_INSTALLER_UTIL_DELETE_REG_VALUE_WORK_ITEM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 22 matching lines...) Expand all
33 VALUE_DELETED, 33 VALUE_DELETED,
34 // One possible outcome after Do(). Value is not found. 34 // One possible outcome after Do(). Value is not found.
35 VALUE_NOT_FOUND, 35 VALUE_NOT_FOUND,
36 // The status after Do() and Rollback() is called. 36 // The status after Do() and Rollback() is called.
37 VALUE_ROLLED_BACK, 37 VALUE_ROLLED_BACK,
38 // Another possible outcome after Do() (when there is an error). 38 // Another possible outcome after Do() (when there is an error).
39 VALUE_UNCHANGED 39 VALUE_UNCHANGED
40 }; 40 };
41 41
42 DeleteRegValueWorkItem(HKEY predefined_root, const std::wstring& key_path, 42 DeleteRegValueWorkItem(HKEY predefined_root, const std::wstring& key_path,
43 const std::wstring& value_name, DWORD type); 43 const std::wstring& value_name);
44 44
45 // Root key of the target key under which the value is set. The root key can 45 // Root key of the target key under which the value is set. The root key can
46 // only be one of the predefined keys on Windows. 46 // only be one of the predefined keys on Windows.
47 HKEY predefined_root_; 47 HKEY predefined_root_;
48 48
49 // Path of the target key under which the value is set. 49 // Path of the target key under which the value is set.
50 std::wstring key_path_; 50 std::wstring key_path_;
51 51
52 // Name of the value to be set. 52 // Name of the value to be set.
53 std::wstring value_name_; 53 std::wstring value_name_;
54 54
55 // DWORD that tells whether data value is of type REG_SZ, REG_DWORD, or
56 // REG_QWORD
57 // Ideally we do not need this information from user of this class and can
58 // check the registry for the type. But to simpify implementation we are
59 // going to put the burden on the caller for now to provide us the type.
60 DWORD type_;
61
62 DeletionStatus status_; 55 DeletionStatus status_;
63 56
64 // Data of the previous value. 57 // Previous value.
65 std::wstring old_str_; // if data is of type REG_SZ 58 DWORD previous_type_;
66 DWORD old_dw_; // if data is of type REG_DWORD 59 std::string previous_value_;
grt (UTC plus 2) 2011/01/14 15:53:43 It looks like you're using a std::string as a buck
amit 2011/01/15 01:28:11 Yep, back to vector :) I started with std::vector
67 int64 old_qword_; // if data is of type REG_QWORD
68 }; 60 };
69 61
70 #endif // CHROME_INSTALLER_UTIL_DELETE_REG_VALUE_WORK_ITEM_H_ 62 #endif // CHROME_INSTALLER_UTIL_DELETE_REG_VALUE_WORK_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698