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

Unified Diff: chrome/browser/ui/web_applications/web_app_ui.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/browser/ui/web_applications/web_app_ui.cc
diff --git a/chrome/browser/ui/web_applications/web_app_ui.cc b/chrome/browser/ui/web_applications/web_app_ui.cc
index 85285d34eee07b8d9ad4699f70240aa757a6f20f..b714e5da4a5a2e862da7e9a74aef95e6b87ae75f 100644
--- a/chrome/browser/ui/web_applications/web_app_ui.cc
+++ b/chrome/browser/ui/web_applications/web_app_ui.cc
@@ -258,16 +258,15 @@ void UpdateShortcutWorker::UpdateShortcutsOnFileThread() {
shortcut_info_.description.resize(MAX_PATH - 1);
for (size_t i = 0; i < shortcut_files_.size(); ++i) {
+ file_util::ShortcutProperties shortcut_properties;
+ shortcut_properties.set_target(shortcut_files_[i].value());
+ shortcut_properties.set_description(shortcut_info_.description.c_str());
+ shortcut_properties.set_icon(icon_file.value(), 0);
+ shortcut_properties.set_app_id(app_id);
file_util::CreateOrUpdateShortcutLink(
- NULL,
shortcut_files_[i].value().c_str(),
- NULL,
- NULL,
- shortcut_info_.description.c_str(),
- icon_file.value().c_str(),
- 0,
- app_id.c_str(),
- file_util::SHORTCUT_NO_OPTIONS);
+ shortcut_properties,
+ file_util::SHORTCUT_UPDATE_EXISTING);
}
}

Powered by Google App Engine
This is Rietveld 408576698