New issue
Advanced search Search tips

Issue 826374 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 678705



Sign in to add a comment

mash: Refactor ash::ShellContentState delegate for multiprofile

Project Member Reported by jamescook@chromium.org, Mar 27 2018

Issue description

ash uses this to look up BrowserContext (Profile) on a per-window basis:

  content::BrowserContext* GetActiveBrowserContext() override;
  content::BrowserContext* GetBrowserContextByIndex(
      ash::UserIndex index) override;
  content::BrowserContext* GetBrowserContextForWindow(
      aura::Window* window) override;
  content::BrowserContext* GetUserPresentingBrowserContextForWindow(
      aura::Window* window) override;

I think this is used for multiprofile desktop switching (deciding which window to show for which user on which desktop).

 
Labels: -Proj-Mustash-Mash

Comment 2 by est...@chromium.org, Jun 19 2018

Owner: est...@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 20 2018

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

commit e360bc24c747748abd911680ae86bab2ae42562a
Author: Evan Stade <estade@chromium.org>
Date: Wed Jun 20 21:44:55 2018

Get rid of most of ash::ShellContentState.

Implemented by Chrome, the majority is only used from within //chrome/,
and only from one callsite each. Thus the implementations can be inlined.
The one remaining method in the interface is only used for ash tests.
Resolving that and removing the interface altogether is TODO.

Bug:  826374 
Change-Id: Ib808ae70f3cf87be688b05c3cec15f35e4e121b5
Reviewed-on: https://chromium-review.googlesource.com/1107128
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569035}
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/ash/content/ash_with_content_export.h
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/ash/content/screen_orientation_delegate_chromeos.h
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/ash/content/shell_content_state.h
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/ash/shell/content/shell_content_state_impl.cc
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/ash/shell/content/shell_content_state_impl.h
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/ash/test/content/test_shell_content_state.cc
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/ash/test/content/test_shell_content_state.h
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/chrome/browser/ui/ash/chrome_shell_content_state.cc
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/chrome/browser/ui/ash/chrome_shell_content_state.h
[delete] https://crrev.com/2b87b19cca0516bd754c7bc17462ff4bee9c4a9b/chrome/browser/ui/ash/chrome_shell_content_state_chromeos.cc
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/chrome/browser/ui/ash/media_client.cc
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
[modify] https://crrev.com/e360bc24c747748abd911680ae86bab2ae42562a/chrome/browser/ui/ash/session_util.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 23 2018

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

commit 0a98cc8522af4df0c26ad05a9b2ee921d3b681aa
Author: Evan Stade <estade@chromium.org>
Date: Sat Jun 23 22:42:56 2018

Remove ash::ShellContentState

Update the last few tests that used it to pass the browser context
around in other ways.

TBR=sky@chromium.org

Bug:  826374 
Change-Id: Ic6de0e33b8ccc20ab84a0dcf8309cc103595f5f5
Reviewed-on: https://chromium-review.googlesource.com/1112666
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569902}
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/ash/BUILD.gn
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/ash/content/keyboard_overlay/DEPS
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/ash/content/keyboard_overlay/keyboard_overlay_view_unittest.cc
[delete] https://crrev.com/cf69822f0cdf24a24cce2f92fdfe029ba2cf7dfb/ash/content/shell_content_state.cc
[delete] https://crrev.com/cf69822f0cdf24a24cce2f92fdfe029ba2cf7dfb/ash/content/shell_content_state.h
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/ash/shell/content/client/shell_browser_main_parts.cc
[delete] https://crrev.com/cf69822f0cdf24a24cce2f92fdfe029ba2cf7dfb/ash/shell/content/shell_content_state_impl.cc
[delete] https://crrev.com/cf69822f0cdf24a24cce2f92fdfe029ba2cf7dfb/ash/shell/content/shell_content_state_impl.h
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/ash/test/DEPS
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/ash/test/ash_test_environment_content.cc
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/ash/test/ash_test_environment_content.h
[delete] https://crrev.com/cf69822f0cdf24a24cce2f92fdfe029ba2cf7dfb/ash/test/content/test_shell_content_state.cc
[delete] https://crrev.com/cf69822f0cdf24a24cce2f92fdfe029ba2cf7dfb/ash/test/content/test_shell_content_state.h
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/ash/DEPS
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/ash/ash_shell_init.cc
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/ash/chrome_browser_main_extra_parts_ash.cc
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/ash/chrome_browser_main_extra_parts_ash.h
[delete] https://crrev.com/cf69822f0cdf24a24cce2f92fdfe029ba2cf7dfb/chrome/browser/ui/ash/chrome_shell_content_state.cc
[delete] https://crrev.com/cf69822f0cdf24a24cce2f92fdfe029ba2cf7dfb/chrome/browser/ui/ash/chrome_shell_content_state.h
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/ash/chrome_shell_delegate.cc
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/ash/session_util.cc
[modify] https://crrev.com/0a98cc8522af4df0c26ad05a9b2ee921d3b681aa/chrome/browser/ui/ash/session_util.h

Comment 5 by est...@chromium.org, Jun 24 2018

Status: Fixed (was: Started)

Sign in to add a comment