| 612 | } |
| 613 | |
| 614 | Status ParseTriState(const char* flag_name, const std::string& flag_value, |
| 615 | TriStateFlag* tri_state) { |
| 616 | if (iequals(flag_value, "required")) { |
| 617 | *tri_state = TriStateFlag::REQUIRED; |
| 618 | } else if (iequals(flag_value, "optional")) { |
| 619 | *tri_state = TriStateFlag::OPTIONAL; |
| 620 | } else if (iequals(flag_value, "disabled")) { |
| 621 | *tri_state = TriStateFlag::DISABLED; |
| 622 | } else { |
| 623 | return Status::InvalidArgument(strings::Substitute( |
| 624 | "$0 flag must be one of 'required', 'optional', or 'disabled'", |
| 625 | flag_name)); |
| 626 | } |
| 627 | return Status::OK(); |
| 628 | } |
| 629 | |
| 630 | // Get the value of an environment variable that has boolean semantics. |
| 631 | bool GetBooleanEnvironmentVariable(const char* env_var_name) { |
no test coverage detected