| 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 29 matching lines...) Expand all Loading... |
| 40 'channel_id': [['serverId', 'label_channel_id_server_id'], | 40 'channel_id': [['serverId', 'label_channel_id_server_id'], |
| 41 ['certType', 'label_channel_id_type'], | 41 ['certType', 'label_channel_id_type'], |
| 42 ['created', 'label_channel_id_created']], | 42 ['created', 'label_channel_id_created']], |
| 43 'service_worker': [['origin', 'label_service_worker_origin'], | 43 'service_worker': [['origin', 'label_service_worker_origin'], |
| 44 ['size', 'label_service_worker_size'], | 44 ['size', 'label_service_worker_size'], |
| 45 ['scopes', 'label_service_worker_scopes']], | 45 ['scopes', 'label_service_worker_scopes']], |
| 46 'cache_storage': [['origin', 'label_cache_storage_origin'], | 46 'cache_storage': [['origin', 'label_cache_storage_origin'], |
| 47 ['size', 'label_cache_storage_size'], | 47 ['size', 'label_cache_storage_size'], |
| 48 ['modified', 'label_cache_storage_last_modified']], | 48 ['modified', 'label_cache_storage_last_modified']], |
| 49 'flash_lso': [['domain', 'label_cookie_domain']], | 49 'flash_lso': [['domain', 'label_cookie_domain']], |
| 50 'media_license': [['origin', 'label_media_license_origin'], |
| 51 ['size', 'label_media_license_size'], |
| 52 ['modified', 'label_media_license_last_modified']], |
| 50 }; | 53 }; |
| 51 | 54 |
| 52 /** | 55 /** |
| 53 * Returns the item's height, like offsetHeight but such that it works better | 56 * Returns the item's height, like offsetHeight but such that it works better |
| 54 * when the page is zoomed. See the similar calculation in @{code cr.ui.List}. | 57 * when the page is zoomed. See the similar calculation in @{code cr.ui.List}. |
| 55 * This version also accounts for the animation done in this file. | 58 * This version also accounts for the animation done in this file. |
| 56 * @param {Element} item The item to get the height of. | 59 * @param {Element} item The item to get the height of. |
| 57 * @return {number} The height of the item, calculated with zooming in mind. | 60 * @return {number} The height of the item, calculated with zooming in mind. |
| 58 */ | 61 */ |
| 59 function getItemHeight(item) { | 62 function getItemHeight(item) { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 var info = { | 252 var info = { |
| 250 cookies: 0, | 253 cookies: 0, |
| 251 database: false, | 254 database: false, |
| 252 localStorage: false, | 255 localStorage: false, |
| 253 appCache: false, | 256 appCache: false, |
| 254 indexedDb: false, | 257 indexedDb: false, |
| 255 fileSystem: false, | 258 fileSystem: false, |
| 256 channelIDs: 0, | 259 channelIDs: 0, |
| 257 serviceWorker: false, | 260 serviceWorker: false, |
| 258 cacheStorage: false, | 261 cacheStorage: false, |
| 262 mediaLicense: false, |
| 259 }; | 263 }; |
| 260 if (this.origin) | 264 if (this.origin) |
| 261 this.origin.collectSummaryInfo(info); | 265 this.origin.collectSummaryInfo(info); |
| 262 | 266 |
| 263 var list = []; | 267 var list = []; |
| 264 if (info.cookies > 1) | 268 if (info.cookies > 1) |
| 265 list.push(loadTimeData.getStringF('cookie_plural', info.cookies)); | 269 list.push(loadTimeData.getStringF('cookie_plural', info.cookies)); |
| 266 else if (info.cookies > 0) | 270 else if (info.cookies > 0) |
| 267 list.push(loadTimeData.getString('cookie_singular')); | 271 list.push(loadTimeData.getString('cookie_singular')); |
| 268 if (info.database || info.indexedDb) | 272 if (info.database || info.indexedDb) |
| 269 list.push(loadTimeData.getString('cookie_database_storage')); | 273 list.push(loadTimeData.getString('cookie_database_storage')); |
| 270 if (info.localStorage) | 274 if (info.localStorage) |
| 271 list.push(loadTimeData.getString('cookie_local_storage')); | 275 list.push(loadTimeData.getString('cookie_local_storage')); |
| 272 if (info.appCache) | 276 if (info.appCache) |
| 273 list.push(loadTimeData.getString('cookie_app_cache')); | 277 list.push(loadTimeData.getString('cookie_app_cache')); |
| 274 if (info.fileSystem) | 278 if (info.fileSystem) |
| 275 list.push(loadTimeData.getString('cookie_file_system')); | 279 list.push(loadTimeData.getString('cookie_file_system')); |
| 276 if (info.channelIDs) | 280 if (info.channelIDs) |
| 277 list.push(loadTimeData.getString('cookie_channel_id')); | 281 list.push(loadTimeData.getString('cookie_channel_id')); |
| 278 if (info.serviceWorker) | 282 if (info.serviceWorker) |
| 279 list.push(loadTimeData.getString('cookie_service_worker')); | 283 list.push(loadTimeData.getString('cookie_service_worker')); |
| 280 if (info.cacheStorage) | 284 if (info.cacheStorage) |
| 281 list.push(loadTimeData.getString('cookie_cache_storage')); | 285 list.push(loadTimeData.getString('cookie_cache_storage')); |
| 282 if (info.flashLSO) | 286 if (info.flashLSO) |
| 283 list.push(loadTimeData.getString('cookie_flash_lso')); | 287 list.push(loadTimeData.getString('cookie_flash_lso')); |
| 288 if (info.mediaLicense) |
| 289 list.push(loadTimeData.getString('cookie_media_license')); |
| 284 | 290 |
| 285 var text = ''; | 291 var text = ''; |
| 286 for (var i = 0; i < list.length; ++i) { | 292 for (var i = 0; i < list.length; ++i) { |
| 287 if (text.length > 0) | 293 if (text.length > 0) |
| 288 text += ', ' + list[i]; | 294 text += ', ' + list[i]; |
| 289 else | 295 else |
| 290 text = list[i]; | 296 text = list[i]; |
| 291 } | 297 } |
| 292 this.dataChild.textContent = text; | 298 this.dataChild.textContent = text; |
| 293 | 299 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } else if (this.data.type == 'quota') { | 504 } else if (this.data.type == 'quota') { |
| 499 info.quota = this.data; | 505 info.quota = this.data; |
| 500 } else if (this.data.type == 'channel_id') { | 506 } else if (this.data.type == 'channel_id') { |
| 501 info.channelIDs++; | 507 info.channelIDs++; |
| 502 } else if (this.data.type == 'service_worker') { | 508 } else if (this.data.type == 'service_worker') { |
| 503 info.serviceWorker = true; | 509 info.serviceWorker = true; |
| 504 } else if (this.data.type == 'cache_storage') { | 510 } else if (this.data.type == 'cache_storage') { |
| 505 info.cacheStorage = true; | 511 info.cacheStorage = true; |
| 506 } else if (this.data.type == 'flash_lso') { | 512 } else if (this.data.type == 'flash_lso') { |
| 507 info.flashLSO = true; | 513 info.flashLSO = true; |
| 514 } else if (this.data.type == 'media_license') { |
| 515 info.mediaLicense = true; |
| 508 } | 516 } |
| 509 | 517 |
| 510 var apps = this.data.appsProtectingThis; | 518 var apps = this.data.appsProtectingThis; |
| 511 if (apps) { | 519 if (apps) { |
| 512 if (!info.appsProtectingThis) | 520 if (!info.appsProtectingThis) |
| 513 info.appsProtectingThis = {}; | 521 info.appsProtectingThis = {}; |
| 514 apps.forEach(function(appInfo) { | 522 apps.forEach(function(appInfo) { |
| 515 info.appsProtectingThis[appInfo.id] = appInfo; | 523 info.appsProtectingThis[appInfo.id] = appInfo; |
| 516 }); | 524 }); |
| 517 } | 525 } |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 parent.endBatchUpdates(); | 952 parent.endBatchUpdates(); |
| 945 }, | 953 }, |
| 946 }; | 954 }; |
| 947 | 955 |
| 948 return { | 956 return { |
| 949 CookiesList: CookiesList, | 957 CookiesList: CookiesList, |
| 950 CookieListItem: CookieListItem, | 958 CookieListItem: CookieListItem, |
| 951 CookieTreeNode: CookieTreeNode, | 959 CookieTreeNode: CookieTreeNode, |
| 952 }; | 960 }; |
| 953 }); | 961 }); |
| OLD | NEW |