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

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

Issue 1224273003: webapps: propogate name and shortName from manifest to Java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cl issues Created 5 years, 5 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_data_fetcher.cc
diff --git a/chrome/browser/android/shortcut_data_fetcher.cc b/chrome/browser/android/shortcut_data_fetcher.cc
index f4de97abf01de3ce29a20344ac178fcdf243362c..3178c882764c7975495801aea5d52c3b8a279b70 100644
--- a/chrome/browser/android/shortcut_data_fetcher.cc
+++ b/chrome/browser/android/shortcut_data_fetcher.cc
@@ -65,8 +65,10 @@ void ShortcutDataFetcher::OnDidGetWebApplicationInfo(
web_app_info.description =
web_app_info.description.substr(0, chrome::kMaxMetaTagAttributeLength);
- shortcut_info_.title = web_app_info.title.empty() ? web_contents()->GetTitle()
- : web_app_info.title;
+ // Simply set the user editable title to be the page's title
gone 2015/07/20 22:19:12 nit:user-editable
Lalit Maganti 2015/07/21 09:07:27 Done.
+ shortcut_info_.user_title = web_app_info.title.empty()
+ ? web_contents()->GetTitle()
+ : web_app_info.title;
if (web_app_info.mobile_capable == WebApplicationInfo::MOBILE_CAPABLE ||
web_app_info.mobile_capable == WebApplicationInfo::MOBILE_CAPABLE_APPLE) {
@@ -121,7 +123,7 @@ void ShortcutDataFetcher::OnDidGetManifest(const content::Manifest& manifest) {
FetchFavicon();
}
- weak_observer_->OnTitleAvailable(shortcut_info_.title);
+ weak_observer_->OnUserTitleAvailable(shortcut_info_.user_title);
// Kick off a timeout for downloading the icon. If an icon isn't set within
// the timeout, fall back to using a dynamically-generated launcher icon.

Powered by Google App Engine
This is Rietveld 408576698