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

Side by Side Diff: chrome/renderer/web_apps.cc

Issue 882343004: Enable the new bookmark apps system by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/web_apps.h" 5 #include "chrome/renderer/web_apps.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 std::string rel = elem.getAttribute("rel").utf8(); 140 std::string rel = elem.getAttribute("rel").utf8();
141 // "rel" attribute may use either "icon" or "shortcut icon". 141 // "rel" attribute may use either "icon" or "shortcut icon".
142 // see also 142 // see also
143 // <http://en.wikipedia.org/wiki/Favicon> 143 // <http://en.wikipedia.org/wiki/Favicon>
144 // <http://dev.w3.org/html5/spec/Overview.html#rel-icon> 144 // <http://dev.w3.org/html5/spec/Overview.html#rel-icon>
145 // 145 //
146 // Bookmark apps also support "apple-touch-icon" and 146 // Bookmark apps also support "apple-touch-icon" and
147 // "apple-touch-icon-precomposed". 147 // "apple-touch-icon-precomposed".
148 if (LowerCaseEqualsASCII(rel, "icon") || 148 if (LowerCaseEqualsASCII(rel, "icon") ||
149 LowerCaseEqualsASCII(rel, "shortcut icon") || 149 LowerCaseEqualsASCII(rel, "shortcut icon") ||
150 (base::CommandLine::ForCurrentProcess()->HasSwitch( 150 (!base::CommandLine::ForCurrentProcess()->HasSwitch(
151 switches::kEnableNewBookmarkApps) && 151 switches::kDisableNewBookmarkApps) &&
152 (LowerCaseEqualsASCII(rel, "apple-touch-icon") || 152 (LowerCaseEqualsASCII(rel, "apple-touch-icon") ||
153 LowerCaseEqualsASCII(rel, "apple-touch-icon-precomposed")))) { 153 LowerCaseEqualsASCII(rel, "apple-touch-icon-precomposed")))) {
154 AddInstallIcon(elem, &app_info->icons); 154 AddInstallIcon(elem, &app_info->icons);
155 } 155 }
156 } else if (elem.hasHTMLTagName("meta") && elem.hasAttribute("name")) { 156 } else if (elem.hasHTMLTagName("meta") && elem.hasAttribute("name")) {
157 std::string name = elem.getAttribute("name").utf8(); 157 std::string name = elem.getAttribute("name").utf8();
158 WebString content = elem.getAttribute("content"); 158 WebString content = elem.getAttribute("content");
159 if (name == "application-name") { 159 if (name == "application-name") {
160 app_info->title = content; 160 app_info->title = content;
161 } else if (name == "description") { 161 } else if (name == "description") {
(...skipping 11 matching lines...) Expand all
173 LowerCaseEqualsASCII(content, "yes") && 173 LowerCaseEqualsASCII(content, "yes") &&
174 app_info->mobile_capable == 174 app_info->mobile_capable ==
175 WebApplicationInfo::MOBILE_CAPABLE_UNSPECIFIED) { 175 WebApplicationInfo::MOBILE_CAPABLE_UNSPECIFIED) {
176 app_info->mobile_capable = WebApplicationInfo::MOBILE_CAPABLE_APPLE; 176 app_info->mobile_capable = WebApplicationInfo::MOBILE_CAPABLE_APPLE;
177 } 177 }
178 } 178 }
179 } 179 }
180 } 180 }
181 181
182 } // namespace web_apps 182 } // namespace web_apps
OLDNEW
« 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