blob: bd2f86d90448b19f843f7b348c4710ce8fb1e8d2 [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 <string>
#include "base/macros.h"
#include "base/time/time.h"
#include "base/version.h"
#include "components/variations/proto/study.pb.h"
namespace variations {
// A container for all of the client state which is used for filtering studies.
struct ClientFilterableState {
static Study::Platform GetCurrentPlatform();
// The system locale.
std::string locale;
// The date on which the variations seed was fetched.
base::Time reference_date;
// The Chrome version to filter on.
base::Version version;
// The Channel for this Chrome installation.
Study::Channel channel;
// The hardware form factor that Chrome is running on.
Study::FormFactor form_factor;
// The OS on which Chrome is running.
Study::Platform platform;
// The named hardware configuration that Chrome is running on -- used to
// identify models of devices.
std::string hardware_class;
// Whether this is a low-end device. Currently only supported on Android.
// Based on base::SysInfo::IsLowEndDevice().
bool is_low_end_device = false;
// Whether this platform supports experiments which retain their group
// assignments across runs.
// TODO(paulmiller): Remove this once is resolved.
bool supports_permanent_consistency = true;
// The country code to use for studies configured with session consistency.
std::string session_consistency_country;
// The country code to use for studies configured with permanent consistency.
std::string permanent_consistency_country;
} // namespace variations