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 // Secure chrome extension unpacker service provided by the utility process |
| 6 // and exposed by mojo policy to the chrome browser process. |
| 7 |
| 8 module extensions.mojom; |
| 9 |
| 10 import "extensions/common/manifest_location.mojom"; |
| 11 import "mojo/common/file_path.mojom"; |
| 12 import "mojo/common/string16.mojom"; |
| 13 import "mojo/common/values.mojom"; |
| 14 |
| 15 interface ExtensionUnpacker { |
| 16 // Unzip |file| into the directory |path|. |
| 17 Unzip(mojo.common.mojom.FilePath file, |
| 18 mojo.common.mojom.FilePath path) => (bool success); |
| 19 |
| 20 // Unpack, validate, and sanitize the extension in directory |path|, and |
| 21 // return the parsed manifest.json in |manifest|. The supplied |location| |
| 22 // and |creation_flags| are passed to Extensions:Create(). |
| 23 // If unpacking fails, |error| is a user-displayable explanation of what |
| 24 // went wrong. |
| 25 Unpack(mojo.common.mojom.FilePath path, |
| 26 string extension_id, |
| 27 ManifestLocation location, |
| 28 int32 creation_flags) |
| 29 => (mojo.common.mojom.String16 error, |
| 30 mojo.common.mojom.DictionaryValue? manifest); |
| 31 }; |
OLD | NEW |