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

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

Issue 263403002: Replace OnceOffCreateShortcuts with UpdateShortcutsForAllAppsIfNeeded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check all extensions, not just enabled. Created 6 years, 7 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/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 3a7b237f1f4e34fa21c738e9af121cd5470ece5f..088072ff4b2933ef197ec9f2c3c519dad7d19991 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -969,6 +969,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(content::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) {
+ content::BrowserThread::PostTask(
+ content::BrowserThread::UI,
tapted 2014/05/29 08:56:40 nit: indenting is off here
jackhou1 2014/05/30 04:38:53 Done.
+ 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

Powered by Google App Engine
This is Rietveld 408576698