| OLD | NEW |
| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 return nodeMap; | 64 return nodeMap; |
| 65 } | 65 } |
| 66 | 66 |
| 67 /** @return {!BookmarksPageState} */ | 67 /** @return {!BookmarksPageState} */ |
| 68 function createEmptyState() { | 68 function createEmptyState() { |
| 69 return { | 69 return { |
| 70 nodes: {}, | 70 nodes: {}, |
| 71 selectedFolder: '0', | 71 selectedFolder: '0', |
| 72 closedFolders: new Set(), | 72 closedFolders: new Set(), |
| 73 prefs: { |
| 74 incognitoAvailability: IncognitoAvailability.ENABLED, |
| 75 }, |
| 73 search: { | 76 search: { |
| 74 term: '', | 77 term: '', |
| 75 inProgress: false, | 78 inProgress: false, |
| 76 results: [], | 79 results: [], |
| 77 }, | 80 }, |
| 78 selection: { | 81 selection: { |
| 79 items: new Set(), | 82 items: new Set(), |
| 80 anchor: null, | 83 anchor: null, |
| 81 }, | 84 }, |
| 82 }; | 85 }; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 getDescendants: getDescendants, | 170 getDescendants: getDescendants, |
| 168 getDisplayedList: getDisplayedList, | 171 getDisplayedList: getDisplayedList, |
| 169 hasChildFolders: hasChildFolders, | 172 hasChildFolders: hasChildFolders, |
| 170 isShowingSearch: isShowingSearch, | 173 isShowingSearch: isShowingSearch, |
| 171 normalizeNode: normalizeNode, | 174 normalizeNode: normalizeNode, |
| 172 normalizeNodes: normalizeNodes, | 175 normalizeNodes: normalizeNodes, |
| 173 removeIdsFromMap: removeIdsFromMap, | 176 removeIdsFromMap: removeIdsFromMap, |
| 174 removeIdsFromSet: removeIdsFromSet, | 177 removeIdsFromSet: removeIdsFromSet, |
| 175 }; | 178 }; |
| 176 }); | 179 }); |
| OLD | NEW |