metrics_handler.h 843 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2022 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 PDF_METRICS_HANDLER_H_
  5. #define PDF_METRICS_HANDLER_H_
  6. #include <vector>
  7. #include "pdf/document_attachment_info.h"
  8. namespace chrome_pdf {
  9. struct DocumentMetadata;
  10. // Handles various UMA metrics. Note that action metrics are handled separately.
  11. class MetricsHandler {
  12. public:
  13. MetricsHandler();
  14. MetricsHandler(const MetricsHandler& other) = delete;
  15. MetricsHandler& operator=(const MetricsHandler& other) = delete;
  16. ~MetricsHandler();
  17. void RecordAttachmentTypes(
  18. const std::vector<DocumentAttachmentInfo>& attachments);
  19. void RecordDocumentMetrics(const DocumentMetadata& metadata);
  20. };
  21. } // namespace chrome_pdf
  22. #endif // PDF_METRICS_HANDLER_H_