diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 13:55:40 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 13:55:40 +0000 |
commit | 1ef3a30380af180951894fc70c3923da59fecd86 (patch) | |
tree | 2d6a1c3c387d528b24ef53d3d8ef5bc602e5fdee | |
parent | 28fa67b9744f5feb959cac4e575f7347e9b3d425 (diff) | |
download | chromium_src-1ef3a30380af180951894fc70c3923da59fecd86.zip chromium_src-1ef3a30380af180951894fc70c3923da59fecd86.tar.gz chromium_src-1ef3a30380af180951894fc70c3923da59fecd86.tar.bz2 |
ScopedAllowWait for NativeBackendKWallet::InitWithBus
Add a ScopedAllowWait to prevend a DCHECK in NativeBackendKWallet::InitWithBus.
BUG=125331
TEST=no
TBR=mdm@chromium.org,jam@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10252003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134263 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/threading/thread_restrictions.h | 5 | ||||
-rw-r--r-- | chrome/browser/password_manager/native_backend_kwallet_x.cc | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h index 95357b7..9b79587 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,6 +13,8 @@ class MetricsService; class RenderWidgetHelper; class TestingAutomationProvider; class TextInputClientMac; +class NativeBackendKWallet; + namespace browser_sync { class NonFrontendDataTypeController; class UIModelWorker; @@ -168,6 +170,7 @@ class BASE_EXPORT ThreadRestrictions { friend class ::BrowserProcessImpl; // http://crbug.com/125207 friend class ::MetricsService; // http://crbug.com/124954 friend class ::TextInputClientMac; // http://crbug.com/121917 + friend class ::NativeBackendKWallet; // http://crbug.com/125331 // END USAGE THAT NEEDS TO BE FIXED. #if !defined(OFFICIAL_BUILD) diff --git a/chrome/browser/password_manager/native_backend_kwallet_x.cc b/chrome/browser/password_manager/native_backend_kwallet_x.cc index d160944..66208a1 100644 --- a/chrome/browser/password_manager/native_backend_kwallet_x.cc +++ b/chrome/browser/password_manager/native_backend_kwallet_x.cc @@ -12,6 +12,7 @@ #include "base/stl_util.h" #include "base/stringprintf.h" #include "base/synchronization/waitable_event.h" +#include "base/threading/thread_restrictions.h" #include "content/public/browser/browser_thread.h" #include "dbus/bus.h" #include "dbus/message.h" @@ -84,6 +85,9 @@ bool NativeBackendKWallet::InitWithBus(scoped_refptr<dbus::Bus> optional_bus) { base::Bind(&NativeBackendKWallet::InitOnDBThread, base::Unretained(this), optional_bus, &event, &success)); + + // This ScopedAllowWait should not be here. http://crbug.com/125331 + base::ThreadRestrictions::ScopedAllowWait allow_wait; event.Wait(); return success; } |