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

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc

Issue 2915913002: [WebAPKs] Display same text for menu & engagement banner (Closed)
Patch Set: Merge branch 'master' into same_infobar_title 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
Index: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
diff --git a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
index 156fb72543ccb9ecbb4e30c59e5ab463557eb5a2..b1a73f94e04c32cf56969b628027a40a849dbe7e 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
@@ -112,11 +112,11 @@ void AddToHomescreenDataFetcher::OnDidGetWebApplicationInfo(
web_app_info.title.substr(0, chrome::kMaxMetaTagAttributeLength);
// Simply set the user-editable title to be the page's title
- shortcut_info_.user_title = web_app_info.title.empty()
- ? web_contents()->GetTitle()
- : web_app_info.title;
- shortcut_info_.short_name = shortcut_info_.user_title;
- shortcut_info_.name = shortcut_info_.user_title;
+ const base::string16& title = web_app_info.title.empty()
+ ? web_contents()->GetTitle()
+ : web_app_info.title;
+ shortcut_info_.short_name = title;
+ shortcut_info_.name = title;
if (web_app_info.mobile_capable == WebApplicationInfo::MOBILE_CAPABLE ||
web_app_info.mobile_capable == WebApplicationInfo::MOBILE_CAPABLE_APPLE) {
@@ -244,7 +244,7 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
shortcut_info_.minimum_splash_image_size_in_px =
minimum_splash_image_size_in_px_;
- weak_observer_->OnUserTitleAvailable(shortcut_info_.user_title);
+ weak_observer_->OnUserTitleAvailable(shortcut_info_.short_name);
if (data.primary_icon) {
shortcut_info_.best_primary_icon_url = data.primary_icon_url;

Powered by Google App Engine
This is Rietveld 408576698