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

Unified Diff: chrome/installer/util/experiment_metrics.cc

Issue 2889323004: Win 10 Inactive toast experiment metrics and storage modifications. (Closed)
Patch Set: Apply review comments Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/experiment_metrics.cc
diff --git a/chrome/installer/util/experiment_metrics.cc b/chrome/installer/util/experiment_metrics.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1a300cb9826e6005b39f27a06db3e2c58958f25f
--- /dev/null
+++ b/chrome/installer/util/experiment_metrics.cc
@@ -0,0 +1,30 @@
+// 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 "chrome/installer/util/experiment_metrics.h"
+
+namespace installer {
+
+bool ExperimentMetrics::InInitialState() const {
+ return state < kGroupAssigned;
+}
+
+bool ExperimentMetrics::InTerminalState() const {
+ return state == kSelectedNoThanks || state == kSelectedOpenChromeAndCrash ||
+ state == kSelectedOpenChromeAndNoCrash || state == kSelectedClose ||
+ state == kUserLogOff;
+}
+
+bool ExperimentMetrics::operator==(const ExperimentMetrics& other) const {
+ return group == other.group && state == other.state &&
+ toast_location == other.toast_location &&
+ toast_count == other.toast_count &&
+ first_toast_offset == other.first_toast_offset &&
+ toast_hour == other.toast_hour &&
+ last_used_bucket == other.last_used_bucket &&
+ action_delay_bucket == other.action_delay_bucket &&
+ session_length_bucket == other.session_length_bucket;
+}
+
+} // namespace installer

Powered by Google App Engine
This is Rietveld 408576698