| Index: content/browser/tracing/background_tracing_config_impl.cc
|
| diff --git a/content/browser/tracing/background_tracing_config_impl.cc b/content/browser/tracing/background_tracing_config_impl.cc
|
| index 741e90e912f1634ed10f7a0954ed24122a986497..25d6aa917a7fd65188065d73e42c9e3d8e223d98 100644
|
| --- a/content/browser/tracing/background_tracing_config_impl.cc
|
| +++ b/content/browser/tracing/background_tracing_config_impl.cc
|
| @@ -117,9 +117,10 @@ void BackgroundTracingConfigImpl::IntoDict(base::DictionaryValue* dict) const {
|
| break;
|
| }
|
|
|
| - scoped_ptr<base::ListValue> configs_list(new base::ListValue());
|
| + std::unique_ptr<base::ListValue> configs_list(new base::ListValue());
|
| for (const auto& it : rules_) {
|
| - scoped_ptr<base::DictionaryValue> config_dict(new base::DictionaryValue());
|
| + std::unique_ptr<base::DictionaryValue> config_dict(
|
| + new base::DictionaryValue());
|
| DCHECK(it);
|
| it->IntoDict(config_dict.get());
|
| configs_list->Append(std::move(config_dict));
|
| @@ -137,7 +138,7 @@ void BackgroundTracingConfigImpl::IntoDict(base::DictionaryValue* dict) const {
|
|
|
| void BackgroundTracingConfigImpl::AddPreemptiveRule(
|
| const base::DictionaryValue* dict) {
|
| - scoped_ptr<BackgroundTracingRule> rule =
|
| + std::unique_ptr<BackgroundTracingRule> rule =
|
| BackgroundTracingRule::PreemptiveRuleFromDict(dict);
|
| if (rule)
|
| rules_.push_back(std::move(rule));
|
| @@ -146,21 +147,21 @@ void BackgroundTracingConfigImpl::AddPreemptiveRule(
|
| void BackgroundTracingConfigImpl::AddReactiveRule(
|
| const base::DictionaryValue* dict,
|
| BackgroundTracingConfigImpl::CategoryPreset category_preset) {
|
| - scoped_ptr<BackgroundTracingRule> rule =
|
| + std::unique_ptr<BackgroundTracingRule> rule =
|
| BackgroundTracingRule::ReactiveRuleFromDict(dict, category_preset);
|
| if (rule)
|
| rules_.push_back(std::move(rule));
|
| }
|
|
|
| -scoped_ptr<BackgroundTracingConfigImpl> BackgroundTracingConfigImpl::FromDict(
|
| - const base::DictionaryValue* dict) {
|
| +std::unique_ptr<BackgroundTracingConfigImpl>
|
| +BackgroundTracingConfigImpl::FromDict(const base::DictionaryValue* dict) {
|
| DCHECK(dict);
|
|
|
| std::string mode;
|
| if (!dict->GetString(kConfigModeKey, &mode))
|
| return nullptr;
|
|
|
| - scoped_ptr<BackgroundTracingConfigImpl> config;
|
| + std::unique_ptr<BackgroundTracingConfigImpl> config;
|
|
|
| if (mode == kConfigModePreemptive) {
|
| config = PreemptiveFromDict(dict);
|
| @@ -181,12 +182,12 @@ scoped_ptr<BackgroundTracingConfigImpl> BackgroundTracingConfigImpl::FromDict(
|
| return config;
|
| }
|
|
|
| -scoped_ptr<BackgroundTracingConfigImpl>
|
| +std::unique_ptr<BackgroundTracingConfigImpl>
|
| BackgroundTracingConfigImpl::PreemptiveFromDict(
|
| const base::DictionaryValue* dict) {
|
| DCHECK(dict);
|
|
|
| - scoped_ptr<BackgroundTracingConfigImpl> config(
|
| + std::unique_ptr<BackgroundTracingConfigImpl> config(
|
| new BackgroundTracingConfigImpl(BackgroundTracingConfigImpl::PREEMPTIVE));
|
|
|
| std::string category_preset_string;
|
| @@ -215,12 +216,12 @@ BackgroundTracingConfigImpl::PreemptiveFromDict(
|
| return config;
|
| }
|
|
|
| -scoped_ptr<BackgroundTracingConfigImpl>
|
| +std::unique_ptr<BackgroundTracingConfigImpl>
|
| BackgroundTracingConfigImpl::ReactiveFromDict(
|
| const base::DictionaryValue* dict) {
|
| DCHECK(dict);
|
|
|
| - scoped_ptr<BackgroundTracingConfigImpl> config(
|
| + std::unique_ptr<BackgroundTracingConfigImpl> config(
|
| new BackgroundTracingConfigImpl(BackgroundTracingConfigImpl::REACTIVE));
|
|
|
| const base::ListValue* configs_list = nullptr;
|
|
|