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

Unified Diff: extensions/common/extension_utility_messages.h

Issue 2697463002: Convert utility process extension Unpacker IPC to mojo (Closed)
Patch Set: Take #4, declare the IPC enum traits in the message file, try build fix. 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
Index: extensions/common/extension_utility_messages.h
diff --git a/extensions/common/extension_utility_messages.h b/extensions/common/extension_utility_messages.h
index 363392f729fab9d3d7958d1aea540abe414e3bec..5773283a9782b5b2608623b298b159f96b9aa1e6 100644
--- a/extensions/common/extension_utility_messages.h
+++ b/extensions/common/extension_utility_messages.h
@@ -5,22 +5,18 @@
// Multiply-included message file, so no include guard.
#include <string>
-#include <tuple>
+#include "extensions/common/manifest.h"
#include "extensions/common/update_manifest.h"
#include "ipc/ipc_message_macros.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
+#include "ipc/param_traits_macros.h"
#include "url/ipc/url_param_traits.h"
#define IPC_MESSAGE_START ExtensionUtilityMsgStart
-#ifndef EXTENSIONS_COMMON_EXTENSION_UTILITY_MESSAGES_H_
-#define EXTENSIONS_COMMON_EXTENSION_UTILITY_MESSAGES_H_
-
-using DecodedImages = std::vector<std::tuple<SkBitmap, base::FilePath>>;
-
-#endif // EXTENSIONS_COMMON_EXTENSION_UTILITY_MESSAGES_H_
+IPC_ENUM_TRAITS_MIN_MAX_VALUE(extensions::Manifest::Location,
+ extensions::Manifest::INVALID_LOCATION,
+ extensions::Manifest::NUM_LOCATIONS)
dcheng 2017/03/10 02:51:04 Also, this should be NUM_LOCATIONS - 1, since NUM_
IPC_STRUCT_TRAITS_BEGIN(UpdateManifest::Result)
IPC_STRUCT_TRAITS_MEMBER(extension_id)
@@ -43,20 +39,6 @@ IPC_STRUCT_TRAITS_END()
IPC_MESSAGE_CONTROL1(ExtensionUtilityMsg_ParseUpdateManifest,
std::string /* xml document contents */)
-// Tell the utility process to unzip the zipfile at a given path into a
-// directory at the second given path.
-IPC_MESSAGE_CONTROL2(ExtensionUtilityMsg_UnzipToDir,
- base::FilePath /* zip_file */,
- base::FilePath /* dir */)
-
-// Tells the utility process to validate and sanitize the extension in a
-// directory.
-IPC_MESSAGE_CONTROL4(ExtensionUtilityMsg_UnpackExtension,
- base::FilePath /* directory_path */,
- std::string /* extension_id */,
- int /* Manifest::Location */,
- int /* InitFromValue flags */)
-
//------------------------------------------------------------------------------
// Utility process host messages:
// These are messages from the utility process to the browser.
@@ -70,28 +52,3 @@ IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_ParseUpdateManifest_Succeeded,
// is a description of what went wrong suitable for logging.
IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_ParseUpdateManifest_Failed,
std::string /* error_message, if any */)
-
-// Reply when the utility process is done unzipping a file. |unpacked_path|
-// is the directory which contains the unzipped contents.
-IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_UnzipToDir_Succeeded,
- base::FilePath /* unpacked_path */)
-
-// Reply when the utility process failed to unzip a file. |error| contains
-// an error string to be reported to the user.
-IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_UnzipToDir_Failed,
- std::string /* error */)
-
-// Reply when the utility process is done unpacking an extension. |manifest|
-// is the parsed manifest.json file.
-// The unpacker should also have written out files containing the decoded
-// images and message catalogs from the extension. The data is written into a
-// DecodedImages struct into a file named kDecodedImagesFilename in the
-// directory that was passed in. This is done because the data is too large to
-// pass over IPC.
-IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_UnpackExtension_Succeeded,
- base::DictionaryValue /* manifest */)
-
-// Reply when the utility process has failed while unpacking an extension.
-// |error_message| is a user-displayable explanation of what went wrong.
-IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_UnpackExtension_Failed,
- base::string16 /* error_message, if any */)

Powered by Google App Engine
This is Rietveld 408576698