Chromium Code Reviews| Index: components/subresource_filter/core/common/activation_state.cc |
| diff --git a/components/subresource_filter/core/common/activation_state.cc b/components/subresource_filter/core/common/activation_state.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3461eb845f3e1b100cfc62b890d09e7d86655080 |
| --- /dev/null |
| +++ b/components/subresource_filter/core/common/activation_state.cc |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2016 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 "components/subresource_filter/core/common/activation_state.h" |
| + |
| +#include <ostream> |
| + |
| +#include "base/logging.h" |
| + |
| +namespace subresource_filter { |
| + |
| +std::ostream& operator<<(std::ostream& os, const ActivationState& state) { |
| + switch (state) { |
| + case ActivationState::DISABLED: |
| + os << "DISABLED"; |
| + break; |
| + case ActivationState::DRYRUN: |
| + os << "DRYRUN"; |
| + break; |
| + case ActivationState::ENABLED: |
| + os << "ENABLED"; |
| + break; |
| + default: |
| + NOTREACHED(); |
| + break; |
|
battre
2016/05/30 15:29:25
how about replacing default with LAST? The compile
engedy
2016/05/30 20:54:00
Could you please elaborate?
battre
2016/05/31 08:28:32
switch(state) {
case ActivationState::DISABLED:
engedy
2016/05/31 08:58:16
Are you sure we want to depend on non-standardized
|
| + } |
| + return os; |
| +} |
| + |
| +} // namespace subresource_filter |