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

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

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 15 matching lines...) Expand all
26 virtual bool ShouldTriggerNamedEvent(const std::string& named_event) const; 26 virtual bool ShouldTriggerNamedEvent(const std::string& named_event) const;
27 virtual BackgroundTracingConfigImpl::CategoryPreset GetCategoryPreset() const; 27 virtual BackgroundTracingConfigImpl::CategoryPreset GetCategoryPreset() const;
28 virtual void OnHistogramTrigger(const std::string& histogram_name) const {} 28 virtual void OnHistogramTrigger(const std::string& histogram_name) const {}
29 29
30 // Seconds from the rule is triggered to finalization should start. 30 // Seconds from the rule is triggered to finalization should start.
31 virtual int GetTraceTimeout() const; 31 virtual int GetTraceTimeout() const;
32 32
33 // Probability that we should allow a tigger to happen. 33 // Probability that we should allow a tigger to happen.
34 double trigger_chance() const { return trigger_chance_; } 34 double trigger_chance() const { return trigger_chance_; }
35 35
36 static scoped_ptr<BackgroundTracingRule> PreemptiveRuleFromDict( 36 static std::unique_ptr<BackgroundTracingRule> PreemptiveRuleFromDict(
37 const base::DictionaryValue* dict); 37 const base::DictionaryValue* dict);
38 38
39 static scoped_ptr<BackgroundTracingRule> ReactiveRuleFromDict( 39 static std::unique_ptr<BackgroundTracingRule> ReactiveRuleFromDict(
40 const base::DictionaryValue* dict, 40 const base::DictionaryValue* dict,
41 BackgroundTracingConfigImpl::CategoryPreset category_preset); 41 BackgroundTracingConfigImpl::CategoryPreset category_preset);
42 42
43 private: 43 private:
44 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingRule); 44 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingRule);
45 45
46 double trigger_chance_; 46 double trigger_chance_;
47 }; 47 };
48 48
49 } // namespace content 49 } // namespace content
50 50
51 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_RULE_H_ 51 #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