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

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

Issue 9316086: Fix JavaScript errors in options2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new violations found after rebase Created 8 years, 10 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 DeletableItemList = options.DeletableItemList; 6 const DeletableItemList = options.DeletableItemList;
7 const DeletableItem = options.DeletableItem; 7 const DeletableItem = options.DeletableItem;
8 const ArrayDataModel = cr.ui.ArrayDataModel; 8 const ArrayDataModel = cr.ui.ArrayDataModel;
9 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 9 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
10 10
11 // This structure maps the various cookie type names from C++ (hence the 11 // This structure maps the various cookie type names from C++ (hence the
12 // underscores) to arrays of the different types of data each has, along with 12 // underscores) to arrays of the different types of data each has, along with
13 // the i18n name for the description of that data type. 13 // the i18n name for the description of that data type.
14 const cookieInfo = { 14 const cookieInfo = {
15 'cookie': [ ['name', 'label_cookie_name'], 15 'cookie': [['name', 'label_cookie_name'],
16 ['content', 'label_cookie_content'], 16 ['content', 'label_cookie_content'],
17 ['domain', 'label_cookie_domain'], 17 ['domain', 'label_cookie_domain'],
18 ['path', 'label_cookie_path'], 18 ['path', 'label_cookie_path'],
19 ['sendfor', 'label_cookie_send_for'], 19 ['sendfor', 'label_cookie_send_for'],
20 ['accessibleToScript', 'label_cookie_accessible_to_script'], 20 ['accessibleToScript', 'label_cookie_accessible_to_script'],
21 ['created', 'label_cookie_created'], 21 ['created', 'label_cookie_created'],
22 ['expires', 'label_cookie_expires'] ], 22 ['expires', 'label_cookie_expires']],
23 'app_cache': [ ['manifest', 'label_app_cache_manifest'], 23 'app_cache': [['manifest', 'label_app_cache_manifest'],
24 ['size', 'label_local_storage_size'],
25 ['created', 'label_cookie_created'],
26 ['accessed', 'label_cookie_last_accessed'] ],
27 'database': [ ['name', 'label_cookie_name'],
28 ['desc', 'label_webdb_desc'],
29 ['size', 'label_local_storage_size'], 24 ['size', 'label_local_storage_size'],
30 ['modified', 'label_local_storage_last_modified'] ], 25 ['created', 'label_cookie_created'],
31 'local_storage': [ ['origin', 'label_local_storage_origin'], 26 ['accessed', 'label_cookie_last_accessed']],
32 ['size', 'label_local_storage_size'], 27 'database': [['name', 'label_cookie_name'],
33 ['modified', 'label_local_storage_last_modified'] ], 28 ['desc', 'label_webdb_desc'],
34 'indexed_db': [ ['origin', 'label_indexed_db_origin'], 29 ['size', 'label_local_storage_size'],
35 ['size', 'label_indexed_db_size'], 30 ['modified', 'label_local_storage_last_modified']],
36 ['modified', 'label_indexed_db_last_modified'] ], 31 'local_storage': [['origin', 'label_local_storage_origin'],
37 'file_system': [ ['origin', 'label_file_system_origin'], 32 ['size', 'label_local_storage_size'],
38 ['persistent', 'label_file_system_persistent_usage' ], 33 ['modified', 'label_local_storage_last_modified']],
39 ['temporary', 'label_file_system_temporary_usage' ] ], 34 'indexed_db': [['origin', 'label_indexed_db_origin'],
35 ['size', 'label_indexed_db_size'],
36 ['modified', 'label_indexed_db_last_modified']],
37 'file_system': [['origin', 'label_file_system_origin'],
38 ['persistent', 'label_file_system_persistent_usage'],
39 ['temporary', 'label_file_system_temporary_usage']],
40 }; 40 };
41 41
42 const localStrings = new LocalStrings(); 42 const localStrings = new LocalStrings();
43 43
44 /** 44 /**
45 * Returns the item's height, like offsetHeight but such that it works better 45 * Returns the item's height, like offsetHeight but such that it works better
46 * when the page is zoomed. See the similar calculation in @{code cr.ui.List}. 46 * when the page is zoomed. See the similar calculation in @{code cr.ui.List}.
47 * This version also accounts for the animation done in this file. 47 * This version also accounts for the animation done in this file.
48 * @param {Element} item The item to get the height of. 48 * @param {Element} item The item to get the height of.
49 * @return {number} The height of the item, calculated with zooming in mind. 49 * @return {number} The height of the item, calculated with zooming in mind.
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 parent.clear(); 846 parent.clear();
847 this.addByParent_(parent, 0, children); 847 this.addByParent_(parent, 0, children);
848 parent.endBatchUpdates(); 848 parent.endBatchUpdates();
849 }, 849 },
850 }; 850 };
851 851
852 return { 852 return {
853 CookiesList: CookiesList 853 CookiesList: CookiesList
854 }; 854 };
855 }); 855 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/controlled_setting.js ('k') | chrome/browser/resources/options2/cookies_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698