| 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..43e75137a7de50eda6d73a330c62cb21a8804118
|
| --- /dev/null
|
| +++ b/components/subresource_filter/core/common/activation_state.cc
|
| @@ -0,0 +1,31 @@
|
| +// 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 "components/subresource_filter/core/common/activation_state.h"
|
| +
|
| +#include <ostream>
|
| +#include <sstream>
|
| +#include <string>
|
| +
|
| +#include "base/memory/ptr_util.h"
|
| +#include "base/trace_event/trace_event_argument.h"
|
| +
|
| +namespace subresource_filter {
|
| +
|
| +std::unique_ptr<base::trace_event::TracedValue> ActivationState::ToTracedValue()
|
| + const {
|
| + auto value = base::MakeUnique<base::trace_event::TracedValue>();
|
| + std::ostringstream level;
|
| + level << this;
|
| + value->SetString("activation_level", level.str());
|
| + value->SetBoolean("filtering_disabled_for_document",
|
| + filtering_disabled_for_document);
|
| + value->SetBoolean("generic_blocking_rules_disabled",
|
| + generic_blocking_rules_disabled);
|
| + value->SetBoolean("measure_performance", measure_performance);
|
| + value->SetBoolean("enable_logging", enable_logging);
|
| + return value;
|
| +}
|
| +
|
| +} // namespace subresource_filter
|
|
|