OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All Rights Reserved. | 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 | 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 module chrome_cleaner.mojom; | 5 module chrome_cleaner.mojom; |
6 | 6 |
7 import "mojo/common/file_path.mojom"; | 7 // IMPORTANT NOTE: Avoid adding dependencies to typemapped .mojom files. |
| 8 // Enabling typemaps currently (as of July 2017) requires indirectly depending |
| 9 // on all existing typemap definitions. The Chrome Cleaner is built |
| 10 // independently from Chromium and would like to avoid these dependencies. |
| 11 |
| 12 // Once it's possible to specify a limited subset of typemaps to use, be |
| 13 // careful not to add dependencies to [Native] mojo structures. The wire format |
| 14 // for [Native] structs is not guaranteed to be consistent between versions. |
8 | 15 |
9 [Extensible] | 16 [Extensible] |
10 enum PromptAcceptance { | 17 enum PromptAcceptance { |
11 UNSPECIFIED = 0, | 18 UNSPECIFIED = 0, |
12 // The Chrome prompt was not shown to the user (for example, due to an | 19 // The Chrome prompt was not shown to the user (for example, due to an |
13 // experiment run that shouldn't prompt the user or because the user has | 20 // experiment run that shouldn't prompt the user or because the user has |
14 // been prompted recently). | 21 // been prompted recently). |
15 NOT_SHOWN = 1, | 22 NOT_SHOWN = 1, |
16 // The user explicitly accepted the Chrome prompt. | 23 // The user explicitly accepted the Chrome prompt. |
17 ACCEPTED = 2, | 24 ACCEPTED = 2, |
18 // The user explicitly denied the Chrome prompt. | 25 // The user explicitly denied the Chrome prompt. |
19 DENIED = 3, | 26 DENIED = 3, |
20 // The user didn't interact with the Chrome prompt after a while. | 27 // The user didn't interact with the Chrome prompt after a while. |
21 IGNORED = 4, | 28 IGNORED = 4, |
22 }; | 29 }; |
23 | 30 |
| 31 struct FilePath { |
| 32 array<uint16> value; |
| 33 }; |
| 34 |
24 // Service provided by Chrome to prompt the user to start a cleanup if the | 35 // Service provided by Chrome to prompt the user to start a cleanup if the |
25 // Chrome Cleanup Tool detects unwanted software on the system. | 36 // Chrome Cleanup Tool detects unwanted software on the system. |
26 interface ChromePrompt { | 37 interface ChromePrompt { |
27 // Params: | 38 // Params: |
28 // - removable_uws_found: list of fully-qualified paths of the files that | 39 // - removable_uws_found: list of fully-qualified paths of the files that |
29 // will be deleted by the Chrome Cleanup Tool. | 40 // will be deleted by the Chrome Cleanup Tool. |
30 // Returns: | 41 // Returns: |
31 // - prompt_acceptance: indicates if the user accepted the prompt. | 42 // - prompt_acceptance: indicates if the user accepted the prompt. |
32 PromptUser(array<mojo.common.mojom.FilePath> files_to_delete) | 43 PromptUser(array<FilePath> files_to_delete) |
33 => (PromptAcceptance prompt_acceptance); | 44 => (PromptAcceptance prompt_acceptance); |
34 }; | 45 }; |
OLD | NEW |