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

Side by Side Diff: chrome/browser/resources/options/password_manager_list.js

Issue 2278423002: Misc. cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Further cleanup in preparation for removing hack in subsequent patch Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options.passwordManager', function() { 5 cr.define('options.passwordManager', function() {
6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
7 /** @const */ var DeletableItemList = options.DeletableItemList; 7 /** @const */ var DeletableItemList = options.DeletableItemList;
8 /** @const */ var DeletableItem = options.DeletableItem; 8 /** @const */ var DeletableItem = options.DeletableItem;
9 /** @const */ var List = cr.ui.List; 9 /** @const */ var List = cr.ui.List;
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 * Helper function that creates an HTML element for displaying the origin of 91 * Helper function that creates an HTML element for displaying the origin of
92 * saved password. It also sets some properties in |item|. 92 * saved password. It also sets some properties in |item|.
93 * @param {Object} item A dictionary of data on the list item. 93 * @param {Object} item A dictionary of data on the list item.
94 * @return {Element} The element for displaying the origin of saved password. 94 * @return {Element} The element for displaying the origin of saved password.
95 */ 95 */
96 function createUrlDiv(item) { 96 function createUrlDiv(item) {
97 var urlDiv = cr.doc.createElement('div'); 97 var urlDiv = cr.doc.createElement('div');
98 urlDiv.className = 'favicon-cell url'; 98 urlDiv.className = 'favicon-cell url';
99 urlDiv.setAttribute('title', getTitleForPasswordOrigin(item)); 99 urlDiv.setAttribute('title', getTitleForPasswordOrigin(item));
100 urlDiv.style.backgroundImage = cr.icon.getFaviconImageSet( 100 urlDiv.style.backgroundImage = cr.icon.getFaviconImageSet(
101 'origin/' + item.url, 16); 101 'origin/' + item.url);
102 102
103 item.urlLink = createUrlLink(item, urlDiv); 103 item.urlLink = createUrlLink(item, urlDiv);
104 urlDiv.appendChild(item.urlLink); 104 urlDiv.appendChild(item.urlLink);
105 105
106 if (item.isAndroidUri && item.isClickable) { 106 if (item.isAndroidUri && item.isClickable) {
107 item.androidUriSuffix = cr.doc.createElement('span'); 107 item.androidUriSuffix = cr.doc.createElement('span');
108 item.androidUriSuffix.textContent = 108 item.androidUriSuffix.textContent =
109 loadTimeData.getString('androidUriSuffix'); 109 loadTimeData.getString('androidUriSuffix');
110 urlDiv.appendChild(item.androidUriSuffix); 110 urlDiv.appendChild(item.androidUriSuffix);
111 } 111 }
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 SHOWN_ORIGIN_FIELD: SHOWN_ORIGIN_FIELD, 545 SHOWN_ORIGIN_FIELD: SHOWN_ORIGIN_FIELD,
546 IS_ANDROID_URI_FIELD: IS_ANDROID_URI_FIELD, 546 IS_ANDROID_URI_FIELD: IS_ANDROID_URI_FIELD,
547 IS_CLICKABLE_FIELD: IS_CLICKABLE_FIELD, 547 IS_CLICKABLE_FIELD: IS_CLICKABLE_FIELD,
548 IS_SECURE_FIELD: IS_SECURE_FIELD, 548 IS_SECURE_FIELD: IS_SECURE_FIELD,
549 USERNAME_FIELD: USERNAME_FIELD, 549 USERNAME_FIELD: USERNAME_FIELD,
550 PASSWORD_FIELD: PASSWORD_FIELD, 550 PASSWORD_FIELD: PASSWORD_FIELD,
551 FEDERATION_FIELD: FEDERATION_FIELD, 551 FEDERATION_FIELD: FEDERATION_FIELD,
552 ORIGINAL_INDEX_FIELD: ORIGINAL_INDEX_FIELD 552 ORIGINAL_INDEX_FIELD: ORIGINAL_INDEX_FIELD
553 }; 553 };
554 }); 554 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698