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

Side by Side Diff: chrome/installer/setup/setup_main.cc

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
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <windows.h> 5 #include <windows.h>
6 #include <msi.h> 6 #include <msi.h>
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 HKEY reg_root = installation.system_level() ? HKEY_LOCAL_MACHINE : 161 HKEY reg_root = installation.system_level() ? HKEY_LOCAL_MACHINE :
162 HKEY_CURRENT_USER; 162 HKEY_CURRENT_USER;
163 const Products& products = installation.products(); 163 const Products& products = installation.products();
164 for (size_t i = 0; i < products.size(); ++i) { 164 for (size_t i = 0; i < products.size(); ++i) {
165 const Product* product = products[i]; 165 const Product* product = products[i];
166 BrowserDistribution* browser_dist = product->distribution(); 166 BrowserDistribution* browser_dist = product->distribution();
167 std::wstring version_key(browser_dist->GetVersionKey()); 167 std::wstring version_key(browser_dist->GetVersionKey());
168 install_list->AddDeleteRegValueWorkItem(reg_root, 168 install_list->AddDeleteRegValueWorkItem(reg_root,
169 version_key, 169 version_key,
170 google_update::kRegOldVersionField, 170 google_update::kRegOldVersionField);
171 REG_SZ);
172 install_list->AddDeleteRegValueWorkItem(reg_root, 171 install_list->AddDeleteRegValueWorkItem(reg_root,
173 version_key, 172 version_key,
174 google_update::kRegRenameCmdField, 173 google_update::kRegRenameCmdField);
175 REG_SZ);
176 } 174 }
177 installer::InstallStatus ret = installer::RENAME_SUCCESSFUL; 175 installer::InstallStatus ret = installer::RENAME_SUCCESSFUL;
178 if (!install_list->Do()) { 176 if (!install_list->Do()) {
179 LOG(ERROR) << "Renaming of executables failed. Rolling back any changes."; 177 LOG(ERROR) << "Renaming of executables failed. Rolling back any changes.";
180 install_list->Rollback(); 178 install_list->Rollback();
181 ret = installer::RENAME_FAILED; 179 ret = installer::RENAME_FAILED;
182 } 180 }
183 file_util::Delete(temp_path, true); 181 file_util::Delete(temp_path, true);
184 return ret; 182 return ret;
185 } 183 }
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 // to pass through, since this is only returned on uninstall which is 1014 // to pass through, since this is only returned on uninstall which is
1017 // never invoked directly by Google Update. 1015 // never invoked directly by Google Update.
1018 return_code = InstallUtil::GetInstallReturnCode(install_status); 1016 return_code = InstallUtil::GetInstallReturnCode(install_status);
1019 } 1017 }
1020 } 1018 }
1021 1019
1022 VLOG(1) << "Installation complete, returning: " << return_code; 1020 VLOG(1) << "Installation complete, returning: " << return_code;
1023 1021
1024 return return_code; 1022 return return_code;
1025 } 1023 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698