diff options
-rw-r--r-- | chrome/browser/resources/ntp4/apps_page.js | 11 | ||||
-rw-r--r-- | chrome/browser/ui/webui/ntp/app_launcher_handler.cc | 1 |
2 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js index 4ae2843..bc98db8 100644 --- a/chrome/browser/resources/ntp4/apps_page.js +++ b/chrome/browser/resources/ntp4/apps_page.js @@ -623,16 +623,15 @@ cr.define('ntp4', function() { node.innerHTML = html; title = node.textContent; } + + // Make sure title is >=1 and <=45 characters for Chrome app limits. if (!title) title = url; + if (title.length > 45) + title = title.substring(0, 45); + var data = {url: url, title: title}; // Synthesize an app. - var data = {url: url, title: title}; - // Make sure title is >=1 and <=45 characters for Chrome app limits. - if (data.title.length > 45) - data.title = data.title.substring(0,45); - if (data.title.length == 0) - data.title = data.url; this.generateAppForLink(data); }, diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc index f63c6ce..9916ccd 100644 --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc @@ -808,6 +808,7 @@ void AppLauncherHandler::OnFaviconForApp(FaviconService::Handle handle, web_app->is_bookmark_app = install_info->is_bookmark_app; web_app->title = install_info->title; web_app->app_url = install_info->app_url; + web_app->urls.push_back(install_info->app_url); WebApplicationInfo::IconInfo icon; web_app->icons.push_back(icon); |