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

Side by Side Diff: chrome/browser/resources/md_history/browser_service.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 /** 5 /**
6 * @fileoverview Defines a singleton object, md_history.BrowserService, which 6 * @fileoverview Defines a singleton object, md_history.BrowserService, which
7 * provides access to chrome.send APIs. 7 * provides access to chrome.send APIs.
8 */ 8 */
9 9
10 cr.define('md_history', function() { 10 cr.define('md_history', function() {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 */ 74 */
75 deleteForeignSession: function(sessionTag) { 75 deleteForeignSession: function(sessionTag) {
76 chrome.send('deleteForeignSession', [sessionTag]); 76 chrome.send('deleteForeignSession', [sessionTag]);
77 }, 77 },
78 78
79 openClearBrowsingData: function() { 79 openClearBrowsingData: function() {
80 chrome.send('clearBrowsingData'); 80 chrome.send('clearBrowsingData');
81 }, 81 },
82 82
83 /** 83 /**
84 * @param {Array} args
85 */
86 recordAction: function(args) {
87 chrome.send('metricsHandler:recordAction', args);
tsergeant 2016/08/15 07:05:17 Replace args with a single argument for the action
calamity 2016/08/17 03:15:28 Done.
88 },
89
90 /**
91 * @param {Array} args
92 */
93 recordHistogram: function(args) {
94 chrome.send('metricsHandler:recordInHistogram', args);
tsergeant 2016/08/15 07:05:17 As above, use specific arguments here rather than
calamity 2016/08/17 03:15:29 Done.
95 },
96
97 /**
84 * @param {boolean} successful 98 * @param {boolean} successful
85 * @private 99 * @private
86 */ 100 */
87 resolveDelete_: function(successful) { 101 resolveDelete_: function(successful) {
88 if (this.pendingDeleteItems_ == null || 102 if (this.pendingDeleteItems_ == null ||
89 this.pendingDeletePromise_ == null) { 103 this.pendingDeletePromise_ == null) {
90 return; 104 return;
91 } 105 }
92 106
93 if (successful) 107 if (successful)
(...skipping 18 matching lines...) Expand all
112 md_history.BrowserService.getInstance().resolveDelete_(true); 126 md_history.BrowserService.getInstance().resolveDelete_(true);
113 } 127 }
114 128
115 /** 129 /**
116 * Called by the history backend when the deletion failed. 130 * Called by the history backend when the deletion failed.
117 */ 131 */
118 function deleteFailed() { 132 function deleteFailed() {
119 md_history.BrowserService.getInstance().resolveDelete_(false); 133 md_history.BrowserService.getInstance().resolveDelete_(false);
120 } 134 }
121 135
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698