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

Unified Diff: chrome/renderer/web_apps.cc

Issue 938603002: Disable bookmark apps on non-ChromeOS platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years, 10 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/renderer/web_apps.cc
diff --git a/chrome/renderer/web_apps.cc b/chrome/renderer/web_apps.cc
index 7f1500c109646051ac063e29d6f4967534d8cb8a..c842cbc32a1205de31cf7d1b168855506e812ed6 100644
--- a/chrome/renderer/web_apps.cc
+++ b/chrome/renderer/web_apps.cc
@@ -145,10 +145,16 @@ void ParseWebAppFromWebDocument(WebFrame* frame,
//
// Bookmark apps also support "apple-touch-icon" and
// "apple-touch-icon-precomposed".
+#if defined(OS_CHROMEOS)
+ bool bookmark_apps_enabled = !base::CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableNewBookmarkApps);
+#else
+ bool bookmark_apps_enabled = base::CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kEnableNewBookmarkApps);
+#endif
if (LowerCaseEqualsASCII(rel, "icon") ||
LowerCaseEqualsASCII(rel, "shortcut icon") ||
- (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableNewBookmarkApps) &&
+ (bookmark_apps_enabled &&
(LowerCaseEqualsASCII(rel, "apple-touch-icon") ||
LowerCaseEqualsASCII(rel, "apple-touch-icon-precomposed")))) {
AddInstallIcon(elem, &app_info->icons);
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/test/data/extensions/api_test/management/test/launchType.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698