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

Side by Side Diff: content/public/browser/background_tracing_config.h

Issue 1089253003: Re-land first pass BackgroundTracingManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split config into separate headers and build fix. Created 5 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
7
8 #include "base/memory/ref_counted_memory.h"
9 #include "base/trace_event/trace_event_impl.h"
10 #include "content/common/content_export.h"
11
12 namespace base {
13 class DictionaryValue;
14 }
15
16 namespace content {
17
18 // BackgroundTracingConfig is passed to the BackgroundTracingManager to
19 // setup the trigger rules used to enable/disable background tracing.
20 struct CONTENT_EXPORT BackgroundTracingConfig
21 : public base::RefCountedThreadSafe<BackgroundTracingConfig> {
no sievers 2015/05/14 21:25:16 Why RefCounted? Seems overkill for a simple config
shatch 2015/05/15 21:00:51 Done.
22 enum Mode {
23 PREEMPTIVE_TRACING_MODE,
24 REACTIVE_TRACING_MODE,
25 };
26 enum CategoryPreset {
27 BENCHMARK,
28 BENCHMARK_DEEP,
29 };
30
no sievers 2015/05/14 21:25:16 Do you think we could get rid of the config base c
shatch 2015/05/15 21:00:51 When we talked offline, we kicked around the idea
31 Mode mode;
32
33 static BackgroundTracingConfig* FromDict(const base::DictionaryValue* dict);
34 static void IntoDict(const BackgroundTracingConfig* config,
35 base::DictionaryValue* dict);
36
37 protected:
38 friend class base::RefCountedThreadSafe<BackgroundTracingConfig>;
39
40 BackgroundTracingConfig(Mode mode);
41 virtual ~BackgroundTracingConfig();
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698