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

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

Issue 2948313002: [Android] Suggest page title for homescreen shortcut when Web Manifest is empty (Closed)
Patch Set: Merge branch 'master' into ignore Created 3 years, 6 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 | « no previous file | chrome/browser/android/shortcut_info_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/shortcut_info.cc
diff --git a/chrome/browser/android/shortcut_info.cc b/chrome/browser/android/shortcut_info.cc
index 7811a601cb7a8f2c9a65c99b17b0d4303967fe1c..c4fca5c1036bbcc1fac474a0a2e0c7a7e0f014c0 100644
--- a/chrome/browser/android/shortcut_info.cc
+++ b/chrome/browser/android/shortcut_info.cc
@@ -20,14 +20,13 @@ ShortcutInfo::~ShortcutInfo() {
}
void ShortcutInfo::UpdateFromManifest(const content::Manifest& manifest) {
- if (!manifest.short_name.is_null())
+ if (!manifest.short_name.string().empty() ||
+ !manifest.name.string().empty()) {
short_name = manifest.short_name.string();
- if (!manifest.name.is_null())
name = manifest.name.string();
- if (manifest.short_name.is_null() != manifest.name.is_null()) {
- if (manifest.short_name.is_null())
+ if (short_name.empty())
short_name = name;
- else
+ else if (name.empty())
name = short_name;
}
user_title = short_name;
« no previous file with comments | « no previous file | chrome/browser/android/shortcut_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698