Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: components/variations/client_filterable_state.h

Issue 2924983003: [Variations] Refactor all state used for study filtering into a container struct. (Closed)
Patch Set: A bit more cleanup Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/variations/BUILD.gn ('k') | components/variations/client_filterable_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_VARIATIONS_CLIENT_FILTERABLE_STATE_H_
6 #define COMPONENTS_VARIATIONS_CLIENT_FILTERABLE_STATE_H_
7
8 #include "base/macros.h"
9 #include "base/time/time.h"
10 #include "base/version.h"
11 #include "components/variations/proto/study.pb.h"
12
13 namespace variations {
14
15 // A contianer for all of the client state which is used for filtering studies.
16 struct ClientFilterableState {
17 static Study::Platform GetCurrentPlatform();
18
19 ClientFilterableState();
20 ~ClientFilterableState();
21
22 // The system locale.
23 std::string locale;
24
25 // The date on which the variations seed was fetched.
26 base::Time reference_date;
27
28 // The Chrome version to filter on.
29 base::Version version;
30
31 // The Channel for this Chrome installation.
32 Study::Channel channel;
33
34 // The hardware form factor that Chrome is running on.
35 Study::FormFactor form_factor;
36
37 // The OS on which Chrome is running.
38 Study::Platform platform;
39
40 // The named hardware configuration that Chrome is running on -- used to
41 // identify models of devices.
42 std::string hardware_class;
43
44 // The country code to use for studies configured with session consistency.
45 std::string session_consistency_country;
46
47 // The country code to use for studies configured with permanent consistency.
48 std::string permanent_consistency_country;
49
50 private:
51 DISALLOW_COPY_AND_ASSIGN(ClientFilterableState);
52 };
53
54 } // namespace variations
55
56 #endif // COMPONENTS_VARIATIONS_CLIENT_FILTERABLE_STATE_H_
OLDNEW
« no previous file with comments | « components/variations/BUILD.gn ('k') | components/variations/client_filterable_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698