Index: chrome/browser/extensions/sandboxed_unpacker.cc |
diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc |
index d07eeeae757daf222561df418d323f91c6c2e908..efe6f8f2893cfb9049d352bca1d1be3eb18f595c 100644 |
--- a/chrome/browser/extensions/sandboxed_unpacker.cc |
+++ b/chrome/browser/extensions/sandboxed_unpacker.cc |
@@ -223,6 +223,7 @@ SandboxedUnpacker::SandboxedUnpacker( |
client_(client), |
extensions_dir_(extensions_dir), |
got_response_(false), |
+ is_zipfile_(false), |
location_(location), |
creation_flags_(creation_flags), |
unpacker_io_task_runner_(unpacker_io_task_runner) { |
@@ -260,6 +261,9 @@ void SandboxedUnpacker::Start() { |
unpack_start_time_ = base::TimeTicks::Now(); |
+ if (crx_path_.Extension() == ".zip") |
+ is_zipfile_ = true; |
meacer
2014/07/28 23:01:05
Cleaner?
is_zipfile_ = crx_path_.Extension() == "
elijahtaylor1
2014/07/31 17:29:55
removed code
|
+ |
PATH_LENGTH_HISTOGRAM("Extensions.SandboxUnpackInitialCrxPathLength", |
crx_path_); |
if (!CreateTempDirectory()) |
@@ -361,6 +365,11 @@ void SandboxedUnpacker::OnUnpackExtensionSucceeded( |
CHECK(unpacker_io_task_runner_->RunsTasksOnCurrentThread()); |
got_response_ = true; |
+ if (is_zipfile_) { |
+ ReportSuccess(manifest, SkBitmap()); |
+ return; |
+ } |
+ |
scoped_ptr<base::DictionaryValue> final_manifest( |
RewriteManifestFile(manifest)); |
if (!final_manifest) |
@@ -421,6 +430,9 @@ void SandboxedUnpacker::OnUnpackExtensionFailed(const base::string16& error) { |
} |
bool SandboxedUnpacker::ValidateSignature() { |
+ if (is_zipfile_) |
+ return true; |
+ |
base::ScopedFILE file(base::OpenFile(crx_path_, "rb")); |
if (!file.get()) { |