From 902f7cd528743a286439cfca87266aa1b723a8bf Mon Sep 17 00:00:00 2001 From: "mpcomplete@google.com" Date: Fri, 22 May 2009 19:02:19 +0000 Subject: Have the browser process rewrite manifest.json and theme/page action images that the extension unpacker process parsed. BUG=11680 Review URL: http://codereview.chromium.org/115595 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16768 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/utility/utility_thread.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'chrome/utility') diff --git a/chrome/utility/utility_thread.cc b/chrome/utility/utility_thread.cc index 269a86b..2330fd5 100644 --- a/chrome/utility/utility_thread.cc +++ b/chrome/utility/utility_thread.cc @@ -4,6 +4,7 @@ #include "chrome/utility/utility_thread.h" +#include "base/values.h" #include "chrome/common/child_process.h" #include "chrome/common/extensions/extension_unpacker.h" #include "chrome/common/render_messages.h" @@ -32,9 +33,13 @@ void UtilityThread::OnControlMessageReceived(const IPC::Message& msg) { void UtilityThread::OnUnpackExtension(const FilePath& extension_path) { ExtensionUnpacker unpacker(extension_path); - bool success = unpacker.Run(); - Send(new UtilityHostMsg_UnpackExtension_Reply(success, - unpacker.error_message())); + if (unpacker.Run()) { + Send(new UtilityHostMsg_UnpackExtension_Succeeded( + *unpacker.parsed_manifest(), unpacker.decoded_images())); + } else { + Send(new UtilityHostMsg_UnpackExtension_Failed( + unpacker.error_message())); + } ChildProcess::current()->ReleaseProcess(); } -- cgit v1.1