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

Side by Side Diff: chrome/browser/resources/md_history/side_bar.js

Issue 2238163002: [MD History] Add UMA stats for switching views and the CBD button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@start_focus_in_search_bar
Patch Set: add test, add grouped history Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer({ 5 Polymer({
6 is: 'history-side-bar', 6 is: 'history-side-bar',
7 7
8 properties: { 8 properties: {
9 selectedPage: { 9 selectedPage:
10 type: String, 10 {type: String, notify: true},
tsergeant 2016/08/15 07:05:17 No need for a newline here
calamity 2016/08/17 03:15:29 Done.
11 notify: true
12 },
13 11
14 route: Object, 12 route: Object,
15 13
16 showFooter: Boolean, 14 showFooter: Boolean,
17 15
18 // If true, the sidebar is contained within an app-drawer. 16 // If true, the sidebar is contained within an app-drawer.
19 drawer: { 17 drawer: {type: Boolean, reflectToAttribute: true},
20 type: Boolean,
21 reflectToAttribute: true
22 },
23 }, 18 },
24 19
25 /** @private */ 20 /**
26 onSelectorActivate_: function() { 21 * @param {Event} e
22 * @private
23 */
24 onSelectorActivate_: function(e) {
tsergeant 2016/08/15 07:05:18 No need to add the e parameter here.
calamity 2016/08/17 03:15:29 Done.
27 this.fire('history-close-drawer'); 25 this.fire('history-close-drawer');
28 }, 26 },
29 27
30 /** 28 /**
31 * Relocates the user to the clear browsing data section of the settings page. 29 * Relocates the user to the clear browsing data section of the settings page.
32 * @param {Event} e 30 * @param {Event} e
33 * @private 31 * @private
34 */ 32 */
35 onClearBrowsingDataTap_: function(e) { 33 onClearBrowsingDataTap_: function(e) {
34 md_history.BrowserService.getInstance().recordAction(
35 ['HistoryPage_InitClearBrowsingData']);
36 md_history.BrowserService.getInstance().openClearBrowsingData(); 36 md_history.BrowserService.getInstance().openClearBrowsingData();
37 e.preventDefault(); 37 e.preventDefault();
38 }, 38 },
39 39
40 /** 40 /**
41 * @param {Object} route 41 * @param {Object} route
42 * @private 42 * @private
43 */ 43 */
44 getQueryString_: function(route) { 44 getQueryString_: function(route) { return window.location.search; }
45 return window.location.search;
46 }
47 }); 45 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698