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

Side by Side Diff: chrome/browser/resources/options2/cookies_list.js

Issue 10790150: Show Flash LSOs for Pepper Flash in cookie dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 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 | Annotate | Revision Log
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', function() { 5 cr.define('options', function() {
6 /** @const */ var DeletableItemList = options.DeletableItemList; 6 /** @const */ var DeletableItemList = options.DeletableItemList;
7 /** @const */ var DeletableItem = options.DeletableItem; 7 /** @const */ var DeletableItem = options.DeletableItem;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
10 10
(...skipping 23 matching lines...) Expand all
34 'indexed_db': [['origin', 'label_indexed_db_origin'], 34 'indexed_db': [['origin', 'label_indexed_db_origin'],
35 ['size', 'label_indexed_db_size'], 35 ['size', 'label_indexed_db_size'],
36 ['modified', 'label_indexed_db_last_modified']], 36 ['modified', 'label_indexed_db_last_modified']],
37 'file_system': [['origin', 'label_file_system_origin'], 37 'file_system': [['origin', 'label_file_system_origin'],
38 ['persistent', 'label_file_system_persistent_usage'], 38 ['persistent', 'label_file_system_persistent_usage'],
39 ['temporary', 'label_file_system_temporary_usage']], 39 ['temporary', 'label_file_system_temporary_usage']],
40 'server_bound_cert': [['serverId', 'label_server_bound_cert_server_id'], 40 'server_bound_cert': [['serverId', 'label_server_bound_cert_server_id'],
41 ['certType', 'label_server_bound_cert_type'], 41 ['certType', 'label_server_bound_cert_type'],
42 ['created', 'label_server_bound_cert_created'], 42 ['created', 'label_server_bound_cert_created'],
43 ['expires', 'label_server_bound_cert_expires']], 43 ['expires', 'label_server_bound_cert_expires']],
44 'flash_lso': [['domain', 'label_cookie_domain']],
44 }; 45 };
45 46
46 /** 47 /**
47 * Returns the item's height, like offsetHeight but such that it works better 48 * Returns the item's height, like offsetHeight but such that it works better
48 * when the page is zoomed. See the similar calculation in @{code cr.ui.List}. 49 * when the page is zoomed. See the similar calculation in @{code cr.ui.List}.
49 * This version also accounts for the animation done in this file. 50 * This version also accounts for the animation done in this file.
50 * @param {Element} item The item to get the height of. 51 * @param {Element} item The item to get the height of.
51 * @return {number} The height of the item, calculated with zooming in mind. 52 * @return {number} The height of the item, calculated with zooming in mind.
52 */ 53 */
53 function getItemHeight(item) { 54 function getItemHeight(item) {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 if (info.database || info.indexedDb) 265 if (info.database || info.indexedDb)
265 list.push(loadTimeData.getString('cookie_database_storage')); 266 list.push(loadTimeData.getString('cookie_database_storage'));
266 if (info.localStorage) 267 if (info.localStorage)
267 list.push(loadTimeData.getString('cookie_local_storage')); 268 list.push(loadTimeData.getString('cookie_local_storage'));
268 if (info.appCache) 269 if (info.appCache)
269 list.push(loadTimeData.getString('cookie_app_cache')); 270 list.push(loadTimeData.getString('cookie_app_cache'));
270 if (info.fileSystem) 271 if (info.fileSystem)
271 list.push(loadTimeData.getString('cookie_file_system')); 272 list.push(loadTimeData.getString('cookie_file_system'));
272 if (info.serverBoundCerts) 273 if (info.serverBoundCerts)
273 list.push(loadTimeData.getString('cookie_server_bound_cert')); 274 list.push(loadTimeData.getString('cookie_server_bound_cert'));
275 if (info.flashLSO)
276 list.push(loadTimeData.getString('cookie_flash_lso'));
274 277
275 var text = ''; 278 var text = '';
276 for (var i = 0; i < list.length; ++i) { 279 for (var i = 0; i < list.length; ++i) {
277 if (text.length > 0) 280 if (text.length > 0)
278 text += ', ' + list[i]; 281 text += ', ' + list[i];
279 else 282 else
280 text = list[i]; 283 text = list[i];
281 } 284 }
282 this.dataChild.textContent = text; 285 this.dataChild.textContent = text;
283 286
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } else if (this.data.type == 'app_cache') { 480 } else if (this.data.type == 'app_cache') {
478 info.appCache = true; 481 info.appCache = true;
479 } else if (this.data.type == 'indexed_db') { 482 } else if (this.data.type == 'indexed_db') {
480 info.indexedDb = true; 483 info.indexedDb = true;
481 } else if (this.data.type == 'file_system') { 484 } else if (this.data.type == 'file_system') {
482 info.fileSystem = true; 485 info.fileSystem = true;
483 } else if (this.data.type == 'quota') { 486 } else if (this.data.type == 'quota') {
484 info.quota = this.data; 487 info.quota = this.data;
485 } else if (this.data.type == 'server_bound_cert') { 488 } else if (this.data.type == 'server_bound_cert') {
486 info.serverBoundCerts++; 489 info.serverBoundCerts++;
490 } else if (this.data.type == 'flash_lso') {
491 info.flashLSO = true;
487 } 492 }
488 493
489 var apps = this.data.appsProtectingThis; 494 var apps = this.data.appsProtectingThis;
490 if (apps) { 495 if (apps) {
491 if (!info.appsProtectingThis) 496 if (!info.appsProtectingThis)
492 info.appsProtectingThis = {}; 497 info.appsProtectingThis = {};
493 apps.forEach(function(appInfo) { 498 apps.forEach(function(appInfo) {
494 info.appsProtectingThis[appInfo.id] = appInfo; 499 info.appsProtectingThis[appInfo.id] = appInfo;
495 }); 500 });
496 } 501 }
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 parent.clear(); 894 parent.clear();
890 this.addByParent_(parent, 0, children); 895 this.addByParent_(parent, 0, children);
891 parent.endBatchUpdates(); 896 parent.endBatchUpdates();
892 }, 897 },
893 }; 898 };
894 899
895 return { 900 return {
896 CookiesList: CookiesList 901 CookiesList: CookiesList
897 }; 902 };
898 }); 903 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698