summaryrefslogtreecommitdiffstats
path: root/chrome/utility
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 23:15:02 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 23:15:02 +0000
commitfacd7a7651cf81da7fbe48596be7f4324ff86ab8 (patch)
tree21c25659a8feb5fff0c93856211e27e9ee830514 /chrome/utility
parentcc7c1c77040c26a56de3eeb953f468ced2a32186 (diff)
downloadchromium_src-facd7a7651cf81da7fbe48596be7f4324ff86ab8.zip
chromium_src-facd7a7651cf81da7fbe48596be7f4324ff86ab8.tar.gz
chromium_src-facd7a7651cf81da7fbe48596be7f4324ff86ab8.tar.bz2
Fix an issue where themes would sporadically fail to install.
Trying to send decoded images over IPC didn't work too well. Instead, we'll write them to a file and have the browser slurp them in from there. My first instinct was to use SharedMemory, but that would require us to impose a limit on the size of the decoded image data. Also made sure that the undecoded images are deleted when we install. BUG=13455 TEST=Try the repro steps in bug 13455 several times and make sure it works every time. Review URL: http://codereview.chromium.org/119255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/utility')
-rw-r--r--chrome/utility/utility_thread.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/utility/utility_thread.cc b/chrome/utility/utility_thread.cc
index 2330fd5..d1d7b37 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/file_util.h"
#include "base/values.h"
#include "chrome/common/child_process.h"
#include "chrome/common/extensions/extension_unpacker.h"
@@ -33,12 +34,11 @@ void UtilityThread::OnControlMessageReceived(const IPC::Message& msg) {
void UtilityThread::OnUnpackExtension(const FilePath& extension_path) {
ExtensionUnpacker unpacker(extension_path);
- if (unpacker.Run()) {
+ if (unpacker.Run() && unpacker.DumpImagesToFile()) {
Send(new UtilityHostMsg_UnpackExtension_Succeeded(
- *unpacker.parsed_manifest(), unpacker.decoded_images()));
+ *unpacker.parsed_manifest()));
} else {
- Send(new UtilityHostMsg_UnpackExtension_Failed(
- unpacker.error_message()));
+ Send(new UtilityHostMsg_UnpackExtension_Failed(unpacker.error_message()));
}
ChildProcess::current()->ReleaseProcess();