| OLD | NEW |
| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Adds a service to the managed services list. | 31 // Adds a service to the managed services list. |
| 32 void AddService(scoped_ptr<ArcService> service); | 32 void AddService(scoped_ptr<ArcService> service); |
| 33 | 33 |
| 34 // Gets the global instance of the ARC Service Manager. This can only be | 34 // Gets the global instance of the ARC Service Manager. This can only be |
| 35 // called on the thread that this class was created on. | 35 // called on the thread that this class was created on. |
| 36 static ArcServiceManager* Get(); | 36 static ArcServiceManager* Get(); |
| 37 | 37 |
| 38 // Called when the main profile is initialized after user logs in. | 38 // Called when the main profile is initialized after user logs in. |
| 39 void OnPrimaryUserProfilePrepared(const AccountId& account_id); | 39 void OnPrimaryUserProfilePrepared(const AccountId& account_id); |
| 40 | 40 |
| 41 // Set ArcBridgeService instance for testing. Call before ArcServiceManager |
| 42 // creation. ArcServiceManager owns |arc_bridge_service|. |
| 43 static void SetArcBridgeServiceForTesting( |
| 44 scoped_ptr<ArcBridgeService> arc_bridge_service); |
| 41 private: | 45 private: |
| 42 base::ThreadChecker thread_checker_; | 46 base::ThreadChecker thread_checker_; |
| 43 scoped_ptr<ArcBridgeService> arc_bridge_service_; | 47 scoped_ptr<ArcBridgeService> arc_bridge_service_; |
| 44 std::vector<scoped_ptr<ArcService>> services_; | 48 std::vector<scoped_ptr<ArcService>> services_; |
| 45 | 49 |
| 46 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); | 50 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); |
| 47 }; | 51 }; |
| 48 | 52 |
| 49 } // namespace arc | 53 } // namespace arc |
| 50 | 54 |
| 51 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | 55 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ |
| OLD | NEW |