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 { | |
|
Ken Rockot(use gerrit already)
2017/03/22 14:41:44
Yeah, please don't use enums for bitfields. There'
ftirelo
2017/03/22 17:37:37
I like this idea! Thanks!
| |
| 9 UNSPECIFIED = 0, | |
| 10 ADS_INJECTOR = 1, | |
| 11 SETTINGS_HIJACKER = 2, | |
| 12 EXTENSION_INJECTOR = 4, | |
| 13 DROPPER = 8, | |
| 14 // Next tag: 16. | |
| 15 }; | |
| 16 | |
| 17 // Information about removable Unwanted Software matched by the Software | |
| 18 // Reporter to be shown in the Chrome prompt. | |
| 19 struct UwS { | |
| 20 // The id of this unwanted software. | |
| 21 int32 id; | |
| 22 | |
| 23 // The name of this unwanted software. | |
| 24 string name; | |
| 25 | |
| 26 // List of behaviors to be presented to the user represented as a bit field | |
| 27 // of ObservedBehaviour. | |
| 28 uint64 observed_behaviours; | |
| 29 | |
| 30 // List of fully-qualified paths of the files that will be deleted by the | |
| 31 // Chrome Cleanup Tool for this unwanted software. | |
| 32 array<string> files_to_delete; | |
| 33 }; | |
| 34 | |
| 35 [Extensible] | |
| 36 enum PromptAcceptance { | |
| 37 UNSPECIFIED = 0, | |
| 38 // The Chrome prompt was not shown to the user (for example, due to an | |
| 39 // experiment run that shouldn't prompt the user or because the user has | |
| 40 // been prompted recently). | |
| 41 NOT_SHOWN = 1, | |
| 42 // The user explicitly accepted the Chrome prompt, but didn't opt into | |
| 43 // uploading logs to Google. | |
| 44 ACCEPTED_WITHOUT_LOGS = 2, | |
| 45 // The user explicitly accepted the Chrome prompt and also opted into | |
| 46 // uploading logs to Google. | |
| 47 ACCEPTED_WITH_LOGS = 3, | |
| 48 // The user explicitly denied the Chrome prompt. | |
| 49 DENIED = 4, | |
| 50 // The user didn't interact with the Chrome prompt after a while. | |
| 51 IGNORED = 5, | |
| 52 }; | |
| 53 | |
| 54 // Service provided by Chrome to prompt the user to run the Chrome Cleanup Tool | |
| 55 // if unwanted software is detected on the system. This service is used by the | |
| 56 // Software Reporter Tool so that all user interaction is provided by Chrome. | |
| 57 interface ChromePrompt { | |
| 58 // Params: | |
| 59 // - removable_uws_found: the list of UwS detected by the reporter; | |
| 60 // - elevation_required: if the cleaner will need to run in elevated mode. | |
| 61 // Returns: | |
| 62 // - prompt_acceptance: indicates if the user accepted the prompt; if the | |
| 63 // prompt is accepted, it also indicates if logs | |
| 64 // uploading is allowed. | |
| 65 PromptUser(array<UwS> removable_uws_found, bool elevation_required) | |
| 66 => (PromptAcceptance prompt_acceptance); | |
| 67 }; | |
| OLD | NEW |