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 module chrome_cleaner.mojom; | |
| 6 | |
| 7 [Extensible] | |
| 8 enum ObservedBehaviour { | |
| 9 UNSPECIFIED = 0, | |
| 10 ADS_INJECTOR = 1, | |
| 11 SETTINGS_HIJACKER = 2, | |
| 12 BROWSER_HIJACKER = 3, | |
| 13 }; | |
| 14 | |
| 15 // Information about removable Unwanted Software matched by the Software | |
| 16 // Reporter to be shown in the Chrome prompt. | |
| 17 struct UwS { | |
| 18 // The id of this unwanted software. | |
| 19 int32 id; | |
| 20 | |
| 21 // The name of this unwanted software. | |
| 22 string name; | |
| 23 | |
| 24 // List of behaviors to be presented to the user. | |
| 25 array<ObservedBehaviour> observed_behaviours; | |
|
grt (UTC plus 2)
2017/03/22 13:48:14
is it easier for consumers of this api for this to
ftirelo
2017/03/22 14:25:36
It's not silly at all.
In the compiled code, a Mo
joenotcharles
2017/03/22 14:45:03
I'd prefer to keep the mojom interface as straight
ftirelo
2017/03/22 17:37:37
I'm taking up on Ken's suggestion of using a struc
| |
| 26 | |
| 27 // List of fully-qualified paths of the files that will be deleted by the | |
| 28 // Chrome Cleanup Tool for this unwanted software. | |
| 29 array<string> files_to_delete; | |
| 30 }; | |
| 31 | |
| 32 [Extensible] | |
| 33 enum PromptAcceptance { | |
| 34 UNSPECIFIED = 0, | |
| 35 // The Chrome prompt was not shown to the user (for example, due to an | |
| 36 // experiment run that shouldn't prompt the user or because the user has | |
| 37 // been prompted recently). | |
| 38 NOT_SHOWN = 1, | |
| 39 // The user explicitly accepted the Chrome prompt. | |
| 40 ACCEPTED = 2, | |
| 41 // The user explicitly denied the Chrome prompt. | |
| 42 DENIED = 3, | |
| 43 // The user didn't interact with the Chrome prompt after a while. | |
| 44 IGNORED = 4, | |
| 45 }; | |
| 46 | |
| 47 // Service provided by Chrome to prompt the user to run the Chrome Cleanup Tool | |
| 48 // if unwanted software is detected in the system. This service is used by the | |
|
grt (UTC plus 2)
2017/03/22 13:48:14
nit: "...on the system..." seems more natural to m
ftirelo
2017/03/22 14:25:36
Prepositions... Thanks for the correction :-)
| |
| 49 // Software Reporter Tool so that all user interaction is provided by Chrome. | |
| 50 interface ChromePrompt { | |
| 51 // Params: | |
| 52 // - removable_uws_found: the list of UwS detected by the reporter; | |
| 53 // - elevation_required: if the cleaner will need to run in elevated mode. | |
| 54 // Returns: | |
| 55 // - prompt_acceptance: indicates if the user accepted the prompt; | |
| 56 // - logs_uploading_enabled: if the user accepted the prompt, indicates if | |
|
grt (UTC plus 2)
2017/03/22 13:48:14
does it make sense for this to be removed and for
ftirelo
2017/03/22 14:25:36
It doesn't make sense to have logs uploading with
| |
| 57 // they also opted into or opted out of uploading | |
| 58 // logs. | |
| 59 PromptUser(array<UwS> removable_uws_found, bool elevation_required) | |
| 60 => (PromptAcceptance prompt_acceptance, | |
| 61 bool logs_uploading_enabled); | |
| 62 }; | |
| OLD | NEW |