Reland "Implement doze mode power status scheduler"

This is a reland of commit 3d491f83f1ac9a0b24a79f688ace64ba0779a6d3

(1) Because ARC restarts in some tests, observing ARC session
stops and clear all observations to avoid use-after-free of
arc session manager.

(2) Adding timers to ensure that after a certain period in
simulated battery status, a certain period in real power status
is enforced.

Original change's description:
> Implement doze mode power status scheduler
>
> Implement a power status scheduler that sends signals to crosvm
> that when arc is in doze mode and user is active (e.g. typing or
> watching videos) it sends a simulated battery signal to make
> crosvm thinks it's on battery even thout it's on AC power.
> See go/doze-mode-battery for reasons and details.
>
> Note that this CL only implements the ash side scheduler, it will
> start send signals to crosvm once the goldfish API is designed.
>
> Unit tests will be added in the next CL since this CL is becoming
> large.
>
> BUG=351086080
>
> Change-Id: I0037436a0830f1ae657eaee7418e64fd8f14d684
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5852354
> Reviewed-by: Dominic Battré <battre@chromium.org>
> Reviewed-by: Michele Fan <michelefan@chromium.org>
> Commit-Queue: Yichen Zhou <yichenz@chromium.org>
> Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1359014}

Bug: 351086080
Change-Id: Ie9b7c1ebeb9e638527edefc7f31f5cebfd8099b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5887832
Reviewed-by: Dominic Battré <battre@chromium.org>
Reviewed-by: Michele Fan <michelefan@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Yichen Zhou <yichenz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1363437}
17 files changed
tree: 48bb720e23960e56a211ef22e361ce4bfcfa16e4
  1. android_webview/
  2. apps/
  3. ash/
  4. base/
  5. build/
  6. build_overrides/
  7. buildtools/
  8. cc/
  9. chrome/
  10. chromecast/
  11. chromeos/
  12. codelabs/
  13. components/
  14. content/
  15. crypto/
  16. dbus/
  17. device/
  18. docs/
  19. extensions/
  20. fuchsia_web/
  21. gin/
  22. google_apis/
  23. google_update/
  24. gpu/
  25. headless/
  26. infra/
  27. ios/
  28. ipc/
  29. media/
  30. mojo/
  31. native_client_sdk/
  32. net/
  33. pdf/
  34. ppapi/
  35. printing/
  36. remoting/
  37. rlz/
  38. sandbox/
  39. services/
  40. skia/
  41. sql/
  42. storage/
  43. styleguide/
  44. testing/
  45. third_party/
  46. tools/
  47. ui/
  48. url/
  49. webkit/
  50. .clang-format
  51. .clang-tidy
  52. .clangd
  53. .git-blame-ignore-revs
  54. .gitallowed
  55. .gitattributes
  56. .gitignore
  57. .gitmodules
  58. .gn
  59. .mailmap
  60. .rustfmt.toml
  61. .vpython3
  62. .yapfignore
  63. ATL_OWNERS
  64. AUTHORS
  65. BUILD.gn
  66. CODE_OF_CONDUCT.md
  67. codereview.settings
  68. CPPLINT.cfg
  69. CRYPTO_OWNERS
  70. DEPS
  71. DIR_METADATA
  72. LICENSE
  73. LICENSE.chromium_os
  74. OWNERS
  75. PRESUBMIT.py
  76. PRESUBMIT_test.py
  77. PRESUBMIT_test_mocks.py
  78. README.md
  79. WATCHLISTS
README.md

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure.

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.