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

Lacros: Rename deprecated macro/gn names

This is a mechanical change that renames deprecated macro replacing:

- BUILDFLAG(IS_{ASH,LACROS}) with BUILDFLAG(IS_CHROMEOS_{ASH,LACROS}),
- gn var is_{ash,lacros} with is_chromeos_{ash,lacros}.

There is a section about the renaming on http://go/lacros-macros.

Bug: 1052397
Change-Id: If5bf960d24f9b860647288759a411dfd687c3e1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593852
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837586}
parent 73c6a126
...@@ -48,7 +48,7 @@ const char kSigninChromeSyncDice[] = "signin/chrome/sync?ssp=1"; ...@@ -48,7 +48,7 @@ const char kSigninChromeSyncDice[] = "signin/chrome/sync?ssp=1";
const char kSigninChromeSyncKeysUrl[] = "encryption/unlock/android"; const char kSigninChromeSyncKeysUrl[] = "encryption/unlock/android";
#elif defined(OS_IOS) #elif defined(OS_IOS)
const char kSigninChromeSyncKeysUrl[] = "encryption/unlock/ios"; const char kSigninChromeSyncKeysUrl[] = "encryption/unlock/ios";
#elif BUILDFLAG(IS_ASH) #elif BUILDFLAG(IS_CHROMEOS_ASH)
const char kSigninChromeSyncKeysUrl[] = "encryption/unlock/chromeos"; const char kSigninChromeSyncKeysUrl[] = "encryption/unlock/chromeos";
#else #else
const char kSigninChromeSyncKeysUrl[] = "encryption/unlock/desktop"; const char kSigninChromeSyncKeysUrl[] = "encryption/unlock/desktop";
......
...@@ -21,7 +21,7 @@ namespace { ...@@ -21,7 +21,7 @@ namespace {
const char kSigninChromeSyncKeysPlatformSuffix[] = "android"; const char kSigninChromeSyncKeysPlatformSuffix[] = "android";
#elif defined(OS_IOS) #elif defined(OS_IOS)
const char kSigninChromeSyncKeysPlatformSuffix[] = "ios"; const char kSigninChromeSyncKeysPlatformSuffix[] = "ios";
#elif BUILDFLAG(IS_ASH) #elif BUILDFLAG(IS_CHROMEOS_ASH)
const char kSigninChromeSyncKeysPlatformSuffix[] = "chromeos"; const char kSigninChromeSyncKeysPlatformSuffix[] = "chromeos";
#else #else
const char kSigninChromeSyncKeysPlatformSuffix[] = "desktop"; const char kSigninChromeSyncKeysPlatformSuffix[] = "desktop";
......
...@@ -139,7 +139,7 @@ void CheckinRequest::Start() { ...@@ -139,7 +139,7 @@ void CheckinRequest::Start() {
checkin_proto::AndroidCheckinProto* checkin = request.mutable_checkin(); checkin_proto::AndroidCheckinProto* checkin = request.mutable_checkin();
checkin->mutable_chrome_build()->CopyFrom(request_info_.chrome_build_proto); checkin->mutable_chrome_build()->CopyFrom(request_info_.chrome_build_proto);
#if BUILDFLAG(IS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH)
checkin->set_type(checkin_proto::DEVICE_CHROME_OS); checkin->set_type(checkin_proto::DEVICE_CHROME_OS);
#else #else
checkin->set_type(checkin_proto::DEVICE_CHROME_BROWSER); checkin->set_type(checkin_proto::DEVICE_CHROME_BROWSER);
......
...@@ -154,7 +154,7 @@ TEST_F(CheckinRequestTest, FetcherDataAndURL) { ...@@ -154,7 +154,7 @@ TEST_F(CheckinRequestTest, FetcherDataAndURL) {
EXPECT_EQ(kEmailAddress, request_proto.account_cookie(0)); EXPECT_EQ(kEmailAddress, request_proto.account_cookie(0));
EXPECT_EQ(kTokenValue, request_proto.account_cookie(1)); EXPECT_EQ(kTokenValue, request_proto.account_cookie(1));
#if BUILDFLAG(IS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH)
EXPECT_EQ(checkin_proto::DEVICE_CHROME_OS, request_proto.checkin().type()); EXPECT_EQ(checkin_proto::DEVICE_CHROME_OS, request_proto.checkin().type());
#else #else
EXPECT_EQ(checkin_proto::DEVICE_CHROME_BROWSER, EXPECT_EQ(checkin_proto::DEVICE_CHROME_BROWSER,
......
...@@ -32,13 +32,13 @@ const int kMinClientHeartbeatIntervalMs = 1000 * 30; // 30 seconds. ...@@ -32,13 +32,13 @@ const int kMinClientHeartbeatIntervalMs = 1000 * 30; // 30 seconds.
// Minimum time spent sleeping before we force a new heartbeat. // Minimum time spent sleeping before we force a new heartbeat.
const int kMinSuspendTimeMs = 1000 * 10; // 10 seconds. const int kMinSuspendTimeMs = 1000 * 10; // 10 seconds.
#if defined(OS_LINUX) || BUILDFLAG(IS_LACROS) #if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
// The period at which to check if the heartbeat time has passed. Used to // The period at which to check if the heartbeat time has passed. Used to
// protect against platforms where the timer is delayed by the system being // protect against platforms where the timer is delayed by the system being
// suspended. Only needed on linux because the other OSes provide a standard // suspended. Only needed on linux because the other OSes provide a standard
// way to be notified of system suspend and resume events. // way to be notified of system suspend and resume events.
const int kHeartbeatMissedCheckMs = 1000 * 60 * 5; // 5 minutes. const int kHeartbeatMissedCheckMs = 1000 * 60 * 5; // 5 minutes.
#endif // defined(OS_LINUX) || BUILDFLAG(IS_LACROS) #endif // defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
} // namespace } // namespace
...@@ -192,7 +192,7 @@ void HeartbeatManager::RestartTimer() { ...@@ -192,7 +192,7 @@ void HeartbeatManager::RestartTimer() {
base::BindRepeating(&HeartbeatManager::OnHeartbeatTriggered, base::BindRepeating(&HeartbeatManager::OnHeartbeatTriggered,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
#if defined(OS_LINUX) || BUILDFLAG(IS_LACROS) #if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
// Windows, Mac, Android, iOS, and Chrome OS all provide a way to be notified // Windows, Mac, Android, iOS, and Chrome OS all provide a way to be notified
// when the system is suspending or resuming. The only one that does not is // when the system is suspending or resuming. The only one that does not is
// Linux so we need to poll to check for missed heartbeats. // Linux so we need to poll to check for missed heartbeats.
...@@ -201,7 +201,7 @@ void HeartbeatManager::RestartTimer() { ...@@ -201,7 +201,7 @@ void HeartbeatManager::RestartTimer() {
base::BindOnce(&HeartbeatManager::CheckForMissedHeartbeat, base::BindOnce(&HeartbeatManager::CheckForMissedHeartbeat,
weak_ptr_factory_.GetWeakPtr()), weak_ptr_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kHeartbeatMissedCheckMs)); base::TimeDelta::FromMilliseconds(kHeartbeatMissedCheckMs));
#endif // defined(OS_LINUX) || BUILDFLAG(IS_LACROS) #endif // defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
} }
void HeartbeatManager::CheckForMissedHeartbeat() { void HeartbeatManager::CheckForMissedHeartbeat() {
...@@ -217,14 +217,14 @@ void HeartbeatManager::CheckForMissedHeartbeat() { ...@@ -217,14 +217,14 @@ void HeartbeatManager::CheckForMissedHeartbeat() {
return; return;
} }
#if defined(OS_LINUX) || BUILDFLAG(IS_LACROS) #if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
// Otherwise check again later. // Otherwise check again later.
io_task_runner_->PostDelayedTask( io_task_runner_->PostDelayedTask(
FROM_HERE, FROM_HERE,
base::BindOnce(&HeartbeatManager::CheckForMissedHeartbeat, base::BindOnce(&HeartbeatManager::CheckForMissedHeartbeat,
weak_ptr_factory_.GetWeakPtr()), weak_ptr_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kHeartbeatMissedCheckMs)); base::TimeDelta::FromMilliseconds(kHeartbeatMissedCheckMs));
#endif // defined(OS_LINUX) || BUILDFLAG(IS_LACROS) #endif // defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
} }
void HeartbeatManager::UpdateHeartbeatInterval() { void HeartbeatManager::UpdateHeartbeatInterval() {
......
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