OLD | NEW |
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_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_ |
6 #define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_ |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/memory/ref_counted_memory.h" | 9 #include "base/memory/ref_counted_memory.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 private: | 38 private: |
39 BackgroundTracingManagerImpl(); | 39 BackgroundTracingManagerImpl(); |
40 ~BackgroundTracingManagerImpl() override; | 40 ~BackgroundTracingManagerImpl() override; |
41 | 41 |
42 void EnableRecording(std::string, base::trace_event::TraceRecordMode); | 42 void EnableRecording(std::string, base::trace_event::TraceRecordMode); |
43 void EnableRecordingIfConfigNeedsIt(); | 43 void EnableRecordingIfConfigNeedsIt(); |
44 void OnFinalizeStarted(scoped_refptr<base::RefCountedString>); | 44 void OnFinalizeStarted(scoped_refptr<base::RefCountedString>); |
45 void OnFinalizeComplete(); | 45 void OnFinalizeComplete(); |
46 void BeginFinalizing(StartedFinalizingCallback); | 46 void BeginFinalizing(StartedFinalizingCallback); |
47 | 47 |
| 48 scoped_ptr<base::DictionaryValue> GenerateMetadataDict() const; |
| 49 |
48 std::string GetTriggerNameFromHandle(TriggerHandle handle) const; | 50 std::string GetTriggerNameFromHandle(TriggerHandle handle) const; |
49 bool IsTriggerHandleValid(TriggerHandle handle) const; | 51 bool IsTriggerHandleValid(TriggerHandle handle) const; |
50 | 52 |
51 bool IsAbleToTriggerTracing(TriggerHandle handle) const; | 53 bool IsAbleToTriggerTracing(TriggerHandle handle) const; |
52 bool IsSupportedConfig(BackgroundTracingConfig* config); | 54 bool IsSupportedConfig(BackgroundTracingConfig* config); |
53 | 55 |
54 std::string GetCategoryFilterStringForCategoryPreset( | 56 std::string GetCategoryFilterStringForCategoryPreset( |
55 BackgroundTracingConfig::CategoryPreset) const; | 57 BackgroundTracingConfig::CategoryPreset) const; |
56 | 58 |
57 class TraceDataEndpointWrapper | 59 class TraceDataEndpointWrapper |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 base::Closure tracing_enabled_callback_for_testing_; | 103 base::Closure tracing_enabled_callback_for_testing_; |
102 | 104 |
103 friend struct base::DefaultLazyInstanceTraits<BackgroundTracingManagerImpl>; | 105 friend struct base::DefaultLazyInstanceTraits<BackgroundTracingManagerImpl>; |
104 | 106 |
105 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingManagerImpl); | 107 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingManagerImpl); |
106 }; | 108 }; |
107 | 109 |
108 } // namespace content | 110 } // namespace content |
109 | 111 |
110 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_ | 112 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_ |
OLD | NEW |