diff options
-rw-r--r-- | chrome/browser/extensions/extensions_ui.cc | 1 | ||||
-rw-r--r-- | chrome/browser/extensions/pack_extension_job.cc | 3 | ||||
-rw-r--r-- | chrome/browser/extensions/pack_extension_job.h | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc index bce29b5..1025ec0 100644 --- a/chrome/browser/extensions/extensions_ui.cc +++ b/chrome/browser/extensions/extensions_ui.cc @@ -485,6 +485,7 @@ void ExtensionsDOMHandler::HandlePackMessage(const Value* value) { } pack_job_ = new PackExtensionJob(this, root_directory, key_file); + pack_job_->Start(); } void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file, diff --git a/chrome/browser/extensions/pack_extension_job.cc b/chrome/browser/extensions/pack_extension_job.cc index 9d370a1..871a920 100644 --- a/chrome/browser/extensions/pack_extension_job.cc +++ b/chrome/browser/extensions/pack_extension_job.cc @@ -14,6 +14,9 @@ PackExtensionJob::PackExtensionJob(Client* client, const FilePath& key_file) : client_(client), root_directory_(root_directory), key_file_(key_file) { CHECK(ChromeThread::GetCurrentThreadIdentifier(&client_thread_id_)); +} + +void PackExtensionJob::Start() { ChromeThread::PostTask( ChromeThread::FILE, FROM_HERE, NewRunnableMethod(this, &PackExtensionJob::RunOnFileThread)); diff --git a/chrome/browser/extensions/pack_extension_job.h b/chrome/browser/extensions/pack_extension_job.h index 8c008d9..2ad95a6 100644 --- a/chrome/browser/extensions/pack_extension_job.h +++ b/chrome/browser/extensions/pack_extension_job.h @@ -29,6 +29,10 @@ class PackExtensionJob : public base::RefCountedThreadSafe<PackExtensionJob> { const FilePath& root_directory, const FilePath& key_file); + // Starts the packing thread job. See http://crbug.com/27944 for more details + // on why this function is needed. + void Start(); + // The client should call this when it is destroyed to prevent // PackExtensionJob from attempting to access it. void ClearClient(); |