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

Side by Side Diff: components/arc/arc_service_manager.h

Issue 2209173002: Migrate ArcUserDataService into ArcAuthService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months 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
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_test.cc ('k') | components/arc/arc_service_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ 5 #ifndef COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ 6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/task_runner.h" 13 #include "base/task_runner.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "components/arc/intent_helper/activity_icon_loader.h" 15 #include "components/arc/intent_helper/activity_icon_loader.h"
16 #include "components/arc/intent_helper/local_activity_resolver.h" 16 #include "components/arc/intent_helper/local_activity_resolver.h"
17 #include "components/prefs/pref_member.h" 17 #include "components/prefs/pref_member.h"
18 #include "components/signin/core/account_id/account_id.h" 18 #include "components/signin/core/account_id/account_id.h"
19 19
20 namespace arc { 20 namespace arc {
21 21
22 class ArcBridgeService; 22 class ArcBridgeService;
23 class ArcService; 23 class ArcService;
24 class ArcUserDataService;
25 24
26 // Manages creation and destruction of services that communicate with the ARC 25 // Manages creation and destruction of services that communicate with the ARC
27 // instance via the ArcBridgeService. 26 // instance via the ArcBridgeService.
28 class ArcServiceManager { 27 class ArcServiceManager {
29 public: 28 public:
30 explicit ArcServiceManager( 29 explicit ArcServiceManager(
31 scoped_refptr<base::TaskRunner> blocking_task_runner); 30 scoped_refptr<base::TaskRunner> blocking_task_runner);
32 virtual ~ArcServiceManager(); 31 virtual ~ArcServiceManager();
33 32
34 // |arc_bridge_service| can only be accessed on the thread that this 33 // |arc_bridge_service| can only be accessed on the thread that this
(...skipping 25 matching lines...) Expand all
60 std::unique_ptr<ArcBridgeService> arc_bridge_service); 59 std::unique_ptr<ArcBridgeService> arc_bridge_service);
61 60
62 // Returns the icon loader owned by ArcServiceManager and shared by services. 61 // Returns the icon loader owned by ArcServiceManager and shared by services.
63 scoped_refptr<ActivityIconLoader> icon_loader() { return icon_loader_; } 62 scoped_refptr<ActivityIconLoader> icon_loader() { return icon_loader_; }
64 63
65 // Returns the activity resolver owned by ArcServiceManager. 64 // Returns the activity resolver owned by ArcServiceManager.
66 scoped_refptr<LocalActivityResolver> activity_resolver() { 65 scoped_refptr<LocalActivityResolver> activity_resolver() {
67 return activity_resolver_; 66 return activity_resolver_;
68 } 67 }
69 68
70 ArcUserDataService* arc_user_data_service() {
71 return arc_user_data_service_.get();
72 }
73
74 private: 69 private:
75 base::ThreadChecker thread_checker_; 70 base::ThreadChecker thread_checker_;
76 scoped_refptr<base::TaskRunner> blocking_task_runner_; 71 scoped_refptr<base::TaskRunner> blocking_task_runner_;
77 72
78 std::unique_ptr<ArcBridgeService> arc_bridge_service_; 73 std::unique_ptr<ArcBridgeService> arc_bridge_service_;
79 std::vector<std::unique_ptr<ArcService>> services_; 74 std::vector<std::unique_ptr<ArcService>> services_;
80 scoped_refptr<ActivityIconLoader> icon_loader_; 75 scoped_refptr<ActivityIconLoader> icon_loader_;
81 scoped_refptr<LocalActivityResolver> activity_resolver_; 76 scoped_refptr<LocalActivityResolver> activity_resolver_;
82 std::unique_ptr<ArcUserDataService> arc_user_data_service_;
83 77
84 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); 78 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
85 }; 79 };
86 80
87 } // namespace arc 81 } // namespace arc
88 82
89 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ 83 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_test.cc ('k') | components/arc/arc_service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698