LaCrOS: Replace defined(OS_CHROMEOS) with BUILDFLAG(IS_CHROMEOS_ASH)
The change is mostly mechanical replacing defined(OS_CHROMEOS) with
BUILDFLAG(IS_CHROMEOS_ASH) and GN variable is_chromeos with is_ash
with some special cases (For those cases please refer to
http://go/lacros-macros).
The patch is made in preparation to switching lacros build from
target_os=linux to target_os=chromeos. This will prevent lacros from
changing behaviour after the switch.
Bug: 1052397
Change-Id: I47860f50a1428ebfe0b5276dc7ad58ad4512bc57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532482
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Bence Béky <[email protected]>
Commit-Queue: Yuta Hijikata <[email protected]>
Cr-Commit-Position: refs/heads/master@{#828631}
diff --git a/net/disk_cache/cache_util_unittest.cc b/net/disk_cache/cache_util_unittest.cc
index 32ee5a4..aa2023a 100644
--- a/net/disk_cache/cache_util_unittest.cc
+++ b/net/disk_cache/cache_util_unittest.cc
@@ -8,6 +8,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "build/chromeos_buildflags.h"
#include "net/disk_cache/cache_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -61,7 +62,7 @@
EXPECT_TRUE(base::PathExists(dest_file1_));
EXPECT_TRUE(base::PathExists(dest_file2_));
EXPECT_TRUE(base::PathExists(dest_dir1_));
-#if defined(OS_CHROMEOS)
+#if BUILDFLAG(IS_CHROMEOS_ASH)
EXPECT_TRUE(base::PathExists(cache_dir_)); // old cache dir stays
#else
EXPECT_FALSE(base::PathExists(cache_dir_)); // old cache is gone