blob: 5e9559e0fd7ba08184ffb511ffc72f6b9ebfde1c [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/variations/client_filterable_state.h"
#include "build/build_config.h"
namespace variations {
// static
Study::Platform ClientFilterableState::GetCurrentPlatform() {
#if defined(OS_WIN)
return Study::PLATFORM_WINDOWS;
#elif defined(OS_IOS)
return Study::PLATFORM_IOS;
#elif defined(OS_MACOSX)
return Study::PLATFORM_MAC;
#elif defined(OS_CHROMEOS)
return Study::PLATFORM_CHROMEOS;
#elif defined(OS_ANDROID)
return Study::PLATFORM_ANDROID;
#elif defined(OS_FUCHSIA)
return Study::PLATFORM_FUCHSIA;
#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
// Default BSD and SOLARIS to Linux to not break those builds, although these
// platforms are not officially supported by Chrome.
return Study::PLATFORM_LINUX;
#elif defined(STARBOARD)
// On Cobalt, the current OS/Platform are logged elsewhere. The return value
// here doesn't matter, but it needs to be something to keep the compiler
// happy.
return Study::PLATFORM_STARBOARD;
#else
#error Unknown platform
#endif
}
ClientFilterableState::ClientFilterableState() {}
ClientFilterableState::~ClientFilterableState() {}
} // namespace variations