| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_CONFIG_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_CONFIG_IMPL_H_ |
| 6 #define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_CONFIG_IMPL_H_ | 6 #define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_CONFIG_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 const std::string& disable_blink_features() const { | 47 const std::string& disable_blink_features() const { |
| 48 return disable_blink_features_; | 48 return disable_blink_features_; |
| 49 } | 49 } |
| 50 | 50 |
| 51 void AddPreemptiveRule(const base::DictionaryValue* dict); | 51 void AddPreemptiveRule(const base::DictionaryValue* dict); |
| 52 void AddReactiveRule( | 52 void AddReactiveRule( |
| 53 const base::DictionaryValue* dict, | 53 const base::DictionaryValue* dict, |
| 54 BackgroundTracingConfigImpl::CategoryPreset category_preset); | 54 BackgroundTracingConfigImpl::CategoryPreset category_preset); |
| 55 | 55 |
| 56 static scoped_ptr<BackgroundTracingConfigImpl> PreemptiveFromDict( | 56 static std::unique_ptr<BackgroundTracingConfigImpl> PreemptiveFromDict( |
| 57 const base::DictionaryValue* dict); | 57 const base::DictionaryValue* dict); |
| 58 static scoped_ptr<BackgroundTracingConfigImpl> ReactiveFromDict( | 58 static std::unique_ptr<BackgroundTracingConfigImpl> ReactiveFromDict( |
| 59 const base::DictionaryValue* dict); | 59 const base::DictionaryValue* dict); |
| 60 | 60 |
| 61 static scoped_ptr<BackgroundTracingConfigImpl> FromDict( | 61 static std::unique_ptr<BackgroundTracingConfigImpl> FromDict( |
| 62 const base::DictionaryValue* dict); | 62 const base::DictionaryValue* dict); |
| 63 | 63 |
| 64 static std::string CategoryPresetToString( | 64 static std::string CategoryPresetToString( |
| 65 BackgroundTracingConfigImpl::CategoryPreset category_preset); | 65 BackgroundTracingConfigImpl::CategoryPreset category_preset); |
| 66 static bool StringToCategoryPreset( | 66 static bool StringToCategoryPreset( |
| 67 const std::string& category_preset_string, | 67 const std::string& category_preset_string, |
| 68 BackgroundTracingConfigImpl::CategoryPreset* category_preset); | 68 BackgroundTracingConfigImpl::CategoryPreset* category_preset); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 FRIEND_TEST_ALL_PREFIXES(BackgroundTracingConfigTest, | 71 FRIEND_TEST_ALL_PREFIXES(BackgroundTracingConfigTest, |
| 72 ValidPreemptiveConfigToString); | 72 ValidPreemptiveConfigToString); |
| 73 | 73 |
| 74 CategoryPreset category_preset_; | 74 CategoryPreset category_preset_; |
| 75 ScopedVector<BackgroundTracingRule> rules_; | 75 ScopedVector<BackgroundTracingRule> rules_; |
| 76 std::string scenario_name_; | 76 std::string scenario_name_; |
| 77 std::string enable_blink_features_; | 77 std::string enable_blink_features_; |
| 78 std::string disable_blink_features_; | 78 std::string disable_blink_features_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingConfigImpl); | 80 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingConfigImpl); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace content | 83 } // namespace content |
| 84 | 84 |
| 85 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_CONFIG_IMPL_H_ | 85 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_CONFIG_IMPL_H_ |
| OLD | NEW |