OLD | NEW |
---|---|
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 19 matching lines...) Expand all Loading... | |
30 ['modified', 'label_local_storage_last_modified']], | 30 ['modified', 'label_local_storage_last_modified']], |
31 'local_storage': [['origin', 'label_local_storage_origin'], | 31 'local_storage': [['origin', 'label_local_storage_origin'], |
32 ['size', 'label_local_storage_size'], | 32 ['size', 'label_local_storage_size'], |
33 ['modified', 'label_local_storage_last_modified']], | 33 ['modified', 'label_local_storage_last_modified']], |
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 'channel_id': [['serverId', 'label_channel_id_server_id'], |
41 ['certType', 'label_server_bound_cert_type'], | 41 ['certType', 'label_channel_id_type'], |
42 ['created', 'label_server_bound_cert_created']], | 42 ['created', 'label_channel_id_created']], |
wtc
2014/07/30 04:56:52
Fix the indentation of lines 41-42. (I can take ca
| |
43 'flash_lso': [['domain', 'label_cookie_domain']], | 43 'flash_lso': [['domain', 'label_cookie_domain']], |
44 }; | 44 }; |
45 | 45 |
46 /** | 46 /** |
47 * Returns the item's height, like offsetHeight but such that it works better | 47 * 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}. | 48 * 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. | 49 * This version also accounts for the animation done in this file. |
50 * @param {Element} item The item to get the height of. | 50 * @param {Element} item The item to get the height of. |
51 * @return {number} The height of the item, calculated with zooming in mind. | 51 * @return {number} The height of the item, calculated with zooming in mind. |
52 */ | 52 */ |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 * This implementation scans the descendants to update the text. | 239 * This implementation scans the descendants to update the text. |
240 */ | 240 */ |
241 updateOrigin: function() { | 241 updateOrigin: function() { |
242 var info = { | 242 var info = { |
243 cookies: 0, | 243 cookies: 0, |
244 database: false, | 244 database: false, |
245 localStorage: false, | 245 localStorage: false, |
246 appCache: false, | 246 appCache: false, |
247 indexedDb: false, | 247 indexedDb: false, |
248 fileSystem: false, | 248 fileSystem: false, |
249 serverBoundCerts: 0, | 249 channelIDs: 0, |
250 }; | 250 }; |
251 if (this.origin) | 251 if (this.origin) |
252 this.origin.collectSummaryInfo(info); | 252 this.origin.collectSummaryInfo(info); |
253 | 253 |
254 var list = []; | 254 var list = []; |
255 if (info.cookies > 1) | 255 if (info.cookies > 1) |
256 list.push(loadTimeData.getStringF('cookie_plural', info.cookies)); | 256 list.push(loadTimeData.getStringF('cookie_plural', info.cookies)); |
257 else if (info.cookies > 0) | 257 else if (info.cookies > 0) |
258 list.push(loadTimeData.getString('cookie_singular')); | 258 list.push(loadTimeData.getString('cookie_singular')); |
259 if (info.database || info.indexedDb) | 259 if (info.database || info.indexedDb) |
260 list.push(loadTimeData.getString('cookie_database_storage')); | 260 list.push(loadTimeData.getString('cookie_database_storage')); |
261 if (info.localStorage) | 261 if (info.localStorage) |
262 list.push(loadTimeData.getString('cookie_local_storage')); | 262 list.push(loadTimeData.getString('cookie_local_storage')); |
263 if (info.appCache) | 263 if (info.appCache) |
264 list.push(loadTimeData.getString('cookie_app_cache')); | 264 list.push(loadTimeData.getString('cookie_app_cache')); |
265 if (info.fileSystem) | 265 if (info.fileSystem) |
266 list.push(loadTimeData.getString('cookie_file_system')); | 266 list.push(loadTimeData.getString('cookie_file_system')); |
267 if (info.serverBoundCerts) | 267 if (info.channelIDs) |
268 list.push(loadTimeData.getString('cookie_server_bound_cert')); | 268 list.push(loadTimeData.getString('cookie_channel_id')); |
269 if (info.flashLSO) | 269 if (info.flashLSO) |
270 list.push(loadTimeData.getString('cookie_flash_lso')); | 270 list.push(loadTimeData.getString('cookie_flash_lso')); |
271 | 271 |
272 var text = ''; | 272 var text = ''; |
273 for (var i = 0; i < list.length; ++i) { | 273 for (var i = 0; i < list.length; ++i) { |
274 if (text.length > 0) | 274 if (text.length > 0) |
275 text += ', ' + list[i]; | 275 text += ', ' + list[i]; |
276 else | 276 else |
277 text = list[i]; | 277 text = list[i]; |
278 } | 278 } |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 } else if (this.data.type == 'local_storage') { | 473 } else if (this.data.type == 'local_storage') { |
474 info.localStorage = true; | 474 info.localStorage = true; |
475 } else if (this.data.type == 'app_cache') { | 475 } else if (this.data.type == 'app_cache') { |
476 info.appCache = true; | 476 info.appCache = true; |
477 } else if (this.data.type == 'indexed_db') { | 477 } else if (this.data.type == 'indexed_db') { |
478 info.indexedDb = true; | 478 info.indexedDb = true; |
479 } else if (this.data.type == 'file_system') { | 479 } else if (this.data.type == 'file_system') { |
480 info.fileSystem = true; | 480 info.fileSystem = true; |
481 } else if (this.data.type == 'quota') { | 481 } else if (this.data.type == 'quota') { |
482 info.quota = this.data; | 482 info.quota = this.data; |
483 } else if (this.data.type == 'server_bound_cert') { | 483 } else if (this.data.type == 'channel_id') { |
484 info.serverBoundCerts++; | 484 info.channelIDs++; |
485 } else if (this.data.type == 'flash_lso') { | 485 } else if (this.data.type == 'flash_lso') { |
486 info.flashLSO = true; | 486 info.flashLSO = true; |
487 } | 487 } |
488 | 488 |
489 var apps = this.data.appsProtectingThis; | 489 var apps = this.data.appsProtectingThis; |
490 if (apps) { | 490 if (apps) { |
491 if (!info.appsProtectingThis) | 491 if (!info.appsProtectingThis) |
492 info.appsProtectingThis = {}; | 492 info.appsProtectingThis = {}; |
493 apps.forEach(function(appInfo) { | 493 apps.forEach(function(appInfo) { |
494 info.appsProtectingThis[appInfo.id] = appInfo; | 494 info.appsProtectingThis[appInfo.id] = appInfo; |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
912 parent.clear(); | 912 parent.clear(); |
913 this.addByParent_(parent, 0, children); | 913 this.addByParent_(parent, 0, children); |
914 parent.endBatchUpdates(); | 914 parent.endBatchUpdates(); |
915 }, | 915 }, |
916 }; | 916 }; |
917 | 917 |
918 return { | 918 return { |
919 CookiesList: CookiesList | 919 CookiesList: CookiesList |
920 }; | 920 }; |
921 }); | 921 }); |
OLD | NEW |