diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-31 23:59:53 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-31 23:59:53 +0000 |
commit | fb3ef9384cc76c4237f98e5aa38d2689cc7b60cd (patch) | |
tree | 98bad1fae8753d67f447e4c906fc1739f87d4589 /chrome/browser/extensions/sandboxed_extension_unpacker.cc | |
parent | 217a6c001d47eb867b610d40a2a3e3141d84beb5 (diff) | |
download | chromium_src-fb3ef9384cc76c4237f98e5aa38d2689cc7b60cd.zip chromium_src-fb3ef9384cc76c4237f98e5aa38d2689cc7b60cd.tar.gz chromium_src-fb3ef9384cc76c4237f98e5aa38d2689cc7b60cd.tar.bz2 |
Ever closer. Extract a client interface out of CrxInstaller and
use it to implement ExtensionInstallUI.
There is (still) no dialog here. But the next CL will, um,
definitely have it.
Also, fixed the issue with theme preview infobars not updating if you install a theme while another one is already previewed.
BUG=17932
Review URL: http://codereview.chromium.org/160483
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/sandboxed_extension_unpacker.cc')
-rw-r--r-- | chrome/browser/extensions/sandboxed_extension_unpacker.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index 8048ff2..46a8382 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -28,11 +28,15 @@ const char SandboxedExtensionUnpacker::kExtensionHeaderMagic[] = "Cr24"; SandboxedExtensionUnpacker::SandboxedExtensionUnpacker( const FilePath& crx_path, ResourceDispatcherHost* rdh, SandboxedExtensionUnpackerClient* client) - : crx_path_(crx_path), client_loop_(MessageLoop::current()), rdh_(rdh), - client_(client), got_response_(false) { + : crx_path_(crx_path), file_loop_(NULL), 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(); + // Create a temporary directory to work in. if (!temp_dir_.CreateUniqueTempDir()) { ReportFailure("Could not create temporary directory."); @@ -72,13 +76,13 @@ void SandboxedExtensionUnpacker::Start() { void SandboxedExtensionUnpacker::StartProcessOnIOThread( const FilePath& temp_crx_path) { - UtilityProcessHost* host = new UtilityProcessHost(rdh_, this, - MessageLoop::current()); + UtilityProcessHost* host = new UtilityProcessHost(rdh_, this, file_loop_); host->StartExtensionUnpacker(temp_crx_path); } void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded( const DictionaryValue& manifest) { + DCHECK(file_loop_ == MessageLoop::current()); got_response_ = true; ExtensionUnpacker::DecodedImages images; @@ -164,6 +168,7 @@ void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded( void SandboxedExtensionUnpacker::OnUnpackExtensionFailed( const std::string& error) { + DCHECK(file_loop_ == MessageLoop::current()); got_response_ = true; ReportFailure(error); } |