summaryrefslogtreecommitdiff
path: root/chromium/content/browser/prerender/prerender_metrics.h
blob: 726422a32c0f08c613865ad772ea66a0fb7be7f2 (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 2021 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 CONTENT_BROWSER_PRERENDER_PRERENDER_METRICS_H_
#define CONTENT_BROWSER_PRERENDER_PRERENDER_METRICS_H_

#include <string>

namespace content {

class RenderFrameHostImpl;

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// Note: Please update GetCancelledInterfaceType() in the corresponding .cc file
// if you add a new item.
enum class PrerenderCancelledInterface {
  kUnknown = 0,  // For kCancel interfaces added by embedders or tests.
  kGamepadHapticsManager = 1,
  kGamepadMonitor = 2,
  kNotificationService = 3,
  kMaxValue = kNotificationService
};

void RecordPrerenderCancelledInterface(const std::string& interface_name);

void RecordPrerenderTriggered(RenderFrameHostImpl& initiator_render_frame_host);

}  // namespace content

#endif  // CONTENT_BROWSER_PRERENDER_PRERENDER_METRICS_H_