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

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

Issue 1165673002: [Startup Tracing] Hook up TraceConfig and remove CategoryFilter & TraceOptions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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_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 16 matching lines...) Expand all
27 void TriggerNamedEvent(TriggerHandle, StartedFinalizingCallback) override; 27 void TriggerNamedEvent(TriggerHandle, StartedFinalizingCallback) override;
28 TriggerHandle RegisterTriggerType(const char* trigger_name) override; 28 TriggerHandle RegisterTriggerType(const char* trigger_name) override;
29 void GetTriggerNameList(std::vector<std::string>* trigger_names) override; 29 void GetTriggerNameList(std::vector<std::string>* trigger_names) override;
30 30
31 void InvalidateTriggerHandlesForTesting() override; 31 void InvalidateTriggerHandlesForTesting() override;
32 32
33 private: 33 private:
34 BackgroundTracingManagerImpl(); 34 BackgroundTracingManagerImpl();
35 ~BackgroundTracingManagerImpl() override; 35 ~BackgroundTracingManagerImpl() override;
36 36
37 void EnableRecording(base::trace_event::CategoryFilter); 37 void EnableRecording(std::string category_filter_str);
38 void EnableRecordingIfConfigNeedsIt(); 38 void EnableRecordingIfConfigNeedsIt();
39 void OnFinalizeStarted(scoped_refptr<base::RefCountedString>); 39 void OnFinalizeStarted(scoped_refptr<base::RefCountedString>);
40 void OnFinalizeComplete(); 40 void OnFinalizeComplete();
41 void BeginFinalizing(StartedFinalizingCallback); 41 void BeginFinalizing(StartedFinalizingCallback);
42 42
43 std::string GetTriggerNameFromHandle(TriggerHandle handle) const; 43 std::string GetTriggerNameFromHandle(TriggerHandle handle) const;
44 bool IsTriggerHandleValid(TriggerHandle handle) const; 44 bool IsTriggerHandleValid(TriggerHandle handle) const;
45 45
46 bool IsAbleToTriggerTracing(TriggerHandle handle) const; 46 bool IsAbleToTriggerTracing(TriggerHandle handle) const;
47 bool IsSupportedConfig(BackgroundTracingConfig* config); 47 bool IsSupportedConfig(BackgroundTracingConfig* config);
48 48
49 base::trace_event::CategoryFilter GetCategoryFilterForCategoryPreset( 49 std::string GetCategoryFilterStringForCategoryPreset(
50 BackgroundTracingConfig::CategoryPreset) const; 50 BackgroundTracingConfig::CategoryPreset) const;
51 51
52 class TraceDataEndpointWrapper 52 class TraceDataEndpointWrapper
53 : public content::TracingController::TraceDataEndpoint { 53 : public content::TracingController::TraceDataEndpoint {
54 public: 54 public:
55 TraceDataEndpointWrapper(base::Callback< 55 TraceDataEndpointWrapper(base::Callback<
56 void(scoped_refptr<base::RefCountedString>)> done_callback); 56 void(scoped_refptr<base::RefCountedString>)> done_callback);
57 57
58 void ReceiveTraceFinalContents(const std::string& file_contents) override; 58 void ReceiveTraceFinalContents(const std::string& file_contents) override;
59 59
(...skipping 16 matching lines...) Expand all
76 IdleCallback idle_callback_; 76 IdleCallback idle_callback_;
77 77
78 friend struct base::DefaultLazyInstanceTraits<BackgroundTracingManagerImpl>; 78 friend struct base::DefaultLazyInstanceTraits<BackgroundTracingManagerImpl>;
79 79
80 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingManagerImpl); 80 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingManagerImpl);
81 }; 81 };
82 82
83 } // namespace content 83 } // namespace content
84 84
85 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_ 85 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_getusermedia_browsertest.cc ('k') | content/browser/tracing/background_tracing_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698