summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 19:30:49 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 19:30:49 +0000
commit0ac63c18600b23eeb8ad2909afae33e998d656bb (patch)
tree0df1e198f2a8f190268a45e04b6728af90e7a294 /chrome
parentc366ad280c032aed580af147b2285d45649ad29b (diff)
downloadchromium_src-0ac63c18600b23eeb8ad2909afae33e998d656bb.zip
chromium_src-0ac63c18600b23eeb8ad2909afae33e998d656bb.tar.gz
chromium_src-0ac63c18600b23eeb8ad2909afae33e998d656bb.tar.bz2
Don't use IO thread to talk to dbus.
dbus uses glib message loop which is driven by UI thread. It is correct to use UI thread to talk to dbus (for now) It's not proven but this may be a source of obscure race bugs, or at least, we can exclude this from the potential source. BUG=chromium-os:7490. TEST=screen locker works as before. Review URL: http://codereview.chromium.org/4024005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63926 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chromeos/cros/screen_lock_library.cc37
1 files changed, 0 insertions, 37 deletions
diff --git a/chrome/browser/chromeos/cros/screen_lock_library.cc b/chrome/browser/chromeos/cros/screen_lock_library.cc
index 3502c26..cd01302 100644
--- a/chrome/browser/chromeos/cros/screen_lock_library.cc
+++ b/chrome/browser/chromeos/cros/screen_lock_library.cc
@@ -35,54 +35,18 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary {
}
void NotifyScreenLockRequested() {
- // Make sure we run on IO thread.
- if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- NewRunnableMethod(
- this,
- &ScreenLockLibraryImpl::NotifyScreenLockRequested));
- return;
- }
chromeos::NotifyScreenLockRequested();
}
void NotifyScreenLockCompleted() {
- // Make sure we run on IO thread.
- if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- NewRunnableMethod(
- this,
- &ScreenLockLibraryImpl::NotifyScreenLockCompleted));
- return;
- }
chromeos::NotifyScreenLockCompleted();
}
void NotifyScreenUnlockRequested() {
- // Make sure we run on IO thread.
- if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- NewRunnableMethod(
- this,
- &ScreenLockLibraryImpl::NotifyScreenUnlockRequested));
- return;
- }
chromeos::NotifyScreenUnlockRequested();
}
void NotifyScreenUnlockCompleted() {
- // Make sure we run on IO thread.
- if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- NewRunnableMethod(
- this,
- &ScreenLockLibraryImpl::NotifyScreenUnlockCompleted));
- return;
- }
chromeos::NotifyScreenUnlockCompleted();
}
@@ -175,4 +139,3 @@ ScreenLockLibrary* ScreenLockLibrary::GetImpl(bool stub) {
// Allows InvokeLater without adding refcounting. This class is a Singleton and
// won't be deleted until it's last InvokeLater is run.
DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::ScreenLockLibraryImpl);
-