summaryrefslogtreecommitdiff
path: root/chromium/components/metrics/content/extensions_helper.h
blob: 20c67bc8f6c096cb7bc03d854ea88e09ae09a46c (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
// Copyright 2020 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 COMPONENTS_METRICS_CONTENT_EXTENSIONS_HELPER_H_
#define COMPONENTS_METRICS_CONTENT_EXTENSIONS_HELPER_H_

namespace content {
class RenderProcessHost;
}

namespace metrics {

// ExtensionsHelper is used by ContentStabilityMetricsProvider to determine
// if a RenderProcessHost hosts an extension. This is separate from
// ContentStabilityMetricsProvider to avoid this code depending directly on
// extensions.
class ExtensionsHelper {
 public:
  virtual ~ExtensionsHelper() = default;

  // Returns true if |render_process_host| is hosting an extension.
  virtual bool IsExtensionProcess(
      content::RenderProcessHost* render_process_host) = 0;
};

}  // namespace metrics

#endif  // COMPONENTS_METRICS_CONTENT_EXTENSIONS_HELPER_H_