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

Unified Diff: chrome/browser/resources/options2/password_manager_list.js

Issue 10079024: Normalizes URLs requested for favicons in the password manager dialog. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated comments Created 8 years, 8 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/favicon_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options2/password_manager_list.js
diff --git a/chrome/browser/resources/options2/password_manager_list.js b/chrome/browser/resources/options2/password_manager_list.js
index acc1af2af61ac613f71ee3a905a878d0c7f10ca5..b606f3fd1cd5e95a458766e245e86e97eab3e0bf 100644
--- a/chrome/browser/resources/options2/password_manager_list.js
+++ b/chrome/browser/resources/options2/password_manager_list.js
@@ -38,7 +38,14 @@ cr.define('options.passwordManager', function() {
urlLabel.classList.add('url');
urlLabel.setAttribute('title', this.url);
urlLabel.textContent = this.url;
- urlLabel.style.backgroundImage = url('chrome://favicon/' + this.url);
+
+ // The favicon URL is prefixed with "origin/", which essentially removes
+ // the URL path past the top-level domain and ensures that a scheme (e.g.,
+ // http) is being used. This ensures that the favicon returned is the
+ // default favicon for the domain and that the URL has a scheme if none
+ // is present in the password manager.
+ urlLabel.style.backgroundImage =
+ url('chrome://favicon/origin/' + this.url);
this.contentElement.appendChild(urlLabel);
// The stored username.
@@ -172,7 +179,14 @@ cr.define('options.passwordManager', function() {
urlLabel.classList.add('favicon-cell');
urlLabel.classList.add('weakrtl');
urlLabel.textContent = this.url;
- urlLabel.style.backgroundImage = url('chrome://favicon/' + this.url);
+
+ // The favicon URL is prefixed with "origin/", which essentially removes
+ // the URL path past the top-level domain and ensures that a scheme (e.g.,
+ // http) is being used. This ensures that the favicon returned is the
+ // default favicon for the domain and that the URL has a scheme if none
+ // is present in the password manager.
+ urlLabel.style.backgroundImage =
+ url('chrome://favicon/origin/' + this.url);
this.contentElement.appendChild(urlLabel);
},
« no previous file with comments | « no previous file | chrome/browser/ui/webui/favicon_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698