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

Unified Diff: chrome/browser/resources/ntp4/apps_page.js

Issue 7739007: ntp4: app generation tweak (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for overlapping extents Created 9 years, 4 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/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/apps_page.js
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index 9ba9dc0543ac575b5e5785854d5bec98e955e7d8..fd85226a2e401f4e248fef8623efd27fea785a02 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);
},
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698