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

Unified Diff: chrome/browser/android/shortcut_info.cc

Issue 2453423002: Send all of the icon URLs listed in Web Manifest to WebAPK Server. (Closed)
Patch Set: Created 4 years, 2 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/android/shortcut_info.cc
diff --git a/chrome/browser/android/shortcut_info.cc b/chrome/browser/android/shortcut_info.cc
index 9371a8a0c79f12163ed9dff0760f5903d827a7e6..92bddc0619b2f5a226b6e0d94d7eb633bf88183f 100644
--- a/chrome/browser/android/shortcut_info.cc
+++ b/chrome/browser/android/shortcut_info.cc
@@ -63,6 +63,11 @@ void ShortcutInfo::UpdateFromManifest(const content::Manifest& manifest) {
// Set the background color based on the manifest value, if any.
if (manifest.background_color != content::Manifest::kInvalidOrMissingColor)
background_color = manifest.background_color;
+
+ // Set the icon urls based on the icons on the manifest, if any.
pkotwicz 2016/11/01 00:29:49 Nit: "on the manifest" -> "in the manifest"
Xi Han 2016/11/07 16:51:43 Done.
+ icon_urls.clear();
+ for (const auto& icon : manifest.icons)
pkotwicz 2016/11/01 00:29:49 Nit: "const auto& icon" -> "const Icon& icon"
Xi Han 2016/11/07 16:51:43 content::Manifest::Icon, personally I would prefer
pkotwicz 2016/11/11 21:04:18 This is the official guideline for using auto: htt
Xi Han 2016/11/14 19:36:09 Done.
+ icon_urls.push_back(icon.src);
}
void ShortcutInfo::UpdateSource(const Source new_source) {

Powered by Google App Engine
This is Rietveld 408576698