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

Unified Diff: chrome/renderer/web_apps.cc

Issue 105873009: Use apple-touch-icons for streamlined hosted apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit Created 6 years, 11 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
« no previous file with comments | « chrome/common/web_application_info.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/web_apps.cc
diff --git a/chrome/renderer/web_apps.cc b/chrome/renderer/web_apps.cc
index ac19d5259987247b5b9849a100495c07ebbaa860..e9f5f72289f937354112750f476ab7212c622c2d 100644
--- a/chrome/renderer/web_apps.cc
+++ b/chrome/renderer/web_apps.cc
@@ -7,12 +7,14 @@
#include <string>
#include <vector>
+#include "base/command_line.h"
#include "base/json/json_reader.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/web_application_info.h"
#include "grit/common_resources.h"
#include "grit/generated_resources.h"
@@ -144,8 +146,15 @@ bool ParseWebAppFromWebDocument(WebFrame* frame,
// see also
// <http://en.wikipedia.org/wiki/Favicon>
// <http://dev.w3.org/html5/spec/Overview.html#rel-icon>
+ //
+ // Streamlined Hosted Apps also support "apple-touch-icon" and
+ // "apple-touch-icon-precomposed".
if (LowerCaseEqualsASCII(rel, "icon") ||
- LowerCaseEqualsASCII(rel, "shortcut icon")) {
+ LowerCaseEqualsASCII(rel, "shortcut icon") ||
+ (CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kEnableStreamlinedHostedApps) &&
+ (LowerCaseEqualsASCII(rel, "apple-touch-icon") ||
+ LowerCaseEqualsASCII(rel, "apple-touch-icon-precomposed")))) {
AddInstallIcon(elem, &app_info->icons);
}
} else if (elem.hasTagName("meta") && elem.hasAttribute("name")) {
« no previous file with comments | « chrome/common/web_application_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698