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

Issue 2080723008: [Chromoting] Use device::PowerSaveBlocker to block screen saver (Closed)

Created:
4 years, 6 months ago by Hzj_jie
Modified:
4 years, 5 months ago
Reviewers:
Sergey Ulanov, boliu, Jamie
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Chromoting] Use device::PowerSaveBlocker to block screen saver Now ScreenCapturers implement their own screen-saver blocking logic, which is not part of ScreenCapturer functionality. This change adds ScreenSaverBlocker into It2MeHost or RemotingMe2MeHost as a HostStatusObserver. The ScreenSaverBlocker implementation uses device::PowerSaverBlocker to do the real job, and monitors HostStatusMonitor's OnClientConnected and OnClientDisconnected events to start and stop PowerSaverBlocker. After this change, we can eventually remove screen-saver blocking logic from various ScreenCapturer implementations. BUG=626839 Committed: https://crrev.com/726a66222237491b51c1538854ea20e5df0b89d8 Cr-Commit-Position: refs/heads/master@{#405864}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Resolve review comments #

Total comments: 5

Patch Set 3 : Resolve review comments #

Total comments: 14

Patch Set 4 : Resolve review comments #

Total comments: 4

Patch Set 5 : Resolve review comments #

Patch Set 6 : Add unittest for HostPowerSaveBlocker #

Total comments: 21

Patch Set 7 : Resolve review comments #

Patch Set 8 : Resolve review comments #

Patch Set 9 : Resolve review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -0 lines) Patch
M remoting/host/BUILD.gn View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M remoting/host/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A remoting/host/host_power_save_blocker.h View 1 2 3 4 5 6 7 1 chunk +52 lines, -0 lines 0 comments Download
A remoting/host/host_power_save_blocker.cc View 1 2 3 4 5 6 7 1 chunk +45 lines, -0 lines 0 comments Download
A remoting/host/host_power_save_blocker_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +55 lines, -0 lines 0 comments Download
M remoting/host/remoting_me2me_host.cc View 1 2 3 4 4 chunks +8 lines, -0 lines 0 comments Download
M remoting/remoting_host.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M remoting/remoting_host_srcs.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M remoting/remoting_test.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 68 (41 generated)
Hzj_jie
https://codereview.chromium.org/2080723008/diff/20001/remoting/host/basic_desktop_environment.cc File remoting/host/basic_desktop_environment.cc (right): https://codereview.chromium.org/2080723008/diff/20001/remoting/host/basic_desktop_environment.cc#newcode74 remoting/host/basic_desktop_environment.cc:74: caller_task_runner_, We have not sent file_task_runner to BasicDesktopEnvironment, so ...
4 years, 6 months ago (2016-06-22 18:57:59 UTC) #4
Sergey Ulanov
https://codereview.chromium.org/2080723008/diff/20001/remoting/host/basic_desktop_environment.cc File remoting/host/basic_desktop_environment.cc (right): https://codereview.chromium.org/2080723008/diff/20001/remoting/host/basic_desktop_environment.cc#newcode74 remoting/host/basic_desktop_environment.cc:74: caller_task_runner_, On 2016/06/22 18:57:59, Hzj_jie wrote: > We have ...
4 years, 6 months ago (2016-06-22 19:05:37 UTC) #5
Hzj_jie
https://codereview.chromium.org/2080723008/diff/20001/remoting/host/basic_desktop_environment.cc File remoting/host/basic_desktop_environment.cc (right): https://codereview.chromium.org/2080723008/diff/20001/remoting/host/basic_desktop_environment.cc#newcode74 remoting/host/basic_desktop_environment.cc:74: caller_task_runner_, On 2016/06/22 19:05:37, Sergey Ulanov wrote: > On ...
4 years, 6 months ago (2016-06-24 19:14:29 UTC) #14
Sergey Ulanov
I think it's better to implement this functionality outside of ChromotingHost. E.g. there is no ...
4 years, 5 months ago (2016-06-27 18:20:24 UTC) #15
Sergey Ulanov
Also, I'm sorry I realized that HostStatusObserver is useful here only after you spent your ...
4 years, 5 months ago (2016-06-27 18:41:27 UTC) #16
Hzj_jie
On 2016/06/27 18:41:27, Sergey Ulanov wrote: > Also, I'm sorry I realized that HostStatusObserver is ...
4 years, 5 months ago (2016-06-27 18:43:03 UTC) #17
Hzj_jie
https://codereview.chromium.org/2080723008/diff/180001/remoting/DEPS File remoting/DEPS (right): https://codereview.chromium.org/2080723008/diff/180001/remoting/DEPS#newcode3 remoting/DEPS:3: "+device/power_save_blocker", On 2016/06/27 18:20:24, Sergey Ulanov wrote: > put ...
4 years, 5 months ago (2016-07-08 21:09:12 UTC) #19
Sergey Ulanov
Please update BUG= reference in the description https://codereview.chromium.org/2080723008/diff/220001/net/socket/ssl_client_socket_impl.cc File net/socket/ssl_client_socket_impl.cc (right): https://codereview.chromium.org/2080723008/diff/220001/net/socket/ssl_client_socket_impl.cc#newcode977 net/socket/ssl_client_socket_impl.cc:977: if (false ...
4 years, 5 months ago (2016-07-08 21:31:47 UTC) #20
Sergey Ulanov
Also please update CL description - it doesn't match the latest impl
4 years, 5 months ago (2016-07-08 21:32:57 UTC) #21
Hzj_jie
https://codereview.chromium.org/2080723008/diff/220001/net/socket/ssl_client_socket_impl.cc File net/socket/ssl_client_socket_impl.cc (right): https://codereview.chromium.org/2080723008/diff/220001/net/socket/ssl_client_socket_impl.cc#newcode977 net/socket/ssl_client_socket_impl.cc:977: if (false && base::FeatureList::IsEnabled(kPostQuantumExperiment)) { On 2016/07/08 21:31:46, Sergey ...
4 years, 5 months ago (2016-07-10 22:04:57 UTC) #23
Sergey Ulanov
looks good, but can you please add a simple unittest. https://codereview.chromium.org/2080723008/diff/240001/remoting/host/host_power_save_blocker.cc File remoting/host/host_power_save_blocker.cc (right): https://codereview.chromium.org/2080723008/diff/240001/remoting/host/host_power_save_blocker.cc#newcode17 ...
4 years, 5 months ago (2016-07-13 04:57:05 UTC) #24
Hzj_jie
I have addressed your comments. But I cannot quite sure how to write a unittest ...
4 years, 5 months ago (2016-07-13 20:27:13 UTC) #25
Hzj_jie
4 years, 5 months ago (2016-07-14 01:12:09 UTC) #33
Sergey Ulanov
https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker.h File remoting/host/host_power_save_blocker.h (right): https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker.h#newcode35 remoting/host/host_power_save_blocker.h:35: const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); I think these both should be ...
4 years, 5 months ago (2016-07-14 19:52:48 UTC) #36
Hzj_jie
https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker.h File remoting/host/host_power_save_blocker.h (right): https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker.h#newcode35 remoting/host/host_power_save_blocker.h:35: const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); On 2016/07/14 19:52:48, Sergey Ulanov wrote: ...
4 years, 5 months ago (2016-07-14 23:20:04 UTC) #39
Sergey Ulanov
https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker.h File remoting/host/host_power_save_blocker.h (right): https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker.h#newcode35 remoting/host/host_power_save_blocker.h:35: const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); On 2016/07/14 23:20:03, Hzj_jie wrote: > ...
4 years, 5 months ago (2016-07-14 23:30:57 UTC) #40
Hzj_jie
https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker.h File remoting/host/host_power_save_blocker.h (right): https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker.h#newcode35 remoting/host/host_power_save_blocker.h:35: const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); On 2016/07/14 23:30:56, Sergey Ulanov wrote: ...
4 years, 5 months ago (2016-07-15 02:12:00 UTC) #47
Sergey Ulanov
LGTM after my comment is addressed https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker_unittest.cc File remoting/host/host_power_save_blocker_unittest.cc (right): https://codereview.chromium.org/2080723008/diff/300001/remoting/host/host_power_save_blocker_unittest.cc#newcode36 remoting/host/host_power_save_blocker_unittest.cc:36: DCHECK(ui_thread_.Start()); On 2016/07/15 ...
4 years, 5 months ago (2016-07-15 06:15:33 UTC) #48
Hzj_jie
On 2016/07/15 06:15:33, Sergey Ulanov wrote: > LGTM after my comment is addressed > > ...
4 years, 5 months ago (2016-07-15 14:50:52 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2080723008/360001
4 years, 5 months ago (2016-07-15 17:57:09 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/219061)
4 years, 5 months ago (2016-07-15 18:07:39 UTC) #58
Hzj_jie
Hi, Bo, Would you please sign-off for this change? We will use PowerSaveBlocker in Chrome ...
4 years, 5 months ago (2016-07-15 18:11:09 UTC) #60
boliu
On 2016/07/15 18:11:09, Hzj_jie wrote: > Hi, Bo, > Would you please sign-off for this ...
4 years, 5 months ago (2016-07-15 20:00:02 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2080723008/360001
4 years, 5 months ago (2016-07-15 21:39:32 UTC) #63
commit-bot: I haz the power
Committed patchset #9 (id:360001)
4 years, 5 months ago (2016-07-15 21:44:44 UTC) #65
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-15 21:45:02 UTC) #66
commit-bot: I haz the power
4 years, 5 months ago (2016-07-15 21:46:13 UTC) #68
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/726a66222237491b51c1538854ea20e5df0b89d8
Cr-Commit-Position: refs/heads/master@{#405864}

Powered by Google App Engine
This is Rietveld 408576698