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

Side by Side Diff: chrome/browser/resources/md_bookmarks/util.js

Issue 2774233006: [MD Bookmarks] Change selection items from Map to Set. (Closed)
Patch Set: rebase Created 3 years, 8 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 Utility functions for the Bookmarks page. 6 * @fileoverview Utility functions for the Bookmarks page.
7 */ 7 */
8 8
9 cr.define('bookmarks.util', function() { 9 cr.define('bookmarks.util', function() {
10 /** 10 /**
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 return nodeList; 49 return nodeList;
50 } 50 }
51 51
52 /** @return {!BookmarksPageState} */ 52 /** @return {!BookmarksPageState} */
53 function createEmptyState() { 53 function createEmptyState() {
54 return { 54 return {
55 nodes: {}, 55 nodes: {},
56 selectedFolder: '0', 56 selectedFolder: '0',
57 closedFolders: {}, 57 closedFolders: new Set(),
58 search: { 58 search: {
59 term: '', 59 term: '',
60 inProgress: false, 60 inProgress: false,
61 results: [], 61 results: [],
62 }, 62 },
63 selection: { 63 selection: {
64 items: {}, 64 items: new Set(),
65 anchor: null, 65 anchor: null,
66 }, 66 },
67 }; 67 };
68 } 68 }
69 69
70 /** 70 /**
71 * @param {BookmarksPageState} state 71 * @param {BookmarksPageState} state
72 * @return boolean 72 * @return boolean
73 */ 73 */
74 function isShowingSearch(state) { 74 function isShowingSearch(state) {
(...skipping 15 matching lines...) Expand all
90 } 90 }
91 91
92 return { 92 return {
93 createEmptyState: createEmptyState, 93 createEmptyState: createEmptyState,
94 getDisplayedList: getDisplayedList, 94 getDisplayedList: getDisplayedList,
95 hasChildFolders: hasChildFolders, 95 hasChildFolders: hasChildFolders,
96 isShowingSearch: isShowingSearch, 96 isShowingSearch: isShowingSearch,
97 normalizeNodes: normalizeNodes, 97 normalizeNodes: normalizeNodes,
98 }; 98 };
99 }); 99 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/types.js ('k') | chrome/test/data/webui/md_bookmarks/app_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698