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

Unified Diff: extensions/common/extension_unpacker.mojom

Issue 2697463002: Convert utility process extension Unpacker IPC to mojo (Closed)
Patch Set: Set the IPC enum traits limit to extensions::Manifest::NUM_LOCATIONS - 1. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/extension_messages.cc ('k') | extensions/common/extension_utility_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_unpacker.mojom
diff --git a/extensions/common/extension_unpacker.mojom b/extensions/common/extension_unpacker.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..c2321c543887fa22eec0c46d0b57c30834b89abb
--- /dev/null
+++ b/extensions/common/extension_unpacker.mojom
@@ -0,0 +1,36 @@
+// Copyright 2017 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.
+
+// Safe chrome extension unpacker service provided by the utility process
+// and exposed by mojo policy to the chrome browser process.
+
+module extensions.mojom;
+
+import "mojo/common/file_path.mojom";
+import "mojo/common/string16.mojom";
+import "mojo/common/values.mojom";
+
+interface ExtensionUnpacker {
+ // Unzip |file| into the directory |path|.
+ Unzip(mojo.common.mojom.FilePath file,
+ mojo.common.mojom.FilePath path) => (bool success);
+
+ // Unpack and sanitize the extension in directory |path|, and return its
+ // parsed manifest.json file in |manifest|. The supplied |location|, and
+ // and the |creation_flags| defined by Extension::InitFromValueFlags are
+ // passed into Extension::Create() when unpacking the extension. Decoded
+ // image and message catalog data from the extension is written to files
+ // kDecodedImagesFilename and kDecodedMessageCatalogsFilename in |path|.
+ // If Unpack() fails for any reason, |error| contains a user-displayable
+ // explanation of what went wrong.
+ Unpack(mojo.common.mojom.FilePath path,
+ string extension_id,
+ ManifestLocation location,
+ int32 creation_flags)
+ => (mojo.common.mojom.String16 error,
+ mojo.common.mojom.DictionaryValue? manifest);
+};
+
+[Native]
+enum ManifestLocation;
« no previous file with comments | « extensions/common/extension_messages.cc ('k') | extensions/common/extension_utility_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698