From 24321934209c4277acf9f7bb5b71d5d164162cda Mon Sep 17 00:00:00 2001 From: "mirandac@chromium.org" Date: Wed, 11 May 2011 17:24:08 +0000 Subject: 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 --- chrome/browser/importer/firefox_profile_lock.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chrome/browser/importer') 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(); } -- cgit v1.1