summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-11 17:24:08 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-11 17:24:08 +0000
commit24321934209c4277acf9f7bb5b71d5d164162cda (patch)
tree128304683f355d9a3412e748364cdabdacfb2311
parent988a26dd264af76d65daa109d71706ba8cb02cbf (diff)
downloadchromium_src-24321934209c4277acf9f7bb5b71d5d164162cda.zip
chromium_src-24321934209c4277acf9f7bb5b71d5d164162cda.tar.gz
chromium_src-24321934209c4277acf9f7bb5b71d5d164162cda.tar.bz2
Allow the Firefox lock to be deleted on the main thread during import.
BUG=77777 TEST=import tests don't complain. Review URL: http://codereview.chromium.org/6995051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84996 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/importer/firefox_profile_lock.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/importer/firefox_profile_lock.cc b/chrome/browser/importer/firefox_profile_lock.cc
index fff771d..aa66bff 100644
--- a/chrome/browser/importer/firefox_profile_lock.cc
+++ b/chrome/browser/importer/firefox_profile_lock.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/importer/firefox_profile_lock.h"
#include "base/file_path.h"
+#include "base/threading/thread_restrictions.h"
// This class is based on Firefox code in:
// profile/dirserviceprovider/src/nsProfileLock.cpp
@@ -75,5 +76,8 @@ FirefoxProfileLock::FirefoxProfileLock(const FilePath& path) {
}
FirefoxProfileLock::~FirefoxProfileLock() {
+ // Because this destructor happens in first run on the profile import thread,
+ // with no UI to jank, it's ok to allow deletion of the lock here.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
Unlock();
}