Chromium Code Reviews| Index: content/browser/tracing/background_tracing_rule.h |
| diff --git a/content/browser/tracing/background_tracing_rule.h b/content/browser/tracing/background_tracing_rule.h |
| index c5407ba83b11df5b3bca25d0442558efb7fb0cad..2526cb0821214beaabfff97df683f5e5338a01e1 100644 |
| --- a/content/browser/tracing/background_tracing_rule.h |
| +++ b/content/browser/tracing/background_tracing_rule.h |
| @@ -20,7 +20,8 @@ class CONTENT_EXPORT BackgroundTracingRule { |
| virtual ~BackgroundTracingRule(); |
| virtual void Install() {} |
| - virtual void IntoDict(base::DictionaryValue* dict) const = 0; |
| + virtual void IntoDict(base::DictionaryValue* dict) const; |
| + virtual void FromDict(const base::DictionaryValue* dict); |
|
shatch
2015/10/30 15:50:28
Does this need to be virtual?
oystein (OOO til 10th of July)
2015/10/30 19:11:43
Done.
|
| virtual bool ShouldTriggerNamedEvent(const std::string& named_event) const; |
| virtual BackgroundTracingConfigImpl::CategoryPreset GetCategoryPreset() const; |
| virtual void OnHistogramTrigger(const std::string& histogram_name) const {} |
| @@ -28,6 +29,9 @@ class CONTENT_EXPORT BackgroundTracingRule { |
| // Seconds from the rule is triggered to finalization should start. |
| virtual int GetTraceTimeout() const; |
| + // Probability that we should allow a tigger to happen. |
| + double trigger_chance() const { return trigger_chance_; } |
| + |
| static scoped_ptr<BackgroundTracingRule> PreemptiveRuleFromDict( |
| const base::DictionaryValue* dict); |
| @@ -37,6 +41,8 @@ class CONTENT_EXPORT BackgroundTracingRule { |
| private: |
| DISALLOW_COPY_AND_ASSIGN(BackgroundTracingRule); |
| + |
| + double trigger_chance_; |
| }; |
| } // namespace content |