| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |