New issue
Advanced search Search tips

Issue 756095 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 678705
issue 770866



Sign in to add a comment

mash: Remove ash access from chrome/browser/ui/webui/settings

Project Member Reported by jamescook@chromium.org, Aug 16 2017

Issue description

Replace with mojo apis. See ash/README.md and go/mustash.

 
Blocking: 678705
Blocking: 770866
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a31f4bc5ab83fedace7315e364e9aa5150748c9b

commit a31f4bc5ab83fedace7315e364e9aa5150748c9b
Author: Evan Stade <estade@chromium.org>
Date: Tue Oct 10 00:05:51 2017

Move some of palette_utils to ash/public/cpp.

This removes references to ash/ from chrome://settings.

Bug:  756095 
Change-Id: If5d599bf4d37a84d9cdcd60f9d5e8ac8cd5d82d5
Reviewed-on: https://chromium-review.googlesource.com/696342
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507547}
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/laser/laser_pointer_controller.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/public/cpp/BUILD.gn
[add] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/public/cpp/stylus_utils.cc
[add] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/public/cpp/stylus_utils.h
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/system/palette/palette_tray.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/system/palette/palette_tray_unittest.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/system/palette/palette_utils.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/system/palette/palette_utils.h
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/ash/system/status_area_widget.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/chrome/browser/chromeos/lock_screen_apps/state_controller.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/chrome/browser/chromeos/note_taking_helper.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
[modify] https://crrev.com/a31f4bc5ab83fedace7315e364e9aa5150748c9b/chrome/browser/ui/webui/settings/md_settings_ui.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48768f4d09a8f81c71868f09ac61c6f06974e544

commit 48768f4d09a8f81c71868f09ac61c6f06974e544
Author: Evan Stade <estade@chromium.org>
Date: Tue Oct 10 05:23:30 2017

Remove an ash reference from chrome://settings

Bug:  756095 
Change-Id: Ic0519eb868b675bb825de62c062477bd6ce2442b
Reviewed-on: https://chromium-review.googlesource.com/696034
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507596}
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/mojo_interface_factory.cc
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/public/cpp/ash_switches.cc
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/public/cpp/ash_switches.h
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/shell.cc
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/system/night_light/night_light_controller.cc
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/system/night_light/night_light_controller.h
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/system/night_light/night_light_toggle_button.cc
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/system/tiles/tiles_default_view.cc
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/ash/system/tray/system_tray.cc
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/chrome/browser/chromeos/night_light/night_light_client.h
[modify] https://crrev.com/48768f4d09a8f81c71868f09ac61c6f06974e544/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Cc: derat@chromium.org
Status: Started (was: Untriaged)
This is down to access to ash::PowerStatus, which I think can be replaced with direct usage of PowerManagerClient. I think it's just doing a UI refresh when power status changes. I'll take a look.

(This will make it easier to tighten DEPS in c/b/ui/webui, which is my goal here.)

Status: Untriaged (was: Started)
Ugh, this is not simple. chrome/browser/ui/webui/settings/chromeos/device_power_handler.cc extensively uses ash::PowerStatus to get UI data and manipulate power state. We either need to:
1. Introduce an ash mojo API for power stuff, or
2. Migrate code down into PowerManagerClient (things that query the last proto for stuff like "is battery available") and maybe add some utility functions for things like battery string formatting to ash/public/cpp

I'm going to do the DEPS tightening first.

Components: -Internals>MUS Internals>Services>WindowService

Comment 9 by est...@chromium.org, Apr 10 2018

Cc: est...@chromium.org
Could we just move PowerStatus into ash/public/cpp? It's a pretty thin wrapper on PowerManagerClient and its only dependencies on ash/ are resources (strings and vector icons).
Dan, thoughts on moving PowerStatus?

It's 500 lines of code.

Comment 11 by derat@chromium.org, Apr 16 2018

Moving it sounds fine to me. IIRC it's really just a convenience wrapper around the PowerSupplyProperties protobuf, and both Chrome and and ash will have their own copies of the protobuf (received by PowerManagerClient from powerd).
Owner: est...@chromium.org
Status: assigned (was: Untriaged)
I'll take this then if no one has objections.
sgtm

Components: -Internals>Services>WindowService Internals>Services>Ash
Labels: -Proj-Mustash-Mash
Project Member

Comment 15 by bugdroid1@chromium.org, May 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ff28db19a23e51ff6a79a01774c1370352f5a21

commit 8ff28db19a23e51ff6a79a01774c1370352f5a21
Author: Evan Stade <estade@chromium.org>
Date: Wed May 02 17:15:57 2018

Move some utilities from ash::PowerStatus to ash/public

This allows chrome/ to use those utilities on the proto returned by
PowerManagerClient.

BUG= 756095 

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ib3a7f3143ec82ea871ca70dd8fe6d7270c00d9f0
Reviewed-on: https://chromium-review.googlesource.com/1013271
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555445}
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ash/public/cpp/BUILD.gn
[add] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ash/public/cpp/power_utils.cc
[add] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ash/public/cpp/power_utils.h
[add] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ash/public/cpp/power_utils_unittest.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ash/system/power/battery_notification.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ash/system/power/power_status.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ash/system/power/power_status.h
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ash/system/power/power_status_unittest.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chrome/browser/chromeos/arc/arc_migration_guide_notification_unittest.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chrome/browser/resources/settings/device_page/power.js
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc
[delete] https://crrev.com/579015909b1fc24319808b9a500eb6f33a32e1d0/chrome/browser/ui/webui/settings/chromeos/DEPS
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chrome/browser/ui/webui/settings/chromeos/device_power_handler.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chrome/browser/ui/webui/settings/chromeos/device_power_handler.h
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chrome/test/data/webui/settings/device_page_tests.js
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chromeos/dbus/fake_power_manager_client.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chromeos/dbus/fake_power_manager_client.h
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chromeos/dbus/fake_power_manager_client_unittest.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chromeos/dbus/power_manager_client.cc
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/chromeos/dbus/power_manager_client.h
[modify] https://crrev.com/8ff28db19a23e51ff6a79a01774c1370352f5a21/ui/chromeos/ui_chromeos_strings.grd

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0f41a34a90878bb8794ea54086ad9b7c8222e340

commit 0f41a34a90878bb8794ea54086ad9b7c8222e340
Author: Evan Stade <estade@chromium.org>
Date: Fri Sep 14 22:15:50 2018

Remove some dependencies from //chrome to ash_strings

Some strings are only used by //chrome and can be moved to //chrome/app
string targets. Some are used by //chrome and //ash and are moved to
//chromeos/chromeos_strings.grd

Bug:  756095 
Change-Id: If7b3b89486035d36505f6d133b35593d10570f20
Reviewed-on: https://chromium-review.googlesource.com/1213585
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591494}
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/BUILD.gn
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/DEPS
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/ash_strings.grd
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/public/cpp/power_utils.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/public/cpp/power_utils.h
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/shelf/app_list_button.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/shelf/login_shelf_view.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/shelf/shelf_controller.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/strings/BUILD.gn
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/system/DEPS
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/system/enterprise/tray_enterprise.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/system/network/network_list.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/ash/system/unified/unified_system_info_view.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/app/chromeos_strings.grdp
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/app/settings_strings.grdp
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/BUILD.gn
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/DEPS
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ash_service_registry.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/chromeos/login/version_info_updater.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/chromeos/shutdown_policy_browsertest.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ui/ash/network/networking_config_chromeos_browsertest.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ui/webui/DEPS
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ui/webui/settings/chromeos/device_power_handler.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
[modify] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chromeos/chromeos_strings.grd
[rename] https://crrev.com/0f41a34a90878bb8794ea54086ad9b7c8222e340/chromeos/chromeos_strings_grd/IDS_ASH_SHELF_APPS_BUTTON.png.sha1

Status: Fixed (was: Assigned)

Sign in to add a comment