OLD | NEW |
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 /** | 5 /** |
6 * @fileoverview User pod row implementation. | 6 * @fileoverview User pod row implementation. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('login', function() { | 9 cr.define('login', function() { |
10 /** | 10 /** |
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 /** | 1448 /** |
1449 * Refresh the statistics in the remove user warning dialog. | 1449 * Refresh the statistics in the remove user warning dialog. |
1450 * @param {string} profilePath The filepath of the URL (must be verified). | 1450 * @param {string} profilePath The filepath of the URL (must be verified). |
1451 * @param {Object} profileStats Statistics associated with profileURL. | 1451 * @param {Object} profileStats Statistics associated with profileURL. |
1452 */ | 1452 */ |
1453 updateRemoveWarningDialog_: function(profilePath, profileStats) { | 1453 updateRemoveWarningDialog_: function(profilePath, profileStats) { |
1454 if (profilePath !== this.user.profilePath) | 1454 if (profilePath !== this.user.profilePath) |
1455 return; | 1455 return; |
1456 // Converting profileStats into id attribute by an object. | 1456 // Converting profileStats into id attribute by an object. |
1457 var stats_id_map = { | 1457 var stats_id_map = { |
1458 'BrowsingHistory': 'action-box-remove-user-warning-history', | 1458 'browsing_history': 'action-box-remove-user-warning-history', |
1459 'Passwords': 'action-box-remove-user-warning-passwords', | 1459 'passwords': 'action-box-remove-user-warning-passwords', |
1460 'Bookmarks': 'action-box-remove-user-warning-bookmarks', | 1460 'bookmarks': 'action-box-remove-user-warning-bookmarks', |
1461 'Settings': 'action-box-remove-user-warning-settings', | 1461 'settings': 'action-box-remove-user-warning-settings', |
1462 } | 1462 } |
1463 // Load individual statistics | 1463 // Load individual statistics |
1464 var num_stats_loaded = 0; | 1464 var num_stats_loaded = 0; |
1465 var total_count = 0; | 1465 var total_count = 0; |
1466 var failed = false; | 1466 var failed = false; |
1467 for (var key in profileStats) { | 1467 for (var key in profileStats) { |
1468 if (stats_id_map.hasOwnProperty(key)) { | 1468 if (stats_id_map.hasOwnProperty(key)) { |
1469 if (profileStats[key].success) { | 1469 if (profileStats[key].success) { |
1470 var count = profileStats[key].count; | 1470 var count = profileStats[key].count; |
1471 this.querySelector("." + stats_id_map[key]).textContent = count; | 1471 this.querySelector("." + stats_id_map[key]).textContent = count; |
(...skipping 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3292 if (pod && pod.multiProfilesPolicyApplied) { | 3292 if (pod && pod.multiProfilesPolicyApplied) { |
3293 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3293 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
3294 } | 3294 } |
3295 } | 3295 } |
3296 }; | 3296 }; |
3297 | 3297 |
3298 return { | 3298 return { |
3299 PodRow: PodRow | 3299 PodRow: PodRow |
3300 }; | 3300 }; |
3301 }); | 3301 }); |
OLD | NEW |