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

Unified Diff: chrome/installer/util/package.cc

Issue 5429002: Support for checking multiple keyfiles when removing an installation package.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/delete_tree_work_item_unittest.cc ('k') | chrome/installer/util/work_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/package.cc
===================================================================
--- chrome/installer/util/package.cc (revision 67902)
+++ chrome/installer/util/package.cc (working copy)
@@ -124,16 +124,18 @@
VLOG(1) << "directory found: " << find_file_data.cFileName;
version.reset(Version::GetVersionFromString(find_file_data.cFileName));
if (version.get() && latest_version.IsHigherThan(version.get())) {
- std::wstring remove_dir(path_.value());
- file_util::AppendToPath(&remove_dir, find_file_data.cFileName);
- std::wstring chrome_dll_path(remove_dir);
- file_util::AppendToPath(&chrome_dll_path, installer_util::kChromeDll);
- VLOG(1) << "Deleting directory: " << remove_dir;
- // TODO(tommi): We should support more "key files". One for each
- // associated Product. Maybe the relative key file path should
- // be a property of BrowserDistribution.
+ FilePath remove_dir(path_.Append(find_file_data.cFileName));
+ std::vector<FilePath> key_files;
+ Products::const_iterator it = products_.begin();
+ for (; it != products_.end(); ++it) {
+ BrowserDistribution* dist = it->get()->distribution();
+ key_files.push_back(remove_dir.Append(dist->GetKeyFile()));
+ }
+
+ VLOG(1) << "Deleting directory: " << remove_dir.value();
+
scoped_ptr<DeleteTreeWorkItem> item(
- WorkItem::CreateDeleteTreeWorkItem(remove_dir, chrome_dll_path));
+ WorkItem::CreateDeleteTreeWorkItem(remove_dir, key_files));
if (!item->Do())
item->Rollback();
}
« no previous file with comments | « chrome/installer/util/delete_tree_work_item_unittest.cc ('k') | chrome/installer/util/work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698