Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1497)

Side by Side Diff: extensions/common/extension_unpacker.mojom

Issue 2952353002: Extensions: Pass current channel and feature session type to extension unpack utility process. (Closed)
Patch Set: Use a single file to hold enum traits. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/common/extension_messages.cc ('k') | extensions/common/extension_unpacker.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Safe chrome extension unpacker service provided by the utility process 5 // Safe chrome extension unpacker service provided by the utility process
6 // and exposed by mojo policy to the chrome browser process. 6 // and exposed by mojo policy to the chrome browser process.
7 7
8 module extensions.mojom; 8 module extensions.mojom;
9 9
10 import "mojo/common/file_path.mojom"; 10 import "mojo/common/file_path.mojom";
11 import "mojo/common/string16.mojom"; 11 import "mojo/common/string16.mojom";
12 import "mojo/common/values.mojom"; 12 import "mojo/common/values.mojom";
13 13
14 interface ExtensionUnpacker { 14 interface ExtensionUnpacker {
15 // Unzip |file| into the directory |path|. 15 // Unzip |file| into the directory |path|.
16 Unzip(mojo.common.mojom.FilePath file, 16 Unzip(mojo.common.mojom.FilePath file,
17 mojo.common.mojom.FilePath path) => (bool success); 17 mojo.common.mojom.FilePath path) => (bool success);
18 18
19 // Unpack and sanitize the extension in directory |path|, and return its 19 // Unpack and sanitize the extension in directory |path|, and return its
20 // parsed manifest.json file in |manifest|. The supplied |location|, and 20 // parsed manifest.json file in |manifest|. The supplied |location|, and
21 // and the |creation_flags| defined by Extension::InitFromValueFlags are 21 // and the |creation_flags| defined by Extension::InitFromValueFlags are
22 // passed into Extension::Create() when unpacking the extension. Decoded 22 // passed into Extension::Create() when unpacking the extension. Decoded
23 // image and message catalog data from the extension is written to files 23 // image and message catalog data from the extension is written to files
24 // kDecodedImagesFilename and kDecodedMessageCatalogsFilename in |path|. 24 // kDecodedImagesFilename and kDecodedMessageCatalogsFilename in |path|.
25 // If Unpack() fails for any reason, |error| contains a user-displayable 25 // If Unpack() fails for any reason, |error| contains a user-displayable
26 // explanation of what went wrong. 26 // explanation of what went wrong.
27 Unpack(mojo.common.mojom.FilePath path, 27 // |channel| and |type| are needed to initialize the global state of the
28 // extension system, which is needed while creating the Extension object.
29 Unpack(FeatureChannel channel,
30 FeatureSessionType type,
31 mojo.common.mojom.FilePath path,
28 string extension_id, 32 string extension_id,
29 ManifestLocation location, 33 ManifestLocation location,
30 int32 creation_flags) 34 int32 creation_flags)
31 => (mojo.common.mojom.String16 error, 35 => (mojo.common.mojom.String16 error,
32 mojo.common.mojom.DictionaryValue? manifest); 36 mojo.common.mojom.DictionaryValue? manifest);
33 }; 37 };
34 38
35 [Native] 39 [Native]
36 enum ManifestLocation; 40 enum ManifestLocation;
41
42 [Native]
43 enum FeatureChannel;
44
45 [Native]
46 enum FeatureSessionType;
OLDNEW
« no previous file with comments | « extensions/common/extension_messages.cc ('k') | extensions/common/extension_unpacker.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698