diff options
Diffstat (limited to 'base/thread_restrictions.cc')
-rw-r--r-- | base/thread_restrictions.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/thread_restrictions.cc b/base/thread_restrictions.cc index 1ee8eee..270d663 100644 --- a/base/thread_restrictions.cc +++ b/base/thread_restrictions.cc @@ -21,8 +21,10 @@ LazyInstance<ThreadLocalBoolean, LeakyLazyInstanceTraits<ThreadLocalBoolean> > } // anonymous namespace // static -void ThreadRestrictions::SetIOAllowed(bool allowed) { +bool ThreadRestrictions::SetIOAllowed(bool allowed) { + bool previous_allowed = g_io_disallowed.Get().Get(); g_io_disallowed.Get().Set(!allowed); + return !previous_allowed; } // static |