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

Side by Side Diff: chrome/installer/util/create_reg_key_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 "shlwapi.h" 5 #include "shlwapi.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/registry.h" 8 #include "base/registry.h"
9 #include "chrome/installer/util/create_reg_key_work_item.h" 9 #include "chrome/installer/util/create_reg_key_work_item.h"
10 #include "chrome/installer/util/install_util.h" 10 #include "chrome/installer/util/install_util.h"
11 #include "chrome/installer/util/logging_installer.h" 11 #include "chrome/installer/util/logging_installer.h"
12 12
13 CreateRegKeyWorkItem::~CreateRegKeyWorkItem() { 13 CreateRegKeyWorkItem::~CreateRegKeyWorkItem() {
14 } 14 }
15 15
16 CreateRegKeyWorkItem::CreateRegKeyWorkItem(HKEY predefined_root, 16 CreateRegKeyWorkItem::CreateRegKeyWorkItem(HKEY predefined_root,
17 std::wstring path) 17 const std::wstring& path)
18 : predefined_root_(predefined_root), 18 : predefined_root_(predefined_root),
19 path_(path), 19 path_(path),
20 key_created_(false) { 20 key_created_(false) {
21 } 21 }
22 22
23 bool CreateRegKeyWorkItem::Do() { 23 bool CreateRegKeyWorkItem::Do() {
24 if(!InitKeyList()) { 24 if(!InitKeyList()) {
25 // Nothing needs to be done here. 25 // Nothing needs to be done here.
26 LOG(INFO) << "no key to create"; 26 LOG(INFO) << "no key to create";
27 return true; 27 return true;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 do { 97 do {
98 key_list_.push_back(key_path); 98 key_list_.push_back(key_path);
99 // This is pure string operation so it does not matter whether the 99 // This is pure string operation so it does not matter whether the
100 // path is file path or registry path. 100 // path is file path or registry path.
101 file_util::UpOneDirectoryOrEmpty(&key_path); 101 file_util::UpOneDirectoryOrEmpty(&key_path);
102 } while(!key_path.empty()); 102 } while(!key_path.empty());
103 103
104 return true; 104 return true;
105 } 105 }
OLDNEW
« no previous file with comments | « chrome/installer/util/create_reg_key_work_item.h ('k') | chrome/installer/util/delete_reg_value_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698