Break dependency from //chromeos/constants to //chromeos/dbus/constants
For go/lacros-directory-migration we want to move around various subdirectories of //chromeos. This is easier when //chromeos/constants has fewer dependencies. The long-term plan is that //chromeos/constants moves into //ash/constants and gets rewritten to namespace ash. We might also move some constants from //ash/public/cpp into //ash/constants. See go/lacros-directory-migration overall plan. Bug: 1157625 Change-Id: Ib09fb8ee60c6475d4082bb5b89c7d4b168bac5d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575431 Commit-Queue: James Cook <jamescook@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Reviewed-by: Darin Fisher <darin@chromium.org> Cr-Commit-Position: refs/heads/master@{#835931}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
e10ec0eafc
commit
88ff66dce1
@ -1239,6 +1239,7 @@ group("browser_dependencies") {
|
||||
"//chrome/browser/chromeos",
|
||||
"//chromeos",
|
||||
"//chromeos/constants",
|
||||
"//chromeos/dbus/constants",
|
||||
"//chromeos/memory",
|
||||
]
|
||||
}
|
||||
|
@ -170,6 +170,7 @@ static_library("test_support") {
|
||||
deps += [
|
||||
"//chrome/browser/chromeos",
|
||||
"//chromeos",
|
||||
"//chromeos/dbus/constants",
|
||||
"//chromeos/memory:memory",
|
||||
]
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ include_rules = [
|
||||
"+chrome/renderer/chrome_content_renderer_client.h",
|
||||
"+chrome/utility/chrome_content_utility_client.h",
|
||||
"+chromeos/constants",
|
||||
"+chromeos/dbus/constants",
|
||||
"+chromeos/hugepage_text/hugepage_text.h",
|
||||
"+chromeos/lacros",
|
||||
"+chromeos/memory",
|
||||
|
@ -121,6 +121,7 @@
|
||||
#include "chrome/browser/chromeos/startup_settings_cache.h"
|
||||
#include "chromeos/constants/chromeos_paths.h"
|
||||
#include "chromeos/constants/chromeos_switches.h"
|
||||
#include "chromeos/dbus/constants/dbus_paths.h"
|
||||
#include "chromeos/hugepage_text/hugepage_text.h"
|
||||
#include "chromeos/memory/kstaled.h"
|
||||
#include "chromeos/memory/memory.h"
|
||||
@ -752,6 +753,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
chrome::RegisterPathProvider();
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
chromeos::RegisterPathProvider();
|
||||
chromeos::dbus_paths::RegisterPathProvider();
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_NACL) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
|
||||
nacl::RegisterPathProvider();
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "chromeos/dbus/authpolicy/authpolicy_client.h"
|
||||
#include "chromeos/dbus/biod/biod_client.h"
|
||||
#include "chromeos/dbus/cdm_factory_daemon/cdm_factory_daemon_client.h"
|
||||
#include "chromeos/dbus/constants/dbus_paths.h"
|
||||
#include "chromeos/dbus/cros_healthd/cros_healthd_client.h"
|
||||
#include "chromeos/dbus/cups_proxy/cups_proxy_client.h"
|
||||
#include "chromeos/dbus/dbus_thread_manager.h"
|
||||
@ -50,6 +51,7 @@ void OverrideStubPathsIfNeeded() {
|
||||
if (!base::SysInfo::IsRunningOnChromeOS() &&
|
||||
base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
|
||||
chromeos::RegisterStubPathOverrides(user_data_dir);
|
||||
chromeos::dbus_paths::RegisterStubPathOverrides(user_data_dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,7 @@ void UserPolicyMixin::SetUpUserKeysFile(const std::string& user_key_bits) {
|
||||
|
||||
base::ScopedAllowBlockingForTesting allow_io;
|
||||
chromeos::RegisterStubPathOverrides(user_data_dir);
|
||||
chromeos::dbus_paths::RegisterStubPathOverrides(user_data_dir);
|
||||
|
||||
base::FilePath user_keys_dir;
|
||||
CHECK(base::PathService::Get(chromeos::dbus_paths::DIR_USER_POLICY_KEYS,
|
||||
|
@ -147,6 +147,7 @@ void DevicePolicyCrosTestHelper::OverridePaths() {
|
||||
ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
|
||||
base::ScopedAllowBlockingForTesting allow_io;
|
||||
chromeos::RegisterStubPathOverrides(user_data_dir);
|
||||
chromeos::dbus_paths::RegisterStubPathOverrides(user_data_dir);
|
||||
}
|
||||
|
||||
const std::string DevicePolicyCrosTestHelper::device_policy_blob() {
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#include "chromeos/constants/chromeos_paths.h"
|
||||
#include "chromeos/dbus/constants/dbus_paths.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@ -151,6 +152,7 @@ void ChromeUnitTestSuite::InitializeProviders() {
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
chromeos::RegisterPathProvider();
|
||||
chromeos::dbus_paths::RegisterPathProvider();
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@ -11,7 +11,6 @@ component("constants") {
|
||||
"//base",
|
||||
"//base:i18n",
|
||||
"//build:branding_buildflags",
|
||||
"//chromeos/dbus/constants",
|
||||
]
|
||||
sources = [
|
||||
"chromeos_constants.cc",
|
||||
|
@ -4,6 +4,5 @@ include_rules = [
|
||||
"+base",
|
||||
"+build/branding_buildflags.h",
|
||||
"+chromeos/chromeos_export.h",
|
||||
"+chromeos/dbus/constants",
|
||||
"+third_party/icu",
|
||||
]
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "base/path_service.h"
|
||||
#include "base/system/sys_info.h"
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "chromeos/dbus/constants/dbus_paths.h"
|
||||
|
||||
namespace chromeos {
|
||||
|
||||
@ -120,12 +119,10 @@ bool PathProvider(int key, base::FilePath* result) {
|
||||
} // namespace
|
||||
|
||||
void RegisterPathProvider() {
|
||||
dbus_paths::RegisterPathProvider();
|
||||
base::PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
|
||||
}
|
||||
|
||||
void RegisterStubPathOverrides(const base::FilePath& stubs_dir) {
|
||||
dbus_paths::RegisterStubPathOverrides(stubs_dir);
|
||||
CHECK(!base::SysInfo::IsRunningOnChromeOS());
|
||||
// Override these paths on the desktop, so that enrollment and cloud policy
|
||||
// work and can be tested.
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#include "chromeos/constants/chromeos_paths.h"
|
||||
#include "chromeos/dbus/constants/dbus_paths.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_NACL)
|
||||
@ -141,6 +142,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
chromeos::RegisterPathProvider();
|
||||
chromeos::dbus_paths::RegisterPathProvider();
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_NACL) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
|
||||
nacl::RegisterPathProvider();
|
||||
|
Reference in New Issue
Block a user