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

Unified Diff: chrome/utility/extensions/extensions_handler.cc

Issue 864093002: Move sandboxed_unpacker.{h,cc} from chrome/ to extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile errors Created 5 years, 11 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 | « chrome/utility/extensions/extensions_handler.h ('k') | extensions/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/extensions/extensions_handler.cc
diff --git a/chrome/utility/extensions/extensions_handler.cc b/chrome/utility/extensions/extensions_handler.cc
index 06d83c011380ef89f5575f28a5973a891d40b70b..72930f55b18c1843e187a1d38aa634ce396c419d 100644
--- a/chrome/utility/extensions/extensions_handler.cc
+++ b/chrome/utility/extensions/extensions_handler.cc
@@ -17,7 +17,6 @@
#include "extensions/common/extension.h"
#include "extensions/common/extension_l10n_util.h"
#include "extensions/common/extension_utility_messages.h"
-#include "extensions/common/manifest.h"
#include "extensions/utility/unpacker.h"
#include "media/base/media.h"
#include "media/base/media_file_checker.h"
@@ -59,6 +58,7 @@ const char kExtensionHandlerUnzipError[] =
} // namespace
ExtensionsHandler::ExtensionsHandler() {
+ ExtensionsClient::Set(ChromeExtensionsClient::GetInstance());
}
ExtensionsHandler::~ExtensionsHandler() {
@@ -76,15 +76,9 @@ void ExtensionsHandler::PreSandboxStartup() {
media::InitializeMediaLibrary(media_path);
}
-// static
-void ExtensionsHandler::UtilityThreadStarted() {
- UtilityHandler::UtilityThreadStarted();
-}
-
bool ExtensionsHandler::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ExtensionsHandler, message)
- IPC_MESSAGE_HANDLER(ChromeUtilityMsg_UnpackExtension, OnUnpackExtension)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_UnzipToDir, OnUnzipToDir)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_DecodeImageBase64, OnDecodeImageBase64)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_CheckMediaFile, OnCheckMediaFile)
@@ -117,30 +111,6 @@ bool ExtensionsHandler::OnMessageReceived(const IPC::Message& message) {
return handled || utility_handler_.OnMessageReceived(message);
}
-void ExtensionsHandler::OnUnpackExtension(
- const base::FilePath& extension_path,
- const std::string& extension_id,
- int location,
- int creation_flags) {
- CHECK_GT(location, Manifest::INVALID_LOCATION);
- CHECK_LT(location, Manifest::NUM_LOCATIONS);
- ExtensionsClient::Set(ChromeExtensionsClient::GetInstance());
- Unpacker unpacker(extension_path,
- extension_id,
- static_cast<Manifest::Location>(location),
- creation_flags);
- if (unpacker.Run() && unpacker.DumpImagesToFile() &&
- unpacker.DumpMessageCatalogsToFile()) {
- Send(new ChromeUtilityHostMsg_UnpackExtension_Succeeded(
- *unpacker.parsed_manifest()));
- } else {
- Send(new ChromeUtilityHostMsg_UnpackExtension_Failed(
- unpacker.error_message()));
- }
-
- ReleaseProcessIfNeeded();
-}
-
void ExtensionsHandler::OnUnzipToDir(const base::FilePath& zip_path,
const base::FilePath& dir) {
if (!zip::Unzip(zip_path, dir)) {
« no previous file with comments | « chrome/utility/extensions/extensions_handler.h ('k') | extensions/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698