| 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 cr.define('settings', function() { | 5 cr.define('settings', function() { |
| 6 /** @interface */ | 6 /** @interface */ |
| 7 function ResetBrowserProxy() {} | 7 function ResetBrowserProxy() {} |
| 8 | 8 |
| 9 ResetBrowserProxy.prototype = { | 9 ResetBrowserProxy.prototype = { |
| 10 /** | 10 /** |
| 11 * @param {boolean} sendSettings Whether the user gave consent to upload | 11 * @param {boolean} sendSettings Whether the user gave consent to upload |
| 12 * broken settings to Google for analysis. | 12 * broken settings to Google for analysis. |
| 13 * @param {string} requestOrigin The origin of the reset request. |
| 13 * @return {!Promise} A promise firing once resetting has completed. | 14 * @return {!Promise} A promise firing once resetting has completed. |
| 14 */ | 15 */ |
| 15 performResetProfileSettings: function(sendSettings) {}, | 16 performResetProfileSettings: function(sendSettings, requestOrigin) {}, |
| 16 | 17 |
| 17 /** | 18 /** |
| 18 * A method to be called when the reset profile dialog is hidden. | 19 * A method to be called when the reset profile dialog is hidden. |
| 19 */ | 20 */ |
| 20 onHideResetProfileDialog: function() {}, | 21 onHideResetProfileDialog: function() {}, |
| 21 | 22 |
| 22 /** | 23 /** |
| 23 * A method to be called when the reset profile banner is hidden. | 24 * A method to be called when the reset profile banner is hidden. |
| 24 */ | 25 */ |
| 25 onHideResetProfileBanner: function() {}, | 26 onHideResetProfileBanner: function() {}, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 58 |
| 58 /** | 59 /** |
| 59 * @constructor | 60 * @constructor |
| 60 * @implements {settings.ResetBrowserProxy} | 61 * @implements {settings.ResetBrowserProxy} |
| 61 */ | 62 */ |
| 62 function ResetBrowserProxyImpl() {} | 63 function ResetBrowserProxyImpl() {} |
| 63 cr.addSingletonGetter(ResetBrowserProxyImpl); | 64 cr.addSingletonGetter(ResetBrowserProxyImpl); |
| 64 | 65 |
| 65 ResetBrowserProxyImpl.prototype = { | 66 ResetBrowserProxyImpl.prototype = { |
| 66 /** @override */ | 67 /** @override */ |
| 67 performResetProfileSettings: function(sendSettings) { | 68 performResetProfileSettings: function(sendSettings, requestOrigin) { |
| 68 return cr.sendWithPromise('performResetProfileSettings', sendSettings); | 69 return cr.sendWithPromise('performResetProfileSettings', |
| 70 sendSettings, requestOrigin); |
| 69 }, | 71 }, |
| 70 | 72 |
| 71 /** @override */ | 73 /** @override */ |
| 72 onHideResetProfileDialog: function() { | 74 onHideResetProfileDialog: function() { |
| 73 chrome.send('onHideResetProfileDialog'); | 75 chrome.send('onHideResetProfileDialog'); |
| 74 }, | 76 }, |
| 75 | 77 |
| 76 /** @override */ | 78 /** @override */ |
| 77 onHideResetProfileBanner: function() { | 79 onHideResetProfileBanner: function() { |
| 78 chrome.send('onHideResetProfileBanner'); | 80 chrome.send('onHideResetProfileBanner'); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 requestFactoryResetRestart: function() { | 114 requestFactoryResetRestart: function() { |
| 113 chrome.send('requestFactoryResetRestart'); | 115 chrome.send('requestFactoryResetRestart'); |
| 114 }, | 116 }, |
| 115 </if> | 117 </if> |
| 116 }; | 118 }; |
| 117 | 119 |
| 118 return { | 120 return { |
| 119 ResetBrowserProxyImpl: ResetBrowserProxyImpl, | 121 ResetBrowserProxyImpl: ResetBrowserProxyImpl, |
| 120 }; | 122 }; |
| 121 }); | 123 }); |
| OLD | NEW |