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

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

Issue 8299008: Errors while deleting old version dirs no longer cause them to grow in odd ways. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addresses nits Created 9 years, 2 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 | « no previous file | chrome/installer/util/delete_tree_work_item.h » ('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 // This file contains the definitions of the installer functions that build 5 // This file contains the definitions of the installer functions that build
6 // the WorkItemList used to install the application. 6 // the WorkItemList used to install the application.
7 7
8 #include "chrome/installer/setup/install_worker.h" 8 #include "chrome/installer/setup/install_worker.h"
9 9
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 WorkItem::ALWAYS_MOVE); 747 WorkItem::ALWAYS_MOVE);
748 748
749 // Copy the default Dictionaries only if the folder doesn't exist already. 749 // Copy the default Dictionaries only if the folder doesn't exist already.
750 // TODO(grt): Use AddMoveTreeWorkItem in a conditional WorkItemList, which 750 // TODO(grt): Use AddMoveTreeWorkItem in a conditional WorkItemList, which
751 // will be more efficient in space and time. 751 // will be more efficient in space and time.
752 install_list->AddCopyTreeWorkItem( 752 install_list->AddCopyTreeWorkItem(
753 src_path.Append(installer::kDictionaries).value(), 753 src_path.Append(installer::kDictionaries).value(),
754 target_path.Append(installer::kDictionaries).value(), 754 target_path.Append(installer::kDictionaries).value(),
755 temp_path.value(), WorkItem::IF_NOT_PRESENT); 755 temp_path.value(), WorkItem::IF_NOT_PRESENT);
756 756
757 // Delete any old_chrome.exe if present. 757 // Delete any old_chrome.exe if present (ignore failure if it's in use).
758 install_list->AddDeleteTreeWorkItem( 758 install_list->AddDeleteTreeWorkItem(
759 target_path.Append(installer::kChromeOldExe), temp_path); 759 target_path.Append(installer::kChromeOldExe), temp_path)
760 ->set_ignore_failure(true);
760 761
761 // Copy installer in install directory and 762 // Copy installer in install directory and
762 // add shortcut in Control Panel->Add/Remove Programs. 763 // add shortcut in Control Panel->Add/Remove Programs.
763 AddInstallerCopyTasks(installer_state, setup_path, archive_path, temp_path, 764 AddInstallerCopyTasks(installer_state, setup_path, archive_path, temp_path,
764 new_version, install_list); 765 new_version, install_list);
765 766
766 const HKEY root = installer_state.root_key(); 767 const HKEY root = installer_state.root_key();
767 768
768 const Products& products = installer_state.products(); 769 const Products& products = installer_state.products();
769 for (size_t i = 0; i < products.size(); ++i) { 770 for (size_t i = 0; i < products.size(); ++i) {
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 } else { 1220 } else {
1220 DCHECK(operation == REMOVE_COMMAND); 1221 DCHECK(operation == REMOVE_COMMAND);
1221 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(), 1222 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(),
1222 cmd_key)->set_log_message( 1223 cmd_key)->set_log_message(
1223 "removing quick-enable-cf command"); 1224 "removing quick-enable-cf command");
1224 } 1225 }
1225 } 1226 }
1226 } 1227 }
1227 1228
1228 } // namespace installer 1229 } // namespace installer
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/util/delete_tree_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698