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

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

Issue 151101: Fixit: Remove bunch of coverity warnings from chrome/installer/*. (Closed)
Patch Set: Created 11 years, 5 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) 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 #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/registry.h" 7 #include "base/registry.h"
8 #include "chrome/installer/util/logging_installer.h" 8 #include "chrome/installer/util/logging_installer.h"
9 9
10 DeleteRegValueWorkItem::DeleteRegValueWorkItem(HKEY predefined_root, 10 DeleteRegValueWorkItem::DeleteRegValueWorkItem(HKEY predefined_root,
11 std::wstring key_path, 11 const std::wstring& key_path,
12 std::wstring value_name, 12 const std::wstring& value_name,
13 bool is_str_type) 13 bool is_str_type)
14 : predefined_root_(predefined_root), 14 : predefined_root_(predefined_root),
15 key_path_(key_path), 15 key_path_(key_path),
16 value_name_(value_name), 16 value_name_(value_name),
17 is_str_type_(is_str_type), 17 is_str_type_(is_str_type),
18 status_(DELETE_VALUE) { 18 status_(DELETE_VALUE),
19 old_dw_(0) {
19 } 20 }
20 21
21 DeleteRegValueWorkItem::~DeleteRegValueWorkItem() { 22 DeleteRegValueWorkItem::~DeleteRegValueWorkItem() {
22 } 23 }
23 24
24 bool DeleteRegValueWorkItem::Do() { 25 bool DeleteRegValueWorkItem::Do() {
25 if (status_ != DELETE_VALUE) { 26 if (status_ != DELETE_VALUE) {
26 // we already did something. 27 // we already did something.
27 LOG(ERROR) << "multiple calls to Do()"; 28 LOG(ERROR) << "multiple calls to Do()";
28 return false; 29 return false;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 old_dw_))) { 73 old_dw_))) {
73 status_ = VALUE_ROLLED_BACK; 74 status_ = VALUE_ROLLED_BACK;
74 LOG(INFO) << "rollback: restored " << value_name_; 75 LOG(INFO) << "rollback: restored " << value_name_;
75 } else { 76 } else {
76 LOG(ERROR) << "failed to restore value " << value_name_; 77 LOG(ERROR) << "failed to restore value " << value_name_;
77 } 78 }
78 79
79 key.Close(); 80 key.Close();
80 return; 81 return;
81 } 82 }
OLDNEW
« no previous file with comments | « chrome/installer/util/delete_reg_value_work_item.h ('k') | chrome/installer/util/delete_tree_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698