diff options
author | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-11 17:07:52 +0000 |
---|---|---|
committer | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-11 17:07:52 +0000 |
commit | e245206cc330eda42aa9e22b2968343c4b2a1d3d (patch) | |
tree | a1cf2f490066505580bb1c44b3640d818028e193 /chrome/browser/safe_browsing | |
parent | e5d025adfe18a051698e942d95a024e9f1b814f0 (diff) | |
download | chromium_src-e245206cc330eda42aa9e22b2968343c4b2a1d3d.zip chromium_src-e245206cc330eda42aa9e22b2968343c4b2a1d3d.tar.gz chromium_src-e245206cc330eda42aa9e22b2968343c4b2a1d3d.tar.bz2 |
[cros] Enable disk IO restriction on IOThread.
Mark safe_browsing_thread_ as safe for thread join on shutdown.
BUG=chromium:60211, chromium:72696
TEST=bots
Review URL: http://codereview.chromium.org/6476033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74618 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_service.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index 6e5c597..11d0657 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -9,6 +9,7 @@ #include "base/lazy_instance.h" #include "base/path_service.h" #include "base/string_util.h" +#include "base/threading/thread_restrictions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/metrics/metrics_service.h" @@ -578,7 +579,12 @@ void SafeBrowsingService::OnIOShutdown() { // Note that to avoid leaking the database, we rely on the fact that no new // tasks will be added to the db thread between the call above and this one. // See comments on the declaration of |safe_browsing_thread_|. - safe_browsing_thread_.reset(); + { + // A ScopedAllowIO object is required to join the thread when calling Stop. + // See http://crbug.com/72696. + base::ThreadRestrictions::ScopedAllowIO allow_io_for_thread_join; + safe_browsing_thread_.reset(); + } // Delete pending checks, calling back any clients with 'URL_SAFE'. We have // to do this after the db thread returns because methods on it can have |