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

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: fix_test 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 {string} histogram
85 * @param {number} value
86 * @param {number} max
87 */
88 recordHistogram: function(histogram, value, max) {
89 chrome.send('metricsHandler:recordInHistogram', [histogram, value, max]);
90 },
91
92 /**
84 * Record an action in UMA. 93 * Record an action in UMA.
85 * @param {string} actionDesc The name of the action to be logged. 94 * @param {string} actionDesc The name of the action to be logged.
86 */ 95 */
87 recordAction: function(actionDesc) { 96 recordAction: function(actionDesc) {
88 chrome.send('metricsHandler:recordAction', [actionDesc]); 97 chrome.send('metricsHandler:recordAction', [actionDesc]);
89 }, 98 },
90 99
91 /** 100 /**
92 * @param {boolean} successful 101 * @param {boolean} successful
93 * @private 102 * @private
(...skipping 26 matching lines...) Expand all
120 md_history.BrowserService.getInstance().resolveDelete_(true); 129 md_history.BrowserService.getInstance().resolveDelete_(true);
121 } 130 }
122 131
123 /** 132 /**
124 * Called by the history backend when the deletion failed. 133 * Called by the history backend when the deletion failed.
125 */ 134 */
126 function deleteFailed() { 135 function deleteFailed() {
127 md_history.BrowserService.getInstance().resolveDelete_(false); 136 md_history.BrowserService.getInstance().resolveDelete_(false);
128 } 137 }
129 138
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/app.vulcanized.html ('k') | chrome/browser/resources/md_history/constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698