Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / content / public / browser / background_tracing_config.h
blobb0e6611815dfb915d213fc16e77ba55add503605
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.
5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
8 #include "base/trace_event/trace_event_impl.h"
9 #include "content/common/content_export.h"
11 namespace base {
12 class DictionaryValue;
15 namespace content {
17 // BackgroundTracingConfig is passed to the BackgroundTracingManager to
18 // setup the trigger rules used to enable/disable background tracing.
19 struct CONTENT_EXPORT BackgroundTracingConfig {
20 virtual ~BackgroundTracingConfig();
22 enum Mode {
23 PREEMPTIVE_TRACING_MODE,
24 REACTIVE_TRACING_MODE,
26 enum CategoryPreset {
27 BENCHMARK,
28 BENCHMARK_DEEP,
29 BENCHMARK_GPU,
30 BENCHMARK_IPC
33 Mode mode;
35 static scoped_ptr<BackgroundTracingConfig> FromDict(
36 const base::DictionaryValue* dict);
37 static void IntoDict(const BackgroundTracingConfig* config,
38 base::DictionaryValue* dict);
40 protected:
41 explicit BackgroundTracingConfig(Mode mode);
44 } // namespace content
46 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_