chromeos: Tighten DEPS on //ash in //chrome/browser to support mash
Under mash the code in //ash runs out of process. Code in //chrome/browser
must use the mojo interfaces in //ash/public/interfaces to talk to ash.
We're still in the process of refactoring existing code, but new code
should use the mojo approach. Tighten DEPS on //ash to limit the number
of new references.
Also file bugs to refactor the existing areas.
BUG=678705
TEST=buildtools/checkdeps/checkdeps.py
Review-Url: https://codereview.chromium.org/2891923003
Cr-Commit-Position: refs/heads/master@{#475577}
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index d0c2430..53e7be9 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -1,6 +1,5 @@
include_rules = [
"+apps",
- "+ash",
"+cc/paint",
"+chrome/app",
"+chrome/chrome_watcher",
@@ -61,6 +60,13 @@
"+third_party/crashpad",
"+third_party/cros_system_api",
+ # Code under //ash runs out-of-process under mustash (chrome --mash) so it
+ # must be accessed via mojo interfaces in //ash/public/interfaces. See
+ # //ash/README.md.
+ "-ash",
+ "+ash/public",
+ "+ash/ash_switches.h",
+
# chrome only needs switches from cc. All usage of the compositor is from
# content. Definitely don't include generic stuff from cc/base here, if this
# is needed these files need to move to base/
@@ -79,11 +85,6 @@
"+chrome/browser/ui/views/try_chrome_dialog_view.h",
"+chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h",
- # Code in chrome should not use ash::SessionStateDelegate and friends.
- # Instead, use SessionManager/UserManager/SessionControllerClient directly
- # since they are part of chrome.
- "-ash/session",
-
# Explicitly disallow using SyncMessageFilter to prevent browser from
# sending synchronous IPC messages on non-UI threads.
"-ipc/ipc_sync_message_filter.h",
@@ -135,3 +136,10 @@
"+third_party/WebKit/public/web/WebTextDirection.h",
"+third_party/WebKit/public/web/window_features.mojom.h",
]
+specific_include_rules = {
+ # TODO(mash): Remove. http://crbug.com/678705
+ "fullscreen_chromeos\.cc": [
+ "+ash/root_window_controller.h",
+ "+ash/shell.h",
+ ]
+}
diff --git a/chrome/browser/chromeos/DEPS b/chrome/browser/chromeos/DEPS
index 0b7d553..8d75f13 100644
--- a/chrome/browser/chromeos/DEPS
+++ b/chrome/browser/chromeos/DEPS
@@ -1,4 +1,8 @@
include_rules = [
+ # TODO(crbug.com/678705): Convert to using mojo interfaces in
+ # //ash/public/interfaces and eliminate this.
+ "+ash",
+
"+components/constrained_window",
"+components/drive/drive_pref_names.h",
"+components/pairing",
diff --git a/chrome/browser/cryptauth/DEPS b/chrome/browser/cryptauth/DEPS
new file mode 100644
index 0000000..55567a48
--- /dev/null
+++ b/chrome/browser/cryptauth/DEPS
@@ -0,0 +1,6 @@
+specific_include_rules = {
+ # TODO(mash): Remove. http://crbug.com/723873
+ "chrome_cryptauth_service\.cc": [
+ "+ash/shell.h",
+ ]
+}
diff --git a/chrome/browser/extensions/DEPS b/chrome/browser/extensions/DEPS
index a0fa60d..e060c160 100644
--- a/chrome/browser/extensions/DEPS
+++ b/chrome/browser/extensions/DEPS
@@ -1,4 +1,7 @@
include_rules = [
+ # TODO(mash): Remove. http://crbug.com/678705
+ "+ash",
+
"+components/chrome_apps",
"+components/crx_file",
"+components/strings/grit/components_strings.h",
diff --git a/chrome/browser/lifetime/DEPS b/chrome/browser/lifetime/DEPS
new file mode 100644
index 0000000..37b8dbf
--- /dev/null
+++ b/chrome/browser/lifetime/DEPS
@@ -0,0 +1,6 @@
+specific_include_rules = {
+ # TODO(mash): Remove. http://crbug.com/723876
+ "application_lifetime_aura\.cc": [
+ "+ash/shell.h",
+ ]
+}
diff --git a/chrome/browser/media/webrtc/DEPS b/chrome/browser/media/webrtc/DEPS
index 1bfb3bc..f6e252e 100644
--- a/chrome/browser/media/webrtc/DEPS
+++ b/chrome/browser/media/webrtc/DEPS
@@ -1,7 +1,12 @@
include_rules = [
- "+media/audio",
- "+media/base",
- "+media/media_features.h",
+ # TODO(mash): Remove. http://crbug.com/723880
+ "+ash/shell.h",
"+third_party/libyuv",
"+third_party/webrtc",
]
+specific_include_rules = {
+ # TODO(mash): Remove. http://crbug.com/723880
+ ".*_unittest\.cc": [
+ "+ash/test/ash_test_base.h",
+ ]
+}
diff --git a/chrome/browser/memory/DEPS b/chrome/browser/memory/DEPS
new file mode 100644
index 0000000..57c4684
--- /dev/null
+++ b/chrome/browser/memory/DEPS
@@ -0,0 +1,6 @@
+include_rules = [
+ # TODO(mash): Remove. http://crbug.com/723881
+ "+ash/multi_profile_uma.h",
+ "+ash/shell.h",
+ "+ash/shell_port.h",
+]
diff --git a/chrome/browser/notifications/DEPS b/chrome/browser/notifications/DEPS
index d6abddad..49a4ca2 100644
--- a/chrome/browser/notifications/DEPS
+++ b/chrome/browser/notifications/DEPS
@@ -1,3 +1,5 @@
include_rules = [
+ # TODO(mash): Remove. http://crbug.com/723882
+ "+ash",
"+dbus",
]
diff --git a/chrome/browser/policy/DEPS b/chrome/browser/policy/DEPS
index 382e9d0..9201916e 100644
--- a/chrome/browser/policy/DEPS
+++ b/chrome/browser/policy/DEPS
@@ -8,3 +8,12 @@
"+content/public/common",
"+content/public/test",
]
+specific_include_rules = {
+ # TODO(mash): Remove. http://crbug.com/723876
+ "configuration_policy_handler_list_factory\.cc": [
+ "+ash/accessibility_types.h",
+ ],
+ "policy_browsertest\.cc": [
+ "+ash",
+ ]
+}
diff --git a/chrome/browser/renderer_context_menu/DEPS b/chrome/browser/renderer_context_menu/DEPS
new file mode 100644
index 0000000..dc9a2d7
--- /dev/null
+++ b/chrome/browser/renderer_context_menu/DEPS
@@ -0,0 +1,6 @@
+include_rules = [
+ # TODO(mash): Remove. http://crbug.com/724142
+ "+ash/link_handler_model.h",
+ "+ash/link_handler_model_factory.h",
+ "+ash/shell.h",
+]
diff --git a/chrome/browser/signin/DEPS b/chrome/browser/signin/DEPS
new file mode 100644
index 0000000..392e891
--- /dev/null
+++ b/chrome/browser/signin/DEPS
@@ -0,0 +1,7 @@
+include_rules = [
+ # TODO(mash): Remove. http://crbug.com/724143
+ "+ash/shell.h",
+ "+ash/system/devicetype_utils.h",
+ "+ash/system/system_notifier.h",
+ "+ash/test/ash_test_base.h",
+]
diff --git a/chrome/browser/sync/DEPS b/chrome/browser/sync/DEPS
index 88800dc..a2eaea2 100644
--- a/chrome/browser/sync/DEPS
+++ b/chrome/browser/sync/DEPS
@@ -5,3 +5,14 @@
"+components/sync_wifi",
"+google/cacheinvalidation",
]
+specific_include_rules = {
+ "sync_error_notifier_ash\.cc": [
+ "+ash/system/system_notifier.h",
+ ],
+ "sync_error_notifier_factory_ash\.cc": [
+ "+ash/shell.h",
+ ],
+ ".*_unittest\.cc": [
+ "+ash/test/ash_test_base.h",
+ ]
+}
diff --git a/chrome/browser/ui/DEPS b/chrome/browser/ui/DEPS
index a187263..7f89d23 100644
--- a/chrome/browser/ui/DEPS
+++ b/chrome/browser/ui/DEPS
@@ -1,4 +1,6 @@
include_rules = [
+ # TODO(mash): Remove. http://crbug.com/678705
+ "+ash",
"+components/bubble",
"+components/favicon/core",
"+components/flags_ui",
diff --git a/chrome/browser/usb/DEPS b/chrome/browser/usb/DEPS
index 6d9fc40f..35443a2 100644
--- a/chrome/browser/usb/DEPS
+++ b/chrome/browser/usb/DEPS
@@ -1,4 +1,6 @@
include_rules = [
+ # TODO(mash): Remove. http://crbug.com/724149
+ "+ash/system/system_notifier.h",
"+chrome/browser/ui",
"+components/bubble",
"+device/base",