summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authordsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 22:47:58 +0000
committerdsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 22:47:58 +0000
commitadca14d0ef830c55e8ab08b64945fc0bcc6e433d (patch)
tree498f416d2141ac121bb4f96705fda4516688de3a /base
parentc4334a4b0cd6b1b11b115251d8859a502a22d6db (diff)
downloadchromium_src-adca14d0ef830c55e8ab08b64945fc0bcc6e433d.zip
chromium_src-adca14d0ef830c55e8ab08b64945fc0bcc6e433d.tar.gz
chromium_src-adca14d0ef830c55e8ab08b64945fc0bcc6e433d.tar.bz2
Review URL: http://codereview.chromium.org/10610
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/idle_timer.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/base/idle_timer.cc b/base/idle_timer.cc
index 5e6bda7..8f514b4 100644
--- a/base/idle_timer.cc
+++ b/base/idle_timer.cc
@@ -62,12 +62,12 @@ class IdleState {
have_idle_info_ = XScreenSaverQueryExtension(GDK_DISPLAY(), &event_base,
&error_base);
if (have_idle_info_)
- *idle_info_.Get() = XScreenSaverAllocInfo();
+ idle_info_.Set(XScreenSaverAllocInfo());
}
~IdleState() {
- if (*idle_info_.Get()) {
- XFree(*idle_info_.Get());
+ if (idle_info_.Get()) {
+ XFree(idle_info_.Get());
idle_info_.~ThreadLocalPointer();
}
}
@@ -75,15 +75,15 @@ class IdleState {
int32 IdleTime() {
if (have_idle_info_ && idle_info_.Get()) {
XScreenSaverQueryInfo(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- *idle_info_.Get());
- return (*idle_info_.Get())->idle;
+ idle_info_.Get());
+ return idle_info_.Get()->idle;
}
return -1;
}
private:
bool have_idle_info_;
- ThreadLocalPointer<XScreenSaverInfo*> idle_info_;
+ ThreadLocalPointer<XScreenSaverInfo> idle_info_;
DISALLOW_COPY_AND_ASSIGN(IdleState);
};