| Index: chrome/browser/extensions/sandboxed_extension_unpacker.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/sandboxed_extension_unpacker.cc (revision 30521)
|
| +++ chrome/browser/extensions/sandboxed_extension_unpacker.cc (working copy)
|
| @@ -29,14 +29,14 @@
|
| SandboxedExtensionUnpacker::SandboxedExtensionUnpacker(
|
| const FilePath& crx_path, ResourceDispatcherHost* rdh,
|
| SandboxedExtensionUnpackerClient* client)
|
| - : crx_path_(crx_path), file_loop_(NULL), rdh_(rdh), client_(client),
|
| - got_response_(false) {
|
| + : crx_path_(crx_path), thread_identifier_(ChromeThread::ID_COUNT),
|
| + rdh_(rdh), client_(client), got_response_(false) {
|
| }
|
|
|
| void SandboxedExtensionUnpacker::Start() {
|
| // We assume that we are started on the thread that the client wants us to do
|
| // file IO on.
|
| - file_loop_ = MessageLoop::current();
|
| + CHECK(ChromeThread::GetCurrentThreadIdentifier(&thread_identifier_));
|
|
|
| // Create a temporary directory to work in.
|
| if (!temp_dir_.CreateUniqueTempDir()) {
|
| @@ -91,13 +91,14 @@
|
|
|
| void SandboxedExtensionUnpacker::StartProcessOnIOThread(
|
| const FilePath& temp_crx_path) {
|
| - UtilityProcessHost* host = new UtilityProcessHost(rdh_, this, file_loop_);
|
| + UtilityProcessHost* host = new UtilityProcessHost(
|
| + rdh_, this, thread_identifier_);
|
| host->StartExtensionUnpacker(temp_crx_path);
|
| }
|
|
|
| void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded(
|
| const DictionaryValue& manifest) {
|
| - DCHECK(file_loop_ == MessageLoop::current());
|
| + DCHECK(ChromeThread::CurrentlyOn(thread_identifier_));
|
| got_response_ = true;
|
|
|
| ExtensionUnpacker::DecodedImages images;
|
| @@ -198,7 +199,7 @@
|
|
|
| void SandboxedExtensionUnpacker::OnUnpackExtensionFailed(
|
| const std::string& error) {
|
| - DCHECK(file_loop_ == MessageLoop::current());
|
| + DCHECK(ChromeThread::CurrentlyOn(thread_identifier_));
|
| got_response_ = true;
|
| ReportFailure(error);
|
| }
|
|
|