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

Unified Diff: chrome/browser/resources/md_bookmarks/item.js

Issue 2740863003: MD Bookmarks: Implement search and selection in new data flow system (Closed)
Patch Set: Review round 2 Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_bookmarks/item.js
diff --git a/chrome/browser/resources/md_bookmarks/item.js b/chrome/browser/resources/md_bookmarks/item.js
index 16a525ba02031a9c608cbe9bcca92dab58bb40d0..45ff2b6f76c836e5f2f7fa5f4e4711d54d41689c 100644
--- a/chrome/browser/resources/md_bookmarks/item.js
+++ b/chrome/browser/resources/md_bookmarks/item.js
@@ -12,7 +12,7 @@ Polymer({
properties: {
itemId: {
type: String,
- observer: 'updateFromStore',
+ observer: 'onItemIdChanged_',
},
/** @private {BookmarkNode} */
@@ -61,6 +61,14 @@ Polymer({
},
/** @private */
+ onItemIdChanged_: function() {
+ // TODO(tsergeant): Add a histogram to measure whether this assertion fails
+ // for real users.
+ assert(this.getState().nodes[this.itemId]);
+ this.updateFromStore();
+ },
+
+ /** @private */
onItemChanged_: function() {
this.isFolder_ = !(this.item_.url);
},
« no previous file with comments | « chrome/browser/resources/md_bookmarks/compiled_resources2.gyp ('k') | chrome/browser/resources/md_bookmarks/list.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698