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

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: Nits. Created 4 years, 1 month 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..632eff1811fa837cd1386f8668bdecf58ef3fe51 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 in the manifest, if any.
+ icon_urls.clear();
+ for (const content::Manifest::Icon& icon : manifest.icons)
+ icon_urls.push_back(icon.src.spec());
}
void ShortcutInfo::UpdateSource(const Source new_source) {
« no previous file with comments | « chrome/browser/android/shortcut_info.h ('k') | chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698