| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" | 5 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/crypto/signature_verifier.h" | 10 #include "base/crypto/signature_verifier.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 if (unpacker.Run() && unpacker.DumpImagesToFile() && | 124 if (unpacker.Run() && unpacker.DumpImagesToFile() && |
| 125 unpacker.DumpMessageCatalogsToFile()) { | 125 unpacker.DumpMessageCatalogsToFile()) { |
| 126 OnUnpackExtensionSucceeded(*unpacker.parsed_manifest()); | 126 OnUnpackExtensionSucceeded(*unpacker.parsed_manifest()); |
| 127 } else { | 127 } else { |
| 128 OnUnpackExtensionFailed(unpacker.error_message()); | 128 OnUnpackExtensionFailed(unpacker.error_message()); |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 | 132 |
| 133 SandboxedExtensionUnpacker::~SandboxedExtensionUnpacker() { | 133 SandboxedExtensionUnpacker::~SandboxedExtensionUnpacker() { |
| 134 base::FileUtilProxy::Delete( | 134 base::FileUtilProxy::GetInstance()->Delete( |
| 135 BrowserThread::GetMessageLoopProxyForThread(thread_identifier_), | 135 BrowserThread::GetMessageLoopProxyForThread(thread_identifier_), |
| 136 temp_dir_.Take(), | 136 temp_dir_.Take(), |
| 137 true, | 137 true, |
| 138 NULL); | 138 NULL); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void SandboxedExtensionUnpacker::StartProcessOnIOThread( | 141 void SandboxedExtensionUnpacker::StartProcessOnIOThread( |
| 142 const FilePath& temp_crx_path) { | 142 const FilePath& temp_crx_path) { |
| 143 UtilityProcessHost* host = new UtilityProcessHost( | 143 UtilityProcessHost* host = new UtilityProcessHost( |
| 144 rdh_, this, thread_identifier_); | 144 rdh_, this, thread_identifier_); |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 // Error saving catalog. | 511 // Error saving catalog. |
| 512 ReportFailure(l10n_util::GetStringFUTF8( | 512 ReportFailure(l10n_util::GetStringFUTF8( |
| 513 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, | 513 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, |
| 514 ASCIIToUTF16("ERROR_SAVING_CATALOG"))); | 514 ASCIIToUTF16("ERROR_SAVING_CATALOG"))); |
| 515 return false; | 515 return false; |
| 516 } | 516 } |
| 517 } | 517 } |
| 518 | 518 |
| 519 return true; | 519 return true; |
| 520 } | 520 } |
| OLD | NEW |