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

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

Issue 2034553002: Set up background memory light tracing field trials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@set_whitelist
Patch Set: Created 4 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 <memory> 8 #include <memory>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const base::Closure& callback) override; 47 const base::Closure& callback) override;
48 CONTENT_EXPORT void SetRuleTriggeredCallbackForTesting( 48 CONTENT_EXPORT void SetRuleTriggeredCallbackForTesting(
49 const base::Closure& callback); 49 const base::Closure& callback);
50 void FireTimerForTesting() override; 50 void FireTimerForTesting() override;
51 CONTENT_EXPORT bool IsTracingForTesting(); 51 CONTENT_EXPORT bool IsTracingForTesting();
52 52
53 private: 53 private:
54 BackgroundTracingManagerImpl(); 54 BackgroundTracingManagerImpl();
55 ~BackgroundTracingManagerImpl() override; 55 ~BackgroundTracingManagerImpl() override;
56 56
57 void StartTracing(std::string, base::trace_event::TraceRecordMode); 57 void StartTracing(BackgroundTracingConfigImpl::CategoryPreset,
58 base::trace_event::TraceRecordMode);
58 void StartTracingIfConfigNeedsIt(); 59 void StartTracingIfConfigNeedsIt();
59 void OnFinalizeStarted(std::unique_ptr<const base::DictionaryValue> metadata, 60 void OnFinalizeStarted(std::unique_ptr<const base::DictionaryValue> metadata,
60 base::RefCountedString*); 61 base::RefCountedString*);
61 void OnFinalizeComplete(); 62 void OnFinalizeComplete();
62 void BeginFinalizing(StartedFinalizingCallback); 63 void BeginFinalizing(StartedFinalizingCallback);
63 void ValidateStartupScenario(); 64 void ValidateStartupScenario();
64 65
65 void AddCustomMetadata(TracingControllerImpl::TraceDataSink*) const; 66 void AddCustomMetadata(TracingControllerImpl::TraceDataSink*) const;
66 67
67 std::string GetTriggerNameFromHandle(TriggerHandle handle) const; 68 std::string GetTriggerNameFromHandle(TriggerHandle handle) const;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 base::Closure rule_triggered_callback_for_testing_; 109 base::Closure rule_triggered_callback_for_testing_;
109 110
110 friend struct base::DefaultLazyInstanceTraits<BackgroundTracingManagerImpl>; 111 friend struct base::DefaultLazyInstanceTraits<BackgroundTracingManagerImpl>;
111 112
112 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingManagerImpl); 113 DISALLOW_COPY_AND_ASSIGN(BackgroundTracingManagerImpl);
113 }; 114 };
114 115
115 } // namespace content 116 } // namespace content
116 117
117 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_ 118 #endif // CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698