Replace IS_CHROMEOS_ASH with IS_CHROMEOS in rlz.
This is part of Lacros sunset. Since Lacros is gone, the two macros mean the same thing. Bug: 354842935 Change-Id: Idd15b6b7628df0bc52efef63be84407c7e754d99 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6325753 Commit-Queue: Yuta Hijikata <ythjkt@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/main@{#1428931}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
5c3996bdbd
commit
0203a61b19
@ -22,7 +22,6 @@
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "rlz/lib/lib_values.h"
|
||||
#include "rlz/lib/machine_id.h"
|
||||
#include "rlz/lib/rlz_lib.h"
|
||||
@ -38,7 +37,7 @@
|
||||
#include "base/time/time.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "base/i18n/time_formatting.h"
|
||||
#include "chromeos/ash/components/system/factory_ping_embargo_check.h"
|
||||
#include "rlz/chromeos/lib/rlz_value_store_chromeos.h"
|
||||
@ -46,7 +45,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
void RemoveMachineIdFromUrl(std::string* url) {
|
||||
size_t id_offset = url->find("&id=");
|
||||
EXPECT_NE(std::string::npos, id_offset);
|
||||
@ -93,7 +92,7 @@ TEST_F(FinancialPingTest, FormRequest) {
|
||||
// Don't check the machine Id on Chrome OS since a random one is generated
|
||||
// each time.
|
||||
std::string machine_id;
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
bool got_machine_id = false;
|
||||
#else
|
||||
bool got_machine_id = rlz_lib::GetMachineId(&machine_id);
|
||||
@ -103,7 +102,7 @@ TEST_F(FinancialPingTest, FormRequest) {
|
||||
EXPECT_TRUE(rlz_lib::FinancialPing::FormRequest(rlz_lib::TOOLBAR_NOTIFIER,
|
||||
points, "swg", brand, NULL, "en", false, &request));
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Ignore the machine Id of the request URL. On Chrome OS a random Id is
|
||||
// generated with each request.
|
||||
RemoveMachineIdFromUrl(&request);
|
||||
@ -123,7 +122,7 @@ TEST_F(FinancialPingTest, FormRequest) {
|
||||
EXPECT_TRUE(rlz_lib::FinancialPing::FormRequest(rlz_lib::TOOLBAR_NOTIFIER,
|
||||
points, "swg", brand, "IdOk2", NULL, false, &request));
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Ignore the machine Id of the request URL. On Chrome OS a random Id is
|
||||
// generated with each request.
|
||||
RemoveMachineIdFromUrl(&request);
|
||||
@ -317,7 +316,7 @@ TEST_F(FinancialPingTest, ClearLastPingTime) {
|
||||
false));
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
TEST_F(FinancialPingTest, RlzEmbargoEndDate) {
|
||||
// Do not set last ping time, verify that |IsPingTime| returns true.
|
||||
EXPECT_TRUE(
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "base/hash/sha1.h"
|
||||
#include "base/rand_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "rlz/lib/assert.h"
|
||||
#include "rlz/lib/crc8.h"
|
||||
#include "rlz/lib/string_utils.h"
|
||||
@ -22,7 +22,7 @@ bool GetMachineId(std::string* machine_id) {
|
||||
if (!machine_id)
|
||||
return false;
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
// Generate a random machine Id each time this function is called. This
|
||||
// prevents the RLZ server from correlating two RLZ pings from the same
|
||||
@ -63,7 +63,7 @@ bool GetMachineId(std::string* machine_id) {
|
||||
calculated_id = *machine_id;
|
||||
return true;
|
||||
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
}
|
||||
|
||||
namespace testing {
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "rlz/test/rlz_test_helpers.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
@ -21,7 +21,7 @@ TEST(MachineDealCodeTestMachineId, MachineId) {
|
||||
id.c_str());
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
TEST(MachineDealCodeTestMachineId, MachineIdIsUnique) {
|
||||
std::string id1;
|
||||
std::string id2;
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "base/threading/platform_thread.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "net/base/backoff_entry.h"
|
||||
#include "rlz/lib/assert.h"
|
||||
#include "rlz/lib/financial_ping.h"
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/test/task_environment.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "rlz/lib/financial_ping.h"
|
||||
#include "rlz/lib/lib_values.h"
|
||||
#include "rlz/lib/net_response_check.h"
|
||||
@ -53,7 +52,7 @@
|
||||
#include "services/network/public/mojom/url_loader_factory.mojom.h"
|
||||
#include "services/network/test/test_url_loader_factory.h"
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "base/files/important_file_writer.h"
|
||||
#include "chromeos/ash/components/dbus/dbus_thread_manager.h"
|
||||
#include "chromeos/ash/components/dbus/debug_daemon/debug_daemon_client.h"
|
||||
@ -259,7 +258,7 @@ TEST_F(RlzLibTest, SetAccessPointRlz) {
|
||||
EXPECT_STREQ("IeTbRlz", rlz_50);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
TEST_F(RlzLibTest, SetAccessPointRlzOnlyOnce) {
|
||||
// On Chrome OS, and RLZ string can ne set only once.
|
||||
char rlz_50[50];
|
||||
@ -523,7 +522,7 @@ TEST_F(RlzLibTest, ParsePingResponse) {
|
||||
EXPECT_TRUE(rlz_lib::ParsePingResponse(rlz_lib::TOOLBAR_NOTIFIER,
|
||||
kPingResponse2));
|
||||
EXPECT_TRUE(rlz_lib::GetAccessPointRlz(rlz_lib::IETB_SEARCH_BOX, value, 50));
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// On Chrome OS, the RLZ string is not modified by response once set.
|
||||
EXPECT_STREQ("1T4_____en__252", value);
|
||||
#else
|
||||
@ -534,7 +533,7 @@ TEST_F(RlzLibTest, ParsePingResponse) {
|
||||
"crc32: 0\r\n"; // Good RLZ - empty response.
|
||||
EXPECT_TRUE(rlz_lib::ParsePingResponse(rlz_lib::TOOLBAR_NOTIFIER,
|
||||
kPingResponse3));
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// On Chrome OS, the RLZ string is not modified by response once set.
|
||||
EXPECT_STREQ("1T4_____en__252", value);
|
||||
#else
|
||||
@ -1128,7 +1127,7 @@ TEST_F(RlzLibTest, LockAcquistionSucceedsButStoreFileCannotBeCreated) {
|
||||
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
class ScopedTestDebugDaemonClient : public ash::FakeDebugDaemonClient {
|
||||
public:
|
||||
ScopedTestDebugDaemonClient() {
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "rlz/lib/rlz_lib.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
@ -187,15 +186,15 @@ void RlzLibTestBase::SetUp() {
|
||||
EXPECT_TRUE(rlz_lib::SetAccessPointRlz(rlz_lib::IE_HOME_PAGE, ""));
|
||||
#endif // BUILDFLAG(IS_POSIX)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
statistics_provider_ =
|
||||
std::make_unique<ash::system::FakeStatisticsProvider>();
|
||||
ash::system::StatisticsProvider::SetTestProvider(statistics_provider_.get());
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
}
|
||||
|
||||
void RlzLibTestBase::TearDown() {
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
ash::system::StatisticsProvider::SetTestProvider(nullptr);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
#if BUILDFLAG(IS_POSIX)
|
||||
@ -20,7 +19,7 @@
|
||||
#include "base/test/test_reg_util_win.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "chromeos/ash/components/system/fake_statistics_provider.h"
|
||||
#endif
|
||||
|
||||
@ -59,7 +58,7 @@ class RlzLibTestBase : public RlzLibTestNoMachineState {
|
||||
void SetUp() override;
|
||||
void TearDown() override;
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
std::unique_ptr<ash::system::FakeStatisticsProvider> statistics_provider_;
|
||||
#endif
|
||||
};
|
||||
|
Reference in New Issue
Block a user