Chromium Code Reviews| 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 |