[M120 Migration]Fix for crash during chrome exit
[platform/framework/web/chromium-efl.git] / chrome / browser / chrome_browser_main_parts_lacros.h
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 CHROME_BROWSER_CHROME_BROWSER_MAIN_PARTS_LACROS_H_
6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_PARTS_LACROS_H_
7
8 #include <memory>
9
10 #include "chrome/browser/chrome_browser_main_linux.h"
11
12 class MetricsReportingObserver;
13 class PrefsAshObserver;
14 class Profile;
15
16 // Startup and shutdown code for Lacros. See ChromeBrowserMainParts for details.
17 class ChromeBrowserMainPartsLacros : public ChromeBrowserMainPartsLinux {
18  public:
19   ChromeBrowserMainPartsLacros(bool is_integration_test,
20                                StartupData* startup_data);
21   ChromeBrowserMainPartsLacros(const ChromeBrowserMainPartsLacros&) = delete;
22   ChromeBrowserMainPartsLacros& operator=(const ChromeBrowserMainPartsLacros&) =
23       delete;
24   ~ChromeBrowserMainPartsLacros() override;
25
26   // ChromeBrowserMainParts:
27   int PreEarlyInitialization() override;
28   int PreCreateThreads() override;
29   void PostCreateThreads() override;
30   void PreProfileInit() override;
31   void PostProfileInit(Profile* profile, bool is_initial_profile) override;
32   void PostMainMessageLoopRun() override;
33   void PostDestroyThreads() override;
34
35  private:
36   std::unique_ptr<MetricsReportingObserver> metrics_reporting_observer_;
37   std::unique_ptr<PrefsAshObserver> prefs_ash_observer_;
38 };
39
40 #endif  // CHROME_BROWSER_CHROME_BROWSER_MAIN_PARTS_LACROS_H_