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

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: Add back explict destructor 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
« no previous file with comments | « chrome/browser/android/shortcut_data_fetcher.h ('k') | chrome/browser/android/shortcut_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e419712d7e50b235b052e697cd38250addb6bfc2 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
+ 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.
« no previous file with comments | « chrome/browser/android/shortcut_data_fetcher.h ('k') | chrome/browser/android/shortcut_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698