Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3164)

Unified Diff: chrome/browser/extensions/crx_installer.cc

Issue 8438017: Remove dcheck at CrxInstaller teardown (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698