1 // Copyright 2020 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_METRICS_CONTENT_EXTENSIONS_HELPER_H_ 6 #define COMPONENTS_METRICS_CONTENT_EXTENSIONS_HELPER_H_ 7 8 namespace content { 9 class RenderProcessHost; 10 } 11 12 namespace metrics { 13 14 // ExtensionsHelper is used by ContentStabilityMetricsProvider to determine 15 // if a RenderProcessHost hosts an extension. This is separate from 16 // ContentStabilityMetricsProvider to avoid this code depending directly on 17 // extensions. 18 class ExtensionsHelper { 19 public: 20 virtual ~ExtensionsHelper() = default; 21 22 // Returns true if |render_process_host| is hosting an extension. 23 virtual bool IsExtensionProcess( 24 content::RenderProcessHost* render_process_host) = 0; 25 }; 26 27 } // namespace metrics 28 29 #endif // COMPONENTS_METRICS_CONTENT_EXTENSIONS_HELPER_H_ 30