#include "chrome/browser/enterprise/signals/device_info_fetcher.h"
#include "build/build_config.h"
#if BUILDFLAG(IS_MAC)
#include "chrome/browser/enterprise/signals/device_info_fetcher_mac.h"
#elif BUILDFLAG(IS_WIN)
#include "chrome/browser/enterprise/signals/device_info_fetcher_win.h"
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#include "chrome/browser/enterprise/signals/device_info_fetcher_linux.h"
#endif
namespace enterprise_signals {
namespace {
bool force_stub_for_testing = …;
class StubDeviceFetcher : public DeviceInfoFetcher { … };
}
DeviceInfo::DeviceInfo() = default;
DeviceInfo::~DeviceInfo() = default;
DeviceInfo::DeviceInfo(const DeviceInfo&) = default;
DeviceInfo::DeviceInfo(DeviceInfo&&) = default;
DeviceInfoFetcher::DeviceInfoFetcher() = default;
DeviceInfoFetcher::~DeviceInfoFetcher() = default;
std::unique_ptr<DeviceInfoFetcher> DeviceInfoFetcher::CreateInstance() { … }
#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && \
!(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
std::unique_ptr<DeviceInfoFetcher> DeviceInfoFetcher::CreateInstanceInternal() {
return std::make_unique<StubDeviceFetcher>();
}
#endif
std::unique_ptr<DeviceInfoFetcher>
DeviceInfoFetcher::CreateStubInstanceForTesting() { … }
void DeviceInfoFetcher::SetForceStubForTesting(bool should_force) { … }
}