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

Unified Diff: chrome/installer/setup/install.cc

Issue 10914109: Refactoring and tests for the highly undertested file_util::CreateOrUpdateShortcutLink() method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/setup/install.cc
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 05efc3c7c7f792a5808ab190cdb4f8e7ae76c0f0..3f74726074cfff2603c109368e6f18f4e37e63f6 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -327,12 +327,14 @@ void CreateOrUpdateStartMenuAndTaskbarShortcuts(
CommandLine arguments(CommandLine::NO_PROGRAM);
AppendUninstallCommandLineFlags(installer_state, product, &arguments);
VLOG(1) << operation << " uninstall link at " << uninstall_link.value();
- if (!file_util::CreateOrUpdateShortcutLink(setup_exe.value().c_str(),
- uninstall_link.value().c_str(), NULL,
- arguments.GetCommandLineString().c_str(), NULL,
- setup_exe.value().c_str(), 0, NULL,
+ file_util::ShortcutProperties shortcut_properties;
+ shortcut_properties.set_target(setup_exe.value());
+ shortcut_properties.set_arguments(arguments.GetCommandLineString());
+ shortcut_properties.set_icon(setup_exe.value(), 0);
+ if (!file_util::CreateOrUpdateShortcutLink(
+ uninstall_link.value().c_str(), shortcut_properties,
create_always ? file_util::SHORTCUT_CREATE_ALWAYS :
- file_util::SHORTCUT_NO_OPTIONS)) {
+ file_util::SHORTCUT_UPDATE_EXISTING)) {
LOG(WARNING) << operation << " uninstall link at "
<< uninstall_link.value() << " failed.";
}

Powered by Google App Engine
This is Rietveld 408576698