summaryrefslogtreecommitdiffstats
path: root/chromium/pdf/metrics_handler.h
blob: 6d6a794e6b0e8a1887e593afd061bea120f0f457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2022 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PDF_METRICS_HANDLER_H_
#define PDF_METRICS_HANDLER_H_

#include <vector>

#include "pdf/document_attachment_info.h"

namespace chrome_pdf {

struct DocumentMetadata;

// Handles various UMA metrics. Note that action metrics are handled separately.
class MetricsHandler {
 public:
  MetricsHandler();
  MetricsHandler(const MetricsHandler& other) = delete;
  MetricsHandler& operator=(const MetricsHandler& other) = delete;
  ~MetricsHandler();

  void RecordAttachmentTypes(
      const std::vector<DocumentAttachmentInfo>& attachments);

  void RecordDocumentMetrics(const DocumentMetadata& metadata);
};

}  // namespace chrome_pdf

#endif  // PDF_METRICS_HANDLER_H_