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

Unified Diff: chrome/browser/shell_integration_win.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: namespace s/Win/win 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/shell_integration_win.cc
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 97dae75806498acaffa93f9fe612a14b9a903acc..08b988589ea6495f6b697c69de3544ed9be5ba21 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -21,6 +21,7 @@
#include "base/win/registry.h"
#include "base/win/scoped_co_mem.h"
#include "base/win/scoped_comptr.h"
+#include "base/win/shortcut.h"
#include "base/win/windows_version.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_constants.h"
@@ -336,10 +337,11 @@ void MigrateWin7ShortcutsInPath(
GetShortcutAppId(shell_link, &existing_app_id);
if (expected_app_id != existing_app_id) {
- file_util::CreateOrUpdateShortcutLink(NULL, shortcut.value().c_str(),
- NULL, NULL, NULL, NULL, 0,
- expected_app_id.c_str(),
- file_util::SHORTCUT_NO_OPTIONS);
+ base::win::ShortcutProperties properties_app_id_only;
+ properties_app_id_only.set_app_id(expected_app_id);
+ base::win::CreateOrUpdateShortcutLink(
+ shortcut, properties_app_id_only,
+ base::win::SHORTCUT_UPDATE_EXISTING);
}
}
}
« no previous file with comments | « chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc ('k') | chrome/browser/ui/web_applications/web_app_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698