aw_tracing_delegate.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef ANDROID_WEBVIEW_BROWSER_TRACING_AW_TRACING_DELEGATE_H_
  5. #define ANDROID_WEBVIEW_BROWSER_TRACING_AW_TRACING_DELEGATE_H_
  6. #include "content/public/browser/tracing_delegate.h"
  7. #include "third_party/abseil-cpp/absl/types/optional.h"
  8. class PrefRegistrySimple;
  9. namespace base {
  10. class Value;
  11. } // namespace base
  12. namespace android_webview {
  13. class AwTracingDelegate : public content::TracingDelegate {
  14. public:
  15. AwTracingDelegate();
  16. ~AwTracingDelegate() override;
  17. static void RegisterPrefs(PrefRegistrySimple* registry);
  18. // content::TracingDelegate implementation:
  19. bool IsAllowedToBeginBackgroundScenario(
  20. const content::BackgroundTracingConfig& config,
  21. bool requires_anonymized_data) override;
  22. bool IsAllowedToEndBackgroundScenario(
  23. const content::BackgroundTracingConfig& config,
  24. bool requires_anonymized_data,
  25. bool is_crash_scenario) override;
  26. absl::optional<base::Value::Dict> GenerateMetadataDict() override;
  27. };
  28. } // namespace android_webview
  29. #endif // ANDROID_WEBVIEW_BROWSER_TRACING_AW_TRACING_DELEGATE_H_