Commit 97a91f46 authored by Yuta Hijikata's avatar Yuta Hijikata Committed by Chromium LUCI CQ

Lacros: Preparation for lacros target_os switch.

This is a mechanical change replacing defined(OS_CHROMEOS) with
BUILDFLAG(IS_CHROMEOS_ASH) and adding BUILDFLAG(IS_CHROMEOS_LACROS) to
defined(OS_LINUX) to ensure switching lacros' target_os from linux to
chromeos does not affect the lacros binary.

It also renames chromeos_is_browser_only with is_chromeos_lacros which
was a gn var introduced to be used in place of chromeos_is_browser_only.

More detail on http://go/lacros-macros.

Bug: 1052397
Change-Id: I7e3e5685549c2b8c655a788a9fe827805988b11d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628711
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843958}
parent 44c746b6
......@@ -246,6 +246,7 @@ static_library("browser") {
deps = [
":proto",
"//base",
"//build:chromeos_buildflags",
"//components/autofill/content/browser",
"//components/autofill/core/browser",
"//components/autofill/core/common",
......
......@@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/cast_channel/cast_auth_util.h"
#include "components/cast_channel/enum_table.h"
#include "third_party/openscreen/src/cast/common/channel/proto/cast_channel.pb.h"
......@@ -165,9 +166,9 @@ int GetVirtualConnectPlatformValue() {
return 3;
#elif defined(OS_APPLE)
return 4;
#elif defined(OS_CHROMEOS)
#elif BUILDFLAG(IS_CHROMEOS_ASH)
return 5;
#elif defined(OS_LINUX)
#elif defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
return 6;
#else
return 0;
......
......@@ -59,7 +59,7 @@ void ReportGenerator::CreateBasicRequest(
#if defined(OS_IOS)
basic_request->set_device_model(policy::GetDeviceModel());
#endif // defined(OS_IOS)
#endif // defined(OS_CHROMEOS)
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
}
browser_report_generator_.Generate(
......
......@@ -359,10 +359,6 @@ test("exo_unittests") {
deps += [ "//components/exo/wayland:unit_tests" ]
}
if (is_chromeos) {
deps += [ "//components/exo/server:unit_tests" ]
}
if (is_chromeos_ash) {
sources += [
"../../ash/test/ash_test_suite.cc",
......@@ -372,6 +368,7 @@ test("exo_unittests") {
deps += [
"//ash:test_support",
"//ash/public/cpp",
"//components/exo/server:unit_tests",
]
data_deps += [
......
......@@ -83,6 +83,7 @@ static_library("core") {
":error_strings",
":method_strings",
"//base",
"//build:chromeos_buildflags",
"//components/autofill/core/browser",
"//components/keyed_service/core",
"//components/link_header_util",
......
......@@ -5,6 +5,7 @@
#include "components/payments/core/features.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
namespace payments {
namespace features {
......@@ -44,11 +45,11 @@ const base::Feature kWebPaymentsRedactShippingAddress{
const base::Feature kAppStoreBilling {
"AppStoreBilling",
#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
#if defined(OS_ANDROID) || BUILDFLAG(IS_CHROMEOS_ASH)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif // OS_ANDROID || OS_CHROMEOS
#endif // OS_ANDROID || BUILDFLAG(IS_CHROMEOS_ASH)
};
const base::Feature kAppStoreBillingDebug{"AppStoreBillingDebug",
......
......@@ -189,7 +189,7 @@ source_set("internal") {
"//url",
]
if (chromeos_is_browser_only) {
if (is_chromeos_lacros) {
sources += [
"policy_loader_lacros.cc",
"policy_loader_lacros.h",
......
......@@ -34,7 +34,7 @@ const char kOs[] =
"android";
#elif BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
"cros";
#elif defined(OS_LINUX)
#elif defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
"linux";
#elif defined(OS_FUCHSIA)
"fuchsia";
......
......@@ -114,7 +114,8 @@ std::string GetPlatformString() {
return "android";
#elif defined(OS_FUCHSIA)
return "fuchsia";
#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
#elif (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \
defined(OS_BSD) || defined(OS_SOLARIS)
// Default BSD and SOLARIS to Linux to not break those builds, although these
// platforms are not officially supported by Chrome.
return "linux";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment