[M120 Migration]Fix for crash during chrome exit
[platform/framework/web/chromium-efl.git] / chrome / browser / chrome_browser_main_extra_parts_nacl_deprecation.h
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.
4
5 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_NACL_DEPRECATION_H_
6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_NACL_DEPRECATION_H_
7
8 #include "base/feature_list.h"
9 #include "chrome/browser/chrome_browser_main_extra_parts.h"
10
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);
14
15 // This class exists to facilitate NaCl deprecation.
16 class ChromeBrowserMainExtraPartsNaclDeprecation
17     : public ChromeBrowserMainExtraParts {
18  public:
19   ChromeBrowserMainExtraPartsNaclDeprecation() = default;
20
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;
26 };
27
28 #endif  // CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_NACL_DEPRECATION_H_