| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 #include "components/feature_engagement_tracker/internal/condition_validator.h" | 5 #include "components/feature_engagement_tracker/internal/condition_validator.h" |
| 6 | 6 |
| 7 namespace feature_engagement_tracker { | 7 namespace feature_engagement_tracker { |
| 8 | 8 |
| 9 ConditionValidator::Result::Result(bool initial_values) | 9 ConditionValidator::Result::Result(bool initial_values) |
| 10 : model_ready_ok(initial_values), | 10 : event_model_ready_ok(initial_values), |
| 11 currently_showing_ok(initial_values), | 11 currently_showing_ok(initial_values), |
| 12 feature_enabled_ok(initial_values), | 12 feature_enabled_ok(initial_values), |
| 13 config_ok(initial_values), | 13 config_ok(initial_values), |
| 14 used_ok(initial_values), | 14 used_ok(initial_values), |
| 15 trigger_ok(initial_values), | 15 trigger_ok(initial_values), |
| 16 preconditions_ok(initial_values), | 16 preconditions_ok(initial_values), |
| 17 session_rate_ok(initial_values), | 17 session_rate_ok(initial_values), |
| 18 availability_model_ready_ok(initial_values), | 18 availability_model_ready_ok(initial_values), |
| 19 availability_ok(initial_values) {} | 19 availability_ok(initial_values) {} |
| 20 | 20 |
| 21 ConditionValidator::Result::Result(const Result& other) { | 21 ConditionValidator::Result::Result(const Result& other) { |
| 22 model_ready_ok = other.model_ready_ok; | 22 event_model_ready_ok = other.event_model_ready_ok; |
| 23 currently_showing_ok = other.currently_showing_ok; | 23 currently_showing_ok = other.currently_showing_ok; |
| 24 feature_enabled_ok = other.feature_enabled_ok; | 24 feature_enabled_ok = other.feature_enabled_ok; |
| 25 config_ok = other.config_ok; | 25 config_ok = other.config_ok; |
| 26 used_ok = other.used_ok; | 26 used_ok = other.used_ok; |
| 27 trigger_ok = other.trigger_ok; | 27 trigger_ok = other.trigger_ok; |
| 28 preconditions_ok = other.preconditions_ok; | 28 preconditions_ok = other.preconditions_ok; |
| 29 session_rate_ok = other.session_rate_ok; | 29 session_rate_ok = other.session_rate_ok; |
| 30 availability_model_ready_ok = other.availability_model_ready_ok; | 30 availability_model_ready_ok = other.availability_model_ready_ok; |
| 31 availability_ok = other.availability_ok; | 31 availability_ok = other.availability_ok; |
| 32 } | 32 } |
| 33 | 33 |
| 34 bool ConditionValidator::Result::NoErrors() { | 34 bool ConditionValidator::Result::NoErrors() const { |
| 35 return model_ready_ok && currently_showing_ok && feature_enabled_ok && | 35 return event_model_ready_ok && currently_showing_ok && feature_enabled_ok && |
| 36 config_ok && used_ok && trigger_ok && preconditions_ok && | 36 config_ok && used_ok && trigger_ok && preconditions_ok && |
| 37 session_rate_ok && availability_model_ready_ok && availability_ok; | 37 session_rate_ok && availability_model_ready_ok && availability_ok; |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace feature_engagement_tracker | 40 } // namespace feature_engagement_tracker |
| OLD | NEW |