| Index: chrome/browser/web_applications/web_app_linux.cc
|
| diff --git a/chrome/browser/web_applications/web_app_linux.cc b/chrome/browser/web_applications/web_app_linux.cc
|
| index 0378b2acfb480b363b32f19409064ce482960023..27274ea782d111fa01fe5943e980b778e14bd7a9 100644
|
| --- a/chrome/browser/web_applications/web_app_linux.cc
|
| +++ b/chrome/browser/web_applications/web_app_linux.cc
|
| @@ -40,7 +40,21 @@ void DeletePlatformShortcuts(
|
| void UpdatePlatformShortcuts(
|
| const base::FilePath& web_app_path,
|
| const ShellIntegration::ShortcutInfo& shortcut_info) {
|
| - // TODO(benwells): Implement this.
|
| + DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
|
| +
|
| + scoped_ptr<base::Environment> env(base::Environment::Create());
|
| +
|
| + // Find out whether shortcuts are already installed.
|
| + ShellIntegration::ShortcutLocations creation_locations =
|
| + ShellIntegrationLinux::DesktopShortcutLocations(
|
| + env.get(), shortcut_info.profile_path, shortcut_info.extension_id);
|
| +
|
| + // If there is are existing shortcuts, this will update them and the icon.
|
| + // If not, this will create an app shortcut with NoDisplay=true, which allows
|
| + // the operating system to identify the app, but not show it in the menu.
|
| + // Note that a shortcut with NoDisplay=true does not cause app_shortcut_info
|
| + // to be true, so the update will preserve the value of NoDisplay.
|
| + CreatePlatformShortcuts(web_app_path, shortcut_info, creation_locations);
|
| }
|
|
|
| } // namespace internals
|
|
|