1 // Copyright 2023 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.
5 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_NACL_DEPRECATION_H_
6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_NACL_DEPRECATION_H_
8 #include "base/feature_list.h"
9 #include "chrome/browser/chrome_browser_main_extra_parts.h"
11 // Controls whether any NaCl plugins are allowed to be loaded.
12 // This can be overridden by enterprise policy. Exposed for testing.
13 BASE_DECLARE_FEATURE(kNaclAllow);
15 // This class exists to facilitate NaCl deprecation.
16 class ChromeBrowserMainExtraPartsNaclDeprecation
17 : public ChromeBrowserMainExtraParts {
19 ChromeBrowserMainExtraPartsNaclDeprecation() = default;
21 // This method disables NaCl depending on field trial and policy settings. It
22 // does so by setting a command line flag, which is the only way to get a
23 // signal early enough to child processes. This is necessary since plugins are
24 // loaded before field trial initialization.
25 void PostEarlyInitialization() override;
28 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_NACL_DEPRECATION_H_