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

Lacros: Rename deprecated macro name.

This change renames deprecated macro name IS_LACROS and IS_ASH
with IS_CHROMEOS_LACROS and IS_CHROMEOS_ASH.

Bug: 1052397
Change-Id: I58d95a81555a4915b8e80edc1edd23cc3f7d49bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626685
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842984}
parent 2b46ca81
......@@ -146,12 +146,13 @@ class CppBundleGenerator(object):
for platform in model_object.platforms:
if platform == Platforms.CHROMEOS:
# TODO(https://crbug.com/1052397): For readability, this should become
# defined(OS_CHROMEOS) && BUILDFLAG(IS_ASH).
ifdefs.append('(defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS))')
# defined(OS_CHROMEOS) && BUILDFLAG(IS_CHROMEOS_ASH).
ifdefs.append('(defined(OS_CHROMEOS) && '
'!BUILDFLAG(IS_CHROMEOS_LACROS))')
elif platform == Platforms.LACROS:
# TODO(https://crbug.com/1052397): For readability, this should become
# defined(OS_CHROMEOS) && BUILDFLAG(IS_LACROS).
ifdefs.append('BUILDFLAG(IS_LACROS)')
# defined(OS_CHROMEOS) && BUILDFLAG(IS_CHROMEOS_LACROS).
ifdefs.append('BUILDFLAG(IS_CHROMEOS_LACROS)')
elif platform == Platforms.LINUX:
ifdefs.append('(defined(OS_LINUX) && !defined(OS_CHROMEOS))')
elif platform == Platforms.MAC:
......
......@@ -36,13 +36,14 @@ class CppBundleGeneratorTest(unittest.TestCase):
'test/function_platform_all.json')
self.assertEquals(
'defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || '
'(defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS))',
'(defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_LACROS))',
_getPlatformIfdefs(cpp_bundle_generator, model))
def testIfDefsForChromeOS(self):
cpp_bundle_generator, model = _createCppBundleGenerator(
'test/function_platform_chromeos.json')
self.assertEquals('(defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS))',
self.assertEquals('(defined(OS_CHROMEOS) && '
'!BUILDFLAG(IS_CHROMEOS_LACROS))',
_getPlatformIfdefs(cpp_bundle_generator, model))
......
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