Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * @fileoverview Helper object and related behavior that encapsulate messaging | |
| 7 * between JS and C++ for interacting with the Chrome Cleanup Tool. | |
| 8 */ | |
| 9 | |
| 10 /** | |
| 11 * @typedef {{ | |
| 12 * hasScanResults: boolean Whether there are existing scan results. | |
| 13 * isInfected: boolean Whether the last scan found a program that the Chrome | |
| 14 * Cleanup Tool can remove, | |
|
Fabio Tirelo
2017/03/30 19:25:45
Nit: period at the end of each item?
| |
| 15 * detectionStatusText: string A pluralized and localized string summarizing | |
| 16 * the scan results, | |
| 17 * detectionTimeText: string A pluralized and localized string summarizing | |
| 18 * when the last scan took place | |
| 19 * }}; | |
| 20 */ | |
| 21 var LastScanResult; | |
| 22 | |
| 23 cr.define('cleanup', function() { | |
| 24 /** @interface */ | |
| 25 function CleanupBrowserProxy() {} | |
| 26 | |
| 27 CleanupBrowserProxy.prototype = { | |
| 28 /** | |
| 29 * Fetch the result of the latest Chrome Cleanup Tool scanning task. | |
| 30 * @return {!Promise<LastScanResult>} | |
| 31 */ | |
| 32 requestLastScanResult: function() {}, | |
| 33 }; | |
| 34 | |
| 35 /** | |
| 36 * @constructor | |
| 37 * @implements {cleanup.CleanupBrowserProxy} | |
| 38 */ | |
| 39 function CleanupBrowserProxyImpl() {} | |
| 40 cr.addSingletonGetter(CleanupBrowserProxyImpl); | |
| 41 | |
| 42 CleanupBrowserProxyImpl.prototype = { | |
| 43 /** @override */ | |
| 44 requestLastScanResult: function() { | |
| 45 return cr.sendWithPromise('requestLastScanResult'); | |
| 46 }, | |
| 47 }; | |
| 48 | |
| 49 return { | |
| 50 CleanupBrowserProxy: CleanupBrowserProxy, | |
| 51 CleanupBrowserProxyImpl: CleanupBrowserProxyImpl, | |
| 52 } | |
| 53 }); | |
| OLD | NEW |