Chromium Code Reviews| Index: chrome/browser/resources/md_bookmarks/reducers.js |
| diff --git a/chrome/browser/resources/md_bookmarks/reducers.js b/chrome/browser/resources/md_bookmarks/reducers.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4a51fa49b420759855a215288109bdd585831f23 |
| --- /dev/null |
| +++ b/chrome/browser/resources/md_bookmarks/reducers.js |
| @@ -0,0 +1,28 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +/** |
| + * @fileoverview Module of functions which produce a new page state in response |
| + * to an action. Reducers (in the same sense as Array.prototype.reduce) must be |
| + * pure functions: they must not modify existing state objects, or make any API |
| + * calls. |
| + */ |
| + |
| +cr.define('bookmarks', function() { |
| + |
|
michaelpg
2017/03/02 09:30:35
nit: remove blank line
tsergeant
2017/03/02 23:20:35
Done.
|
| + /** |
| + * Root reducer for the Bookmarks page. This is called by the store in |
| + * response to an action, and the return value is used to update the UI. |
| + * @param {BookmarksPageState} state |
| + * @param {Action} action |
| + * @return {BookmarksPageState} |
| + */ |
| + function reduceAction(state, action) { |
| + return {}; |
| + } |
| + |
| + return { |
| + reduceAction: reduceAction, |
| + }; |
| +}); |