//chrome/browser: Use BUILDFLAG(IS_CHROMEOS)
Checking BUILDFLAG(IS_CHROMEOS)
is more concise than checking
BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
Bug: 1246565
Change-Id: Ia1864c325a256ac7117d07a795eac886a5f00ba0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3611943
Commit-Queue: Eric Willigers <[email protected]>
Reviewed-by: David Roger <[email protected]>
Cr-Commit-Position: refs/heads/main@{#997516}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index c00b4cd4..deb417d 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3985,7 +3985,7 @@
flag_descriptions::kBypassAppBannerEngagementChecksName,
flag_descriptions::kBypassAppBannerEngagementChecksDescription, kOsAll,
SINGLE_VALUE_TYPE(webapps::switches::kBypassAppBannerEngagementChecks)},
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
{"allow-default-web-app-migration-for-chrome-os-managed-users",
flag_descriptions::kAllowDefaultWebAppMigrationForChromeOsManagedUsersName,
flag_descriptions::
@@ -3993,7 +3993,7 @@
kOsCrOS,
FEATURE_VALUE_TYPE(
web_app::kAllowDefaultWebAppMigrationForChromeOsManagedUsers)},
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
{"enable-desktop-pwas-prefix-app-name-in-window-title",
flag_descriptions::kDesktopPWAsPrefixAppNameInWindowTitleName,
flag_descriptions::kDesktopPWAsPrefixAppNameInWindowTitleDescription,
@@ -5718,7 +5718,7 @@
"CCTResizableThirdPartiesDefaultPolicy")},
#endif
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
{"allow-dsp-based-aec", flag_descriptions::kCrOSDspBasedAecAllowedName,
flag_descriptions::kCrOSDspBasedAecAllowedDescription, kOsCrOS | kOsLacros,
FEATURE_VALUE_TYPE(features::kCrOSDspBasedAecAllowed)},
diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc
index 0503b43..0a66a55 100644
--- a/chrome/browser/chrome_browser_main_linux.cc
+++ b/chrome/browser/chrome_browser_main_linux.cc
@@ -26,7 +26,7 @@
#include "device/bluetooth/dbus/bluez_dbus_thread_manager.h"
#include "ui/base/l10n/l10n_util.h"
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
#include "chrome/installer/util/google_update_settings.h"
#endif
@@ -57,14 +57,14 @@
}
void ChromeBrowserMainPartsLinux::PostCreateMainMessageLoop() {
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// No-op: Ash and Lacros Bluetooth DBusManager initialization depend on
// FeatureList, and is done elsewhere.
-#else
- bluez::BluezDBusManager::Initialize(nullptr /* system_bus */);
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
#if !BUILDFLAG(IS_CHROMEOS)
+ bluez::BluezDBusManager::Initialize(nullptr /* system_bus */);
+
// Set up crypt config. This needs to be done before anything starts the
// network service, as the raw encryption key needs to be shared with the
// network service for encrypted cookie storage.
@@ -122,12 +122,12 @@
#endif // defined(USE_DBUS) && !BUILDFLAG(IS_CHROMEOS)
void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// No-op; per PostBrowserStart() comment, this is done elsewhere.
#else
bluez::BluezDBusManager::Shutdown();
bluez::BluezDBusThreadManager::Shutdown();
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
ChromeBrowserMainPartsPosix::PostDestroyThreads();
}
diff --git a/chrome/browser/error_reporting/chrome_js_error_report_processor.cc b/chrome/browser/error_reporting/chrome_js_error_report_processor.cc
index 9ac2b14..c0319b43 100644
--- a/chrome/browser/error_reporting/chrome_js_error_report_processor.cc
+++ b/chrome/browser/error_reporting/chrome_js_error_report_processor.cc
@@ -20,6 +20,7 @@
#include "base/time/default_clock.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
+#include "build/chromeos_buildflags.h"
#include "components/crash/content/browser/error_reporting/javascript_error_report.h"
#include "components/crash/core/app/client_upload_info.h"
#include "components/crash/core/app/crashpad.h"
@@ -44,7 +45,7 @@
constexpr char kWebAppWindow[] = "WEB_APP";
constexpr char kSystemWebAppWindow[] = "SYSTEM_WEB_APP";
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// Give up if crash_reporter hasn't finished in this long.
constexpr base::TimeDelta kMaximumWaitForCrashReporter = base::Minutes(1);
#endif
@@ -92,7 +93,7 @@
ChromeJsErrorReportProcessor::ChromeJsErrorReportProcessor()
:
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
maximium_wait_for_crash_reporter_(kMaximumWaitForCrashReporter),
#endif
clock_(base::DefaultClock::GetInstance()) {
@@ -107,7 +108,7 @@
JavaScriptErrorReport error_report) {
// Consent is handled at the OS level by crash_reporter so we don't need to
// check it here for Chrome OS.
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
if (!crash_reporter::GetClientCollectStatsConsent()) {
return absl::nullopt;
}
@@ -192,7 +193,7 @@
params["build_time_millis"] = base::NumberToString(build_time);
#endif
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// base::SysInfo::OperatingSystemName() returns "Linux" on ChromeOS devices.
params["os"] = "ChromeOS";
#else
@@ -343,7 +344,7 @@
base::ScopedClosureRunner callback_runner(std::move(completion_callback));
scoped_refptr<network::SharedURLLoaderFactory> loader_factory;
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
// loader_factory must be created on UI thread. Get it now while we still
// know the browser_context pointer is valid.
loader_factory = browser_context->GetDefaultStoragePartition()
diff --git a/chrome/browser/error_reporting/chrome_js_error_report_processor.h b/chrome/browser/error_reporting/chrome_js_error_report_processor.h
index ffbdcdb..21a5e3e 100644
--- a/chrome/browser/error_reporting/chrome_js_error_report_processor.h
+++ b/chrome/browser/error_reporting/chrome_js_error_report_processor.h
@@ -17,7 +17,6 @@
#include "base/containers/flat_map.h"
#include "base/time/clock.h"
#include "base/time/time.h"
-#include "build/chromeos_buildflags.h"
#include "components/crash/content/browser/error_reporting/js_error_report_processor.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
@@ -59,7 +58,7 @@
return recent_error_reports_;
}
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// Force the error report processor to use the less-commonly-used temp file
// solution for communicating with crash_reporter. This is normally only used
// on old kernels without memfd_create, so we don't get good unit test
@@ -82,7 +81,7 @@
// wrapper to allow dependency injection.
virtual variations::ExperimentListInfo GetExperimentListInfo() const;
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// Returns the first element(s) of the crash_reporter argv. By default, this
// is just the command name (so {"/sbin/crash_reporter"}). Virtual so that
// tests can override and can provide additional arguments to the test binary
@@ -107,7 +106,7 @@
// feedback reports.
virtual void UpdateReportDatabase(std::string remote_report_id,
base::Time report_time);
-#endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // !BUILDFLAG(IS_CHROMEOS)
private:
struct PlatformInfo;
@@ -153,7 +152,7 @@
// Add parameters indicating the current field trial experiments.
void AddExperimentIds(ParameterMap& params);
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// Write the parameters (and the stack_trace, if present) into a string
// suitable for passing the crash_reporter. Returns the string.
//
diff --git a/chrome/browser/error_reporting/chrome_js_error_report_processor_unittest.cc b/chrome/browser/error_reporting/chrome_js_error_report_processor_unittest.cc
index a76a1d6..ce5daeb 100644
--- a/chrome/browser/error_reporting/chrome_js_error_report_processor_unittest.cc
+++ b/chrome/browser/error_reporting/chrome_js_error_report_processor_unittest.cc
@@ -15,6 +15,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/test/simple_test_clock.h"
#include "build/build_config.h"
+#include "build/chromeos_buildflags.h"
#include "chrome/browser/crash_upload_list/crash_upload_list.h"
#include "chrome/browser/error_reporting/mock_chrome_js_error_report_processor.h"
#include "chrome/common/chrome_paths.h"
@@ -140,7 +141,7 @@
{"variations=",
MockChromeJsErrorReportProcessor::kDefaultExperimentListString})));
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
// This is from MockChromeJsErrorReportProcessor::GetOsVersion()
EXPECT_THAT(actual_report->query, HasSubstr("os_version=7.20.1"));
#endif
@@ -208,7 +209,7 @@
{"variations=",
MockChromeJsErrorReportProcessor::kDefaultExperimentListString})));
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
// This is from MockChromeJsErrorReportProcessor::GetOsVersion()
EXPECT_THAT(actual_report->query, HasSubstr("os_version=7.20.1"));
#endif
@@ -226,7 +227,7 @@
TestAllFields();
}
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
// On Chrome OS, consent checks are handled in the crash_reporter, not in the
// browser.
TEST_F(ChromeJsErrorReportProcessorTest, NoConsent) {
@@ -239,7 +240,7 @@
EXPECT_FALSE(endpoint_->last_report());
}
-#endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // !BUILDFLAG(IS_CHROMEOS)
TEST_F(ChromeJsErrorReportProcessorTest, StackTraceWithErrorMessage) {
auto report = MakeErrorReport("Hello World");
@@ -475,7 +476,7 @@
EXPECT_EQ(endpoint_->report_count(), 3);
}
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
static std::string UploadInfoStateToString(
UploadList::UploadInfo::State state) {
switch (state) {
@@ -546,11 +547,11 @@
EXPECT_TRUE(found) << "Didn't find upload record in "
<< UploadInfoVectorToString(uploads);
}
-#endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // !BUILDFLAG(IS_CHROMEOS)
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
TEST_F(ChromeJsErrorReportProcessorTest, WorksWithoutMemfdCreate) {
processor_->set_force_non_memfd_for_test();
TestAllFields();
}
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/browser/error_reporting/constants.cc b/chrome/browser/error_reporting/constants.cc
index 774c90b..1c38064 100644
--- a/chrome/browser/error_reporting/constants.cc
+++ b/chrome/browser/error_reporting/constants.cc
@@ -4,6 +4,6 @@
#include "chrome/browser/error_reporting/constants.h"
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
const char kJavaScriptStackKey[] = "upload_file_js_stack\"; filename=\"stack\"";
#endif
diff --git a/chrome/browser/error_reporting/constants.h b/chrome/browser/error_reporting/constants.h
index 2d96c57..b2bd57c 100644
--- a/chrome/browser/error_reporting/constants.h
+++ b/chrome/browser/error_reporting/constants.h
@@ -5,15 +5,15 @@
#ifndef CHROME_BROWSER_ERROR_REPORTING_CONSTANTS_H_
#define CHROME_BROWSER_ERROR_REPORTING_CONSTANTS_H_
-#include "build/chromeos_buildflags.h"
+#include "build/build_config.h"
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// The key we pass to crash_reporter to indicate this key/value pair is the
// JavaScript stack payload.
// The format of the key needs to match Chrome OS's
// ChromeCollector::ParseCrashLog and kDefaultJavaScriptStackName. The
// 'filename' within the key doesn't actually matter but must be present.
extern const char kJavaScriptStackKey[];
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
#endif // CHROME_BROWSER_ERROR_REPORTING_CONSTANTS_H_
diff --git a/chrome/browser/error_reporting/mock_chrome_js_error_report_processor.cc b/chrome/browser/error_reporting/mock_chrome_js_error_report_processor.cc
index a639255..ed6d08a7 100644
--- a/chrome/browser/error_reporting/mock_chrome_js_error_report_processor.cc
+++ b/chrome/browser/error_reporting/mock_chrome_js_error_report_processor.cc
@@ -29,7 +29,7 @@
// "= default".
// NOLINTNEXTLINE
MockChromeJsErrorReportProcessor::MockChromeJsErrorReportProcessor() {
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// Shorten timeout or tests will time out.
set_maximium_wait_for_crash_reporter_for_test(base::Seconds(5));
#endif
@@ -79,7 +79,7 @@
return result;
}
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
std::vector<std::string>
MockChromeJsErrorReportProcessor::GetCrashReporterArgvStart() {
// Redirect uploads to our a simple upload shim which will then send them to
@@ -113,7 +113,7 @@
std::move(remote_report_id), report_time);
}
}
-#endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // !BUILDFLAG(IS_CHROMEOS)
ScopedMockChromeJsErrorReportProcessor::ScopedMockChromeJsErrorReportProcessor(
const MockCrashEndpoint& endpoint)
diff --git a/chrome/browser/error_reporting/mock_chrome_js_error_report_processor.h b/chrome/browser/error_reporting/mock_chrome_js_error_report_processor.h
index 8bb5c38..6b1909a 100644
--- a/chrome/browser/error_reporting/mock_chrome_js_error_report_processor.h
+++ b/chrome/browser/error_reporting/mock_chrome_js_error_report_processor.h
@@ -14,7 +14,6 @@
#include "base/memory/scoped_refptr.h"
#include "base/synchronization/lock.h"
#include "base/test/scoped_path_override.h"
-#include "build/chromeos_buildflags.h"
#include "chrome/browser/error_reporting/chrome_js_error_report_processor.h"
class MockCrashEndpoint;
@@ -56,7 +55,7 @@
// return the given (other) JsErrorReportProcessor.
static void SetDefaultTo(scoped_refptr<JsErrorReportProcessor> new_default);
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
// By default, a MockChromeJsErrorReportProcessor will suppress the updating
// of the crash database (a.k.a. uploads.log) to avoid contaminating the real
// database with test uploads. Set |update_report_database| to true to have
@@ -70,7 +69,7 @@
protected:
variations::ExperimentListInfo GetExperimentListInfo() const override;
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
std::vector<std::string> GetCrashReporterArgvStart() override;
#else
// Always returns "7.20.1" (arbitrary).
@@ -93,7 +92,7 @@
std::string crash_endpoint_;
std::string crash_endpoint_staging_;
bool use_real_experiment_list_ = false;
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
bool update_report_database_ = false;
#endif
};
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 7393b9c..1dff1a5 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -5530,7 +5530,7 @@
#endif // #if BUILDFLAG(IS_CHROMEOS_LACROS)
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
const char kAllowDefaultWebAppMigrationForChromeOsManagedUsersName[] =
"Allow default web app migration for ChromeOS managed users";
const char kAllowDefaultWebAppMigrationForChromeOsManagedUsersDescription[] =
@@ -5584,7 +5584,7 @@
const char kDefaultCalculatorWebAppDescription[] =
"Enable default installing of the calculator PWA instead of the deprecated "
"chrome app.";
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS)
const char kDeprecateLowUsageCodecsName[] = "Deprecates low usage media codecs";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 3e752e6..6deba9d 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -3170,7 +3170,7 @@
extern const char kLacrosScreenCoordinatesEnabledDescription[];
#endif // #if BUILDFLAG(IS_CHROMEOS_LACROS)
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
extern const char kAllowDefaultWebAppMigrationForChromeOsManagedUsersName[];
extern const char
kAllowDefaultWebAppMigrationForChromeOsManagedUsersDescription[];
@@ -3201,7 +3201,7 @@
extern const char kDefaultCalculatorWebAppName[];
extern const char kDefaultCalculatorWebAppDescription[];
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS)
extern const char kDeprecateLowUsageCodecsName[];
diff --git a/chrome/browser/image_decoder/image_decoder.cc b/chrome/browser/image_decoder/image_decoder.cc
index d4fecdf..026f661 100644
--- a/chrome/browser/image_decoder/image_decoder.cc
+++ b/chrome/browser/image_decoder/image_decoder.cc
@@ -10,7 +10,6 @@
#include "base/callback.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
-#include "build/chromeos_buildflags.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "ipc/ipc_channel.h"
@@ -156,10 +155,10 @@
data_decoder::mojom::ImageCodec codec =
data_decoder::mojom::ImageCodec::kDefault;
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
if (image_codec == PNG_CODEC)
codec = data_decoder::mojom::ImageCodec::kPng;
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
auto callback =
base::BindOnce(&OnDecodeImageDone,
diff --git a/chrome/browser/image_decoder/image_decoder.h b/chrome/browser/image_decoder/image_decoder.h
index 5ee9612..ec8dd15 100644
--- a/chrome/browser/image_decoder/image_decoder.h
+++ b/chrome/browser/image_decoder/image_decoder.h
@@ -15,7 +15,6 @@
#include "base/sequence_checker.h"
#include "base/synchronization/lock.h"
#include "base/task/sequenced_task_runner.h"
-#include "build/chromeos_buildflags.h"
#include "ui/gfx/geometry/size.h"
namespace data_decoder {
@@ -83,7 +82,7 @@
enum ImageCodec {
DEFAULT_CODEC = 0, // Uses WebKit image decoding (via WebImage).
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
PNG_CODEC, // Restrict decoding to libpng.
#endif
};
diff --git a/chrome/browser/image_decoder/image_decoder_browsertest.cc b/chrome/browser/image_decoder/image_decoder_browsertest.cc
index 1a67ec5..bc6bd8a 100644
--- a/chrome/browser/image_decoder/image_decoder_browsertest.cc
+++ b/chrome/browser/image_decoder/image_decoder_browsertest.cc
@@ -6,7 +6,6 @@
#include "base/run_loop.h"
#include "build/build_config.h"
-#include "build/chromeos_buildflags.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/browser_child_process_observer.h"
@@ -111,7 +110,7 @@
EXPECT_FALSE(test_request.decode_succeeded());
}
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(ImageDecoderBrowserTest, BasicDecodeWithOptionsString) {
base::RunLoop run_loop;
@@ -156,7 +155,7 @@
EXPECT_FALSE(test_request.decode_succeeded());
}
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(ImageDecoderBrowserTest, BasicDecode) {
base::RunLoop run_loop;
diff --git a/chrome/browser/memory/oom_memory_details.cc b/chrome/browser/memory/oom_memory_details.cc
index 2919d43..e1da938 100644
--- a/chrome/browser/memory/oom_memory_details.cc
+++ b/chrome/browser/memory/oom_memory_details.cc
@@ -8,7 +8,6 @@
#include "base/process/process_metrics.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
-#include "build/chromeos_buildflags.h"
#include "chrome/browser/memory/oom_memory_details.h"
#include "ui/base/text/bytes_formatting.h"
@@ -35,7 +34,7 @@
// These logs are collected by user feedback reports. We want them to help
// diagnose user-reported problems with frequently discarded tabs.
std::string log_string = ToLogString(/*include_tab_title=*/false);
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
base::GraphicsMemoryInfoKB gpu_meminfo;
if (base::GetGraphicsMemoryInfo(&gpu_meminfo)) {
log_string +=
diff --git a/chrome/browser/prefs/chrome_pref_service_unittest.cc b/chrome/browser/prefs/chrome_pref_service_unittest.cc
index 2ac358c..0802460 100644
--- a/chrome/browser/prefs/chrome_pref_service_unittest.cc
+++ b/chrome/browser/prefs/chrome_pref_service_unittest.cc
@@ -5,7 +5,6 @@
#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
-#include "build/chromeos_buildflags.h"
#include "chrome/browser/prefs/chrome_command_line_pref_store.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -90,7 +89,7 @@
// These should still be the default values.
#if BUILDFLAG(IS_MAC)
const char16_t kDefaultFont[] = u"Times";
-#elif BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#elif BUILDFLAG(IS_CHROMEOS)
const char16_t kDefaultFont[] = u"Tinos";
#else
const char16_t kDefaultFont[] = u"Times New Roman";
diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc
index 589004e..aa12524 100644
--- a/chrome/browser/prefs/session_startup_pref.cc
+++ b/chrome/browser/prefs/session_startup_pref.cc
@@ -10,7 +10,6 @@
#include "base/values.h"
#include "build/build_config.h"
-#include "build/chromeos_buildflags.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
@@ -67,7 +66,7 @@
// static
SessionStartupPref::Type SessionStartupPref::GetDefaultStartupType() {
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
return SessionStartupPref::LAST;
#else
return SessionStartupPref::DEFAULT;
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 782bafa..0b38ae9 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -495,7 +495,7 @@
return base::FilePath::FromASCII(chrome::kInitialProfile);
}
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
void UpdateSupervisedUserPref(Profile* profile, bool is_child) {
DCHECK(profile);
if (is_child) {
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index e5176b2..7fe38601 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -645,8 +645,7 @@
return web_app::GetSystemWebAppTypeForAppId(profile, *link_app_id);
}
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \
- BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(GOOGLE_CHROME_BRANDING)
ui::MenuSourceType GetMenuSourceType(int event_flags) {
if (event_flags & ui::EF_MOUSE_BUTTON)
return ui::MENU_SOURCE_MOUSE;
@@ -2778,7 +2777,7 @@
}
case IDC_CONTENT_CLIPBOARD_HISTORY_MENU: {
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
auto* host_native_view = GetRenderFrameHost()
? GetRenderFrameHost()->GetNativeView()
: nullptr;
diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc
index 98be42418..1a17452 100644
--- a/chrome/browser/renderer_preferences_util.cc
+++ b/chrome/browser/renderer_preferences_util.cc
@@ -146,7 +146,7 @@
pref_service->GetBoolean(prefs::kWebRTCAllowLegacyTLSProtocols);
#if defined(USE_AURA)
prefs->focus_ring_color = SkColorSetRGB(0x4D, 0x90, 0xFE);
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// This color is 0x544d90fe modulated with 0xffffff.
prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA);
prefs->active_selection_fg_color = SK_ColorBLACK;
diff --git a/chrome/browser/sessions/exit_type_service_browsertest.cc b/chrome/browser/sessions/exit_type_service_browsertest.cc
index 170b1b1..4eca59d 100644
--- a/chrome/browser/sessions/exit_type_service_browsertest.cc
+++ b/chrome/browser/sessions/exit_type_service_browsertest.cc
@@ -167,7 +167,7 @@
GetExitTypeService()->AddCrashAckCallback(run_loop.QuitClosure());
run_loop.Run();
EXPECT_TRUE(IsSessionServiceSavingEnabled());
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
const bool restores_to_initial_browser = false;
#else
const bool restores_to_initial_browser = true;
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 9b19ac7d..c3dc563e 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -1074,7 +1074,7 @@
void SessionRestore::RestoreSessionAfterCrash(Browser* browser) {
auto* profile = browser->profile();
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// Desks restore a window to the right desk, so we should not reuse any
// browser window. Otherwise, the conflict of the parent desk arises because
// tabs created in this |browser| should remain in the current active desk,
diff --git a/chrome/browser/signin/chrome_signin_helper.cc b/chrome/browser/signin/chrome_signin_helper.cc
index 1e458ed..e990faa 100644
--- a/chrome/browser/signin/chrome_signin_helper.cc
+++ b/chrome/browser/signin/chrome_signin_helper.cc
@@ -209,7 +209,7 @@
AccountReconcilorFactory::GetForProfile(profile);
account_reconcilor->OnReceivedManageAccountsResponse(service_type);
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
signin_metrics::LogAccountReconcilorStateOnGaiaResponse(
account_reconcilor->GetState());
@@ -371,7 +371,7 @@
return;
SigninBridge::OpenAccountManagementScreen(window, service_type);
}
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
}
#endif // BUILDFLAG(ENABLE_MIRROR)
diff --git a/chrome/browser/signin/primary_account_policy_manager_unittest.cc b/chrome/browser/signin/primary_account_policy_manager_unittest.cc
index afdf86bd..27e4ed1 100644
--- a/chrome/browser/signin/primary_account_policy_manager_unittest.cc
+++ b/chrome/browser/signin/primary_account_policy_manager_unittest.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/signin/primary_account_policy_manager.h"
#include "build/buildflag.h"
-#include "build/chromeos_buildflags.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h"
#include "chrome/browser/signin/primary_account_policy_manager_factory.h"
@@ -73,7 +72,7 @@
identity_test_env_adaptor_;
};
-#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#if !BUILDFLAG(IS_CHROMEOS)
// All primary accounts are allowed on ChromeOS and Lacros, so this the
// PrimaryAccountPolicyManagerTest does not clear the primary account on
// ChromeOS.
@@ -135,4 +134,4 @@
}
#endif // #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
-#endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // !BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
index 9c03fbd..aa3289fb 100644
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -273,7 +273,7 @@
// for web app windows.
const base::Feature kDesktopPWAsElidedExtensionsMenu {
"DesktopPWAsElidedExtensionsMenu",
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
@@ -853,7 +853,7 @@
const base::Feature kRemoveStatusBarInWebApps {
"RemoveStatusBarInWebApps",
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chrome/test/base/chrome_unit_test_suite.cc b/chrome/test/base/chrome_unit_test_suite.cc
index ce30b6e..7d2fe99 100644
--- a/chrome/test/base/chrome_unit_test_suite.cc
+++ b/chrome/test/base/chrome_unit_test_suite.cc
@@ -34,7 +34,7 @@
#include "ui/base/ui_base_paths.h"
#include "ui/gl/test/gl_surface_test_support.h"
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/dbus/constants/dbus_paths.h"
#endif
@@ -149,7 +149,7 @@
ash::RegisterPathProvider();
#endif
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
chromeos::dbus_paths::RegisterPathProvider();
#endif
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index e2e9857..5c5e1d4 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -425,12 +425,12 @@
chrome_browser_net::NetErrorTabHelper::set_state_for_testing(
chrome_browser_net::NetErrorTabHelper::TESTING_FORCE_DISABLED);
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// On Chrome OS, access to files via file: scheme is restricted. Enable
// access to all files here since browser_tests and interactive_ui_tests
// rely on the ability to open any files via file: scheme.
ChromeNetworkDelegate::EnableAccessToAllFilesForTesting(true);
-#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#endif // BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS_ASH)
// Device sync (for multidevice "Better Together") is ash specific.
@@ -718,7 +718,7 @@
SelectFirstBrowser();
if (browser_) {
-#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_CHROMEOS)
// There are cases where windows get created maximized by default.
if (browser_->window()->IsMaximized())
browser_->window()->Restore();