| // Copyright 2018 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module chrome_cleaner.mojom; |
| |
| import "chrome/chrome_cleaner/mojom/wstring.mojom"; |
| import "mojo/public/mojom/base/values.mojom"; |
| |
| enum LnkParsingResult { |
| BAD_FORMAT, |
| INVALID_HANDLE, |
| INVALID_LNK_FILE_SIZE, |
| LNK_TO_NETWORK_LOCATION, |
| NO_LINK_INFO_STRUCTURE, |
| READING_ERROR, |
| NOT_STARTED, |
| SUCCESS |
| }; |
| |
| // Common interface for the parsers used on the Chrome Cleanup Tool. |
| interface Parser { |
| // LNK Shortcut Parser: |
| // Passes a handle to a lnk file to a sanbox environment where it will be |
| // attempted to be parsed, extracting the executable target path and the |
| // command line arguments. |
| ParseShortcut(handle<platform> lkn_file_handle) |
| => (LnkParsingResult parsing_result, WString? target_path, |
| WString? command_line_arguments, |
| WString? icon_location); |
| |
| // JSON parser: |
| // Interface copied from services/data_decoder/public/mojom/json_parser.mojom, |
| // which can't be used directly because it's closely tied to the service |
| // manager which chrome_cleaner does not support. |
| // |
| // Sends a JSON string to parse from the high-privilege sandbox broker process |
| // to a locked down sandbox target process where the parsing takes place. |
| ParseJson(string json) => (mojo_base.mojom.Value? result, string? error); |
| }; |