Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Issue 852453005: chromeos: Make CheckIdleStateIsLocked() query D-Bus client. (Closed)

Created:
5 years, 11 months ago by Daniel Erat
Modified:
5 years, 11 months ago
Reviewers:
stevenjb, satorux1, sky
CC:
chromium-reviews, hashimoto+watch_chromium.org, oshima+watch_chromium.org, James Cook
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

chromeos: Make CheckIdleStateIsLocked() query D-Bus client. Make the Chrome OS implementation of CheckIdleStateIsLocked() (used by the chrome.idle API) get the lock state from chromeos::SessionManagerClient instead of depending on ash::SessionStateDelegate (which reaches into chrome/browser/chromeos/login/). This makes it possible for the idle code to be later moved under ui/base/ instead of living in chrome/browser/, permitting the chrome.idle API to be moved from chrome/ to extensions/. As part of this, make SessionManagerClient cache the most-recently-received-from-session_manager screen-lock state. Previously it just passed state updates to its observers, but the idle functions lack a class that can register itself as an observer. BUG=446320 Committed: https://crrev.com/85e90a06749fe630317eb01ca3487d5a78e9c10a Cr-Commit-Position: refs/heads/master@{#311333}

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix compilation #

Patch Set 3 : sigh, MockSessionManagerClient #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -8 lines) Patch
M chrome/browser/chromeos/settings/device_settings_test_helper.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_test_helper.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/idle_chromeos.cc View 2 chunks +4 lines, -7 lines 0 comments Download
M chromeos/dbus/fake_session_manager_client.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/fake_session_manager_client.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chromeos/dbus/mock_session_manager_client.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/session_manager_client.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chromeos/dbus/session_manager_client.cc View 8 chunks +13 lines, -1 line 0 comments Download

Messages

Total messages: 14 (5 generated)
Daniel Erat
Steven and Satoru, please take a look at chromeos/. Scott, please look at chrome/browser/idle_chromeos.cc. https://codereview.chromium.org/852453005/diff/1/chrome/browser/idle_chromeos.cc ...
5 years, 11 months ago (2015-01-13 00:04:07 UTC) #2
sky
chromeos is suppose to be low level non-ui, so a dep from ui to chromeos ...
5 years, 11 months ago (2015-01-13 00:15:36 UTC) #3
stevenjb
lgtm https://codereview.chromium.org/852453005/diff/1/chrome/browser/idle_chromeos.cc File chrome/browser/idle_chromeos.cc (right): https://codereview.chromium.org/852453005/diff/1/chrome/browser/idle_chromeos.cc#newcode8 chrome/browser/idle_chromeos.cc:8: #include "chromeos/dbus/dbus_thread_manager.h" On 2015/01/13 00:04:07, Daniel Erat wrote: ...
5 years, 11 months ago (2015-01-13 17:30:12 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/852453005/1
5 years, 11 months ago (2015-01-13 17:35:48 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/14355)
5 years, 11 months ago (2015-01-13 18:14:12 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/852453005/20001
5 years, 11 months ago (2015-01-13 18:59:51 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/852453005/40001
5 years, 11 months ago (2015-01-13 19:17:21 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 11 months ago (2015-01-13 21:47:01 UTC) #13
commit-bot: I haz the power
5 years, 11 months ago (2015-01-13 21:48:38 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/85e90a06749fe630317eb01ca3487d5a78e9c10a
Cr-Commit-Position: refs/heads/master@{#311333}

Powered by Google App Engine
This is Rietveld 408576698