[go: nahoru, domu]

LaCrOS: Replace defined(OS_CHROMEOS) with BUILDFLAG(IS_ASH)

The change is mostly mechanical replacing defined(OS_CHROMEOS) with BUILDFLAG(IS_ASH) and GN variable is_chromeos with is_ash. Only the insertion of "//build:chromeos_buildflags" into appropriate deps in BUILD.gn is done semi-manualy. The change should not change the behaviour of any build.

This is in preparation to switching lacros build from target_os=linux to target_os=chromeos so that lacros does not include any additional code due the switch.

Please note that any new defined(OS_CHROMEOS) and is_chromeos introduced to should be consistent with the new meaning.

Please refer to this short document http://go/lacros-replace-chromeos-macro-with-ash for full context.

Bug: 1052397
Change-Id: I12e6a89c1e06b7223f37e9d916e1c101d1f8b8e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494405
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820518}
diff --git a/media/gpu/vp9_decoder.cc b/media/gpu/vp9_decoder.cc
index a36e204..29cd176 100644
--- a/media/gpu/vp9_decoder.cc
+++ b/media/gpu/vp9_decoder.cc
@@ -10,6 +10,7 @@
 #include "base/feature_list.h"
 #include "base/logging.h"
 #include "build/build_config.h"
+#include "build/chromeos_buildflags.h"
 #include "media/base/limits.h"
 #include "media/base/media_switches.h"
 #include "media/gpu/vp9_decoder.h"
@@ -19,7 +20,7 @@
 namespace {
 std::vector<uint32_t> GetSpatialLayerFrameSize(
     const DecoderBuffer& decoder_buffer) {
-#if defined(ARCH_CPU_X86_FAMILY) && defined(OS_CHROMEOS)
+#if defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_ASH)
   const uint32_t* cue_data =
       reinterpret_cast<const uint32_t*>(decoder_buffer.side_data());
   if (!cue_data) {
@@ -36,7 +37,7 @@
     return {};
   }
   return std::vector<uint32_t>(cue_data, cue_data + num_of_layers);
-#endif  // defined(ARCH_CPU_X86_FAMILY) && defined(OS_CHROMEOS)
+#endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_ASH)
   return {};
 }