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

Side by Side Diff: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js

Issue 2504723003: Add Bookmarks.BookmarksInFolder histogram to bookmark manager. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // TODO(arv): Now that this is driven by a data model, implement a data model 5 // TODO(arv): Now that this is driven by a data model, implement a data model
6 // that handles the loading and the events from the bookmark backend. 6 // that handles the loading and the events from the bookmark backend.
7 7
8 /** 8 /**
9 * @typedef {{childIds: Array<string>}} 9 * @typedef {{childIds: Array<string>}}
10 * 10 *
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Failed to load bookmarks. Most likely due to the bookmark being 142 // Failed to load bookmarks. Most likely due to the bookmark being
143 // removed. 143 // removed.
144 cr.dispatchSimpleEvent(this, 'invalidId'); 144 cr.dispatchSimpleEvent(this, 'invalidId');
145 return; 145 return;
146 } 146 }
147 147
148 this.dataModel = new BookmarksArrayDataModel(items); 148 this.dataModel = new BookmarksArrayDataModel(items);
149 149
150 this.fixWidth_(); 150 this.fixWidth_();
151 cr.dispatchSimpleEvent(this, 'load'); 151 cr.dispatchSimpleEvent(this, 'load');
152 chrome.metricsPrivate.recordValue({
153 'metricName': 'Bookmarks.BookmarksInFolder',
154 'type': chrome.metricsPrivate.MetricTypeType.HISTOGRAM_LOG,
155 'min': 0,
156 'max': 200,
Dan Beam 2016/11/16 01:26:51 wait, why a max of 200?
Alexei Svitkine (slow) 2016/11/16 01:34:09 Suggest using equivalent of UMA_HISTOGRAM_COUNTS_1
calamity 2016/11/16 01:57:46 Done.
157 'buckets': 10
158 }, this.dataModel.length);
159 console.log(this.dataModel.length);
Dan Beam 2016/11/16 01:26:51 nit: remove the log()
calamity 2016/11/16 01:57:46 Done.
152 }, 160 },
153 161
154 /** 162 /**
155 * The bookmark node that the list is currently displaying. If we are 163 * The bookmark node that the list is currently displaying. If we are
156 * currently displaying search this returns null. 164 * currently displaying search this returns null.
157 * @type {BookmarkTreeNode} 165 * @type {BookmarkTreeNode}
158 */ 166 */
159 get bookmarkNode() { 167 get bookmarkNode() {
160 if (this.isSearch()) 168 if (this.isSearch())
161 return null; 169 return null;
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 648 }
641 } 649 }
642 } 650 }
643 }; 651 };
644 652
645 return { 653 return {
646 BookmarkList: BookmarkList, 654 BookmarkList: BookmarkList,
647 list: /** @type {Element} */(null), // Set when decorated. 655 list: /** @type {Element} */(null), // Set when decorated.
648 }; 656 };
649 }); 657 });
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698