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

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

Issue 505073002: Fix a bug where the resource manager displays Chrome Apps with non-human readable names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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', function() { 5 cr.define('options', function() {
6 /** @const */ var Page = cr.ui.pageManager.Page; 6 /** @const */ var Page = cr.ui.pageManager.Page;
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 9
10 ///////////////////////////////////////////////////////////////////////////// 10 /////////////////////////////////////////////////////////////////////////////
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 * @private 79 * @private
80 */ 80 */
81 populateOrigins_: function(originDict) { 81 populateOrigins_: function(originDict) {
82 var origins = Object.keys(originDict).map(function(origin) { 82 var origins = Object.keys(originDict).map(function(origin) {
83 // |usage| means the time of last usage in seconds since epoch 83 // |usage| means the time of last usage in seconds since epoch
84 // (Jan 1, 1970) for permissions and means the amount of local storage 84 // (Jan 1, 1970) for permissions and means the amount of local storage
85 // in bytes used for local storage. 85 // in bytes used for local storage.
86 return { 86 return {
87 origin: origin, 87 origin: origin,
88 usage: originDict[origin].usage, 88 usage: originDict[origin].usage,
89 usageString: originDict[origin].usageString 89 usageString: originDict[origin].usageString,
90 readableName: originDict[origin].readableName,
90 }; 91 };
91 }); 92 });
92 origins.sort(function(first, second) { 93 origins.sort(function(first, second) {
93 return second.usage - first.usage; 94 return second.usage - first.usage;
94 }); 95 });
95 this.originList_.dataModel = new ArrayDataModel(origins); 96 this.originList_.dataModel = new ArrayDataModel(origins);
96 }, 97 },
97 98
98 /** 99 /**
99 * Update the table with the origins filtered by the value in the search 100 * Update the table with the origins filtered by the value in the search
(...skipping 25 matching lines...) Expand all
125 126
126 WebsiteSettingsManager.showEditPage = function(url) { 127 WebsiteSettingsManager.showEditPage = function(url) {
127 WebsiteSettingsEditor.getInstance().populatePage(url); 128 WebsiteSettingsEditor.getInstance().populatePage(url);
128 }; 129 };
129 130
130 // Export 131 // Export
131 return { 132 return {
132 WebsiteSettingsManager: WebsiteSettingsManager 133 WebsiteSettingsManager: WebsiteSettingsManager
133 }; 134 };
134 }); 135 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698