| 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 563b33f76c3e506877c147d9b9cb4ca15cc43c53..7a161f9e344b87ce55db02c22e63740918fded89 100644
|
| --- a/chrome/browser/web_applications/web_app_mac.mm
|
| +++ b/chrome/browser/web_applications/web_app_mac.mm
|
| @@ -958,6 +958,29 @@ void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) {
|
| }
|
| }
|
|
|
| +void UpdateShortcutsForAllAppsForProfile(const base::FilePath& profile_path,
|
| + const std::set<std::string>& app_ids) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::FILE);
|
| + web_app::ShortcutLocations creation_locations;
|
| + // Create the shortcut in the Chrome Apps subdir.
|
| + creation_locations.applications_menu_location =
|
| + web_app::APP_MENU_LOCATION_SUBDIR_CHROMEAPPS;
|
| +
|
| + for (std::set<std::string>::const_iterator it = app_ids.begin();
|
| + it != app_ids.end();
|
| + ++it) {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::UI,
|
| + FROM_HERE,
|
| + base::Bind(&web_app::internals::CallForProfileAndAppId,
|
| + profile_path,
|
| + *it,
|
| + base::Bind(&web_app::CreateShortcuts,
|
| + web_app::SHORTCUT_CREATION_AUTOMATED,
|
| + creation_locations)));
|
| + }
|
| +}
|
| +
|
| } // namespace internals
|
|
|
| } // namespace web_app
|
|
|