Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: chrome/browser/chromeos/arc/arc_service_launcher.h

Issue 2531543003: Resolve initialize/destory order between ArcService and ArcSessionManager. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/arc/arc_service_manager.h" 11
12 class Profile;
12 13
13 namespace arc { 14 namespace arc {
14 15
16 class ArcServiceManager;
17 class ArcSessionManager;
18
15 // Detects ARC availability and launches ARC bridge service. 19 // Detects ARC availability and launches ARC bridge service.
16 class ArcServiceLauncher { 20 class ArcServiceLauncher {
17 public: 21 public:
18 ArcServiceLauncher(); 22 ArcServiceLauncher();
19 ~ArcServiceLauncher(); 23 ~ArcServiceLauncher();
20 24
25 // This is to access OnPrimaryUserProfilePrepared() only.
26 static ArcServiceLauncher* Get();
27
28 // Called before the main MessageLooop starts.
21 void Initialize(); 29 void Initialize();
30
31 // Called after the main MessageLoop stops, but before the Profile is
32 // destroyed.
22 void Shutdown(); 33 void Shutdown();
23 34
35 // Called when the main profile is initialized after user logs in.
36 void OnPrimaryUserProfilePrepared(Profile* profile);
37
24 private: 38 private:
25 std::unique_ptr<ArcServiceManager> arc_service_manager_; 39 std::unique_ptr<ArcServiceManager> arc_service_manager_;
40 std::unique_ptr<ArcSessionManager> arc_session_manager_;
26 41
27 DISALLOW_COPY_AND_ASSIGN(ArcServiceLauncher); 42 DISALLOW_COPY_AND_ASSIGN(ArcServiceLauncher);
28 }; 43 };
29 44
30 } // namespace arc 45 } // namespace arc
31 46
32 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ 47 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698