Chromium Code Reviews| Index: chrome/browser/extensions/crx_installer.cc |
| =================================================================== |
| --- chrome/browser/extensions/crx_installer.cc (revision 108010) |
| +++ chrome/browser/extensions/crx_installer.cc (working copy) |
| @@ -136,23 +136,17 @@ |
| CrxInstaller::~CrxInstaller() { |
| // Delete the temp directory and crx file as necessary. Note that the |
| // destructor might be called on any thread, so we post a task to the file |
| - // thread to make sure the delete happens there. |
| + // thread to make sure the delete happens there. This is a best effort |
| + // operation since the browser can be shutting down so there might not |
| + // be a file thread to post to. |
|
asargent_no_longer_on_chrome
2011/11/01 22:15:01
would it make sense to do something like this?
i
|
| if (!temp_dir_.value().empty()) { |
| - if (!BrowserThread::PostTask( |
| - BrowserThread::FILE, FROM_HERE, |
| - base::Bind( |
| - &extension_file_util::DeleteFile, temp_dir_, true))) |
| - NOTREACHED(); |
| + BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| + base::Bind(&extension_file_util::DeleteFile, temp_dir_, true)); |
| } |
| - |
| if (delete_source_) { |
| - if (!BrowserThread::PostTask( |
| - BrowserThread::FILE, FROM_HERE, |
| - base::Bind( |
| - &extension_file_util::DeleteFile, source_file_, false))) |
| - NOTREACHED(); |
| + BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| + base::Bind(&extension_file_util::DeleteFile, source_file_, false)); |
| } |
| - |
| // Make sure the UI is deleted on the ui thread. |
| BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, client_); |
| client_ = NULL; |