Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: content/browser/tracing/background_tracing_rule.h

Issue 2285853002: Reland of Background tracing: Added config option for repeated trigger behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorrect removal Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_RULE_H_ 5 #ifndef CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_RULE_H_
6 #define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_RULE_H_ 6 #define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_RULE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/tracing/background_tracing_config_impl.h" 9 #include "content/browser/tracing/background_tracing_config_impl.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 24 matching lines...) Expand all
35 virtual void IntoDict(base::DictionaryValue* dict) const; 35 virtual void IntoDict(base::DictionaryValue* dict) const;
36 virtual bool ShouldTriggerNamedEvent(const std::string& named_event) const; 36 virtual bool ShouldTriggerNamedEvent(const std::string& named_event) const;
37 virtual void OnHistogramTrigger(const std::string& histogram_name) const {} 37 virtual void OnHistogramTrigger(const std::string& histogram_name) const {}
38 38
39 // Seconds from the rule is triggered to finalization should start. 39 // Seconds from the rule is triggered to finalization should start.
40 virtual int GetTraceDelay() const; 40 virtual int GetTraceDelay() const;
41 41
42 // Probability that we should allow a tigger to happen. 42 // Probability that we should allow a tigger to happen.
43 double trigger_chance() const { return trigger_chance_; } 43 double trigger_chance() const { return trigger_chance_; }
44 44
45 bool stop_tracing_on_repeated_reactive() const {
46 return stop_tracing_on_repeated_reactive_;
47 }
48
45 static std::unique_ptr<BackgroundTracingRule> CreateRuleFromDict( 49 static std::unique_ptr<BackgroundTracingRule> CreateRuleFromDict(
46 const base::DictionaryValue* dict); 50 const base::DictionaryValue* dict);
47 51
48 private: 52 private:
49 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingRule); 53 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingRule);
50 54
51 double trigger_chance_; 55 double trigger_chance_;
52 int trigger_delay_; 56 int trigger_delay_;
57 bool stop_tracing_on_repeated_reactive_;
53 BackgroundTracingConfigImpl::CategoryPreset category_preset_; 58 BackgroundTracingConfigImpl::CategoryPreset category_preset_;
54 }; 59 };
55 60
56 } // namespace content 61 } // namespace content
57 62
58 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_RULE_H_ 63 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_RULE_H_
OLDNEW
« no previous file with comments | « content/browser/tracing/background_tracing_manager_impl.cc ('k') | content/browser/tracing/background_tracing_rule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698