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

Unified Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 15724019: Recreate shortcuts on app update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_applications/web_app_mac.mm
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
index 825e90814b525e65435f160cdcebf37a96668628..e6b146254891a254a46fc06f3a253aea8882224d 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -437,27 +437,28 @@ bool CreatePlatformShortcuts(
const ShellIntegration::ShortcutInfo& shortcut_info,
const ShellIntegration::ShortcutLocations& /*creation_locations*/) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- string16 bundle_id = UTF8ToUTF16(base::mac::BaseBundleID());
- WebAppShortcutCreator shortcut_creator(web_app_path, shortcut_info,
- bundle_id);
+ WebAppShortcutCreator shortcut_creator(
+ web_app_path, shortcut_info, UTF8ToUTF16(base::mac::BaseBundleID()));
return shortcut_creator.CreateShortcut();
}
void DeletePlatformShortcuts(
const base::FilePath& web_app_path,
- const ShellIntegration::ShortcutInfo& info) {
+ const ShellIntegration::ShortcutInfo& shortcut_info) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
-
- base::FilePath bundle_path = GetAppBundleByExtensionId(info.extension_id);
- file_util::Delete(bundle_path, true);
+ WebAppShortcutCreator shortcut_creator(
+ web_app_path, shortcut_info, UTF8ToUTF16(base::mac::BaseBundleID()));
+ file_util::Delete(shortcut_creator.GetShortcutPath(), true);
tapted 2013/06/11 06:40:08 web_app_win.cc also checks whether the `Chrome App
jackhou1 2013/06/12 07:43:50 Done.
}
void UpdatePlatformShortcuts(
const base::FilePath& web_app_path,
- const string16& old_app_title,
+ const string16& /*old_app_title*/,
const ShellIntegration::ShortcutInfo& shortcut_info) {
- // TODO(benwells): Implement this when shortcuts / weblings are enabled on
- // mac.
+ DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ WebAppShortcutCreator shortcut_creator(
+ web_app_path, shortcut_info, UTF8ToUTF16(base::mac::BaseBundleID()));
+ shortcut_creator.CreateShortcut();
tapted 2013/06/11 06:40:08 I wonder if there are any downsides to copying ove
jackhou1 2013/06/12 07:43:50 Seems to be fine to delete first. The app is resta
}
} // namespace internals
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698