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

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

Issue 282363003: Add WOW64 support to the installer registry work items (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/installer/util/delete_reg_value_work_item.h" 5 #include "chrome/installer/util/delete_reg_value_work_item.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/win/registry.h" 9 #include "base/win/registry.h"
10 #include "chrome/installer/util/logging_installer.h" 10 #include "chrome/installer/util/logging_installer.h"
11 11
12 using base::win::RegKey; 12 using base::win::RegKey;
13 13
14 DeleteRegValueWorkItem::DeleteRegValueWorkItem(HKEY predefined_root, 14 DeleteRegValueWorkItem::DeleteRegValueWorkItem(
15 const std::wstring& key_path, 15 HKEY predefined_root,
16 const std::wstring& value_name) 16 const std::wstring& key_path,
17 const std::wstring& value_name,
18 RegWow64ViewOption reg_wow64_option)
17 : predefined_root_(predefined_root), 19 : predefined_root_(predefined_root),
18 key_path_(key_path), 20 key_path_(key_path),
19 value_name_(value_name), 21 value_name_(value_name),
22 reg_wow64_option_(reg_wow64_option),
20 previous_type_(0), 23 previous_type_(0),
21 status_(DELETE_VALUE) { 24 status_(DELETE_VALUE) {
22 } 25 }
23 26
24 DeleteRegValueWorkItem::~DeleteRegValueWorkItem() { 27 DeleteRegValueWorkItem::~DeleteRegValueWorkItem() {
25 } 28 }
26 29
27 bool DeleteRegValueWorkItem::Do() { 30 bool DeleteRegValueWorkItem::Do() {
28 if (status_ != DELETE_VALUE) { 31 if (status_ != DELETE_VALUE) {
29 // we already did something. 32 // we already did something.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 const char* previous_value = 94 const char* previous_value =
92 previous_size ? &previous_value_[0] : NULL; 95 previous_size ? &previous_value_[0] : NULL;
93 result = key.WriteValue(value_name_.c_str(), previous_value, 96 result = key.WriteValue(value_name_.c_str(), previous_value,
94 previous_size, previous_type_); 97 previous_size, previous_type_);
95 VLOG_IF(1, result != ERROR_SUCCESS) << "rollback: restoring " 98 VLOG_IF(1, result != ERROR_SUCCESS) << "rollback: restoring "
96 << value_name_ << " error: " << result; 99 << value_name_ << " error: " << result;
97 } else { 100 } else {
98 VLOG(1) << "can not open " << key_path_ << " error: " << result; 101 VLOG(1) << "can not open " << key_path_ << " error: " << result;
99 } 102 }
100 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698