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

Side by Side Diff: components/metrics/metrics_service.h

Issue 421653005: Adding synthetic field trial for DataReductionProxyEnabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newPltWithCL
Patch Set: Created 6 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines a service that collects information about the user 5 // This file defines a service that collects information about the user
6 // experience in order to help improve future versions of the app. 6 // experience in order to help improve future versions of the app.
7 7
8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ 8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_
9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Chrome configuration state. For example, the trial name could map to 60 // Chrome configuration state. For example, the trial name could map to
61 // a preference name, and the group name could map to a preference value. 61 // a preference name, and the group name could map to a preference value.
62 struct SyntheticTrialGroup { 62 struct SyntheticTrialGroup {
63 public: 63 public:
64 ~SyntheticTrialGroup(); 64 ~SyntheticTrialGroup();
65 65
66 variations::ActiveGroupId id; 66 variations::ActiveGroupId id;
67 base::TimeTicks start_time; 67 base::TimeTicks start_time;
68 68
69 private: 69 private:
70 //Synthetic field trial users:
70 friend class MetricsService; 71 friend class MetricsService;
72 friend class DataReductionProxyChromeSettings;
Alexei Svitkine (slow) 2014/07/30 17:27:04 This is a layering violation, since the component
megjablon 2014/07/30 18:50:48 Done.
71 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); 73 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial);
72 74
73 // This constructor is private specifically so as to control which code is 75 // This constructor is private specifically so as to control which code is
74 // able to access it. New code that wishes to use it should be added as a 76 // able to access it. New code that wishes to use it should be added as a
75 // friend class. 77 // friend class.
76 SyntheticTrialGroup(uint32 trial, uint32 group); 78 SyntheticTrialGroup(uint32 trial, uint32 group);
77 }; 79 };
78 80
79 class MetricsService : public base::HistogramFlattener { 81 class MetricsService : public base::HistogramFlattener {
80 public: 82 public:
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess); 464 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess);
463 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver); 465 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver);
464 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, 466 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest,
465 PermutedEntropyCacheClearedWhenLowEntropyReset); 467 PermutedEntropyCacheClearedWhenLowEntropyReset);
466 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); 468 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial);
467 469
468 DISALLOW_COPY_AND_ASSIGN(MetricsService); 470 DISALLOW_COPY_AND_ASSIGN(MetricsService);
469 }; 471 };
470 472
471 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ 473 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698