| Index: chrome/browser/extensions/sandboxed_extension_unpacker.cc
|
| diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc
|
| index a9764008c2281d9f0220b120c0210ed8be85baf8..9df675cc323ac70dabb2a659baa9bc1a3bf98470 100644
|
| --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc
|
| +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc
|
| @@ -28,10 +28,13 @@
|
| const char SandboxedExtensionUnpacker::kExtensionHeaderMagic[] = "Cr24";
|
|
|
| SandboxedExtensionUnpacker::SandboxedExtensionUnpacker(
|
| - const FilePath& crx_path, ResourceDispatcherHost* rdh,
|
| + const FilePath& crx_path,
|
| + const FilePath& temp_path,
|
| + ResourceDispatcherHost* rdh,
|
| SandboxedExtensionUnpackerClient* client)
|
| - : crx_path_(crx_path), thread_identifier_(ChromeThread::ID_COUNT),
|
| - rdh_(rdh), client_(client), got_response_(false) {
|
| + : crx_path_(crx_path), temp_path_(temp_path),
|
| + thread_identifier_(ChromeThread::ID_COUNT),
|
| + rdh_(rdh), client_(client), got_response_(false) {
|
| }
|
|
|
| void SandboxedExtensionUnpacker::Start() {
|
| @@ -40,13 +43,14 @@ void SandboxedExtensionUnpacker::Start() {
|
| CHECK(ChromeThread::GetCurrentThreadIdentifier(&thread_identifier_));
|
|
|
| // Create a temporary directory to work in.
|
| - if (!temp_dir_.CreateUniqueTempDir()) {
|
| + if (!temp_dir_.CreateUniqueTempDirUnderPath(temp_path_)) {
|
| ReportFailure("Could not create temporary directory.");
|
| return;
|
| }
|
|
|
| // Initialize the path that will eventually contain the unpacked extension.
|
| - extension_root_ = temp_dir_.path().AppendASCII("TEMP_INSTALL");
|
| + extension_root_ = temp_dir_.path().AppendASCII(
|
| + extension_filenames::kTempExtensionName);
|
|
|
| // Extract the public key and validate the package.
|
| if (!ValidateSignature())
|
|
|