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

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

Issue 2583523002: Add a comment to IsInitialized() to discourage devs to call it (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
« no previous file with comments | « no previous file | no next file » | 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
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ArcBridgeService* arc_bridge_service(); 44 ArcBridgeService* arc_bridge_service();
45 45
46 // Adds a service to the managed services list. 46 // Adds a service to the managed services list.
47 void AddService(std::unique_ptr<ArcService> service); 47 void AddService(std::unique_ptr<ArcService> service);
48 48
49 // Gets the global instance of the ARC Service Manager. This can only be 49 // Gets the global instance of the ARC Service Manager. This can only be
50 // called on the thread that this class was created on. 50 // called on the thread that this class was created on.
51 static ArcServiceManager* Get(); 51 static ArcServiceManager* Get();
52 52
53 // Returns if the ARC Service Manager instance exists. 53 // Returns if the ARC Service Manager instance exists.
54 // DO NOT CALL THIS. This function is a dirty workaround for properly shutting
55 // down chrome/browser/chromeos/extensions/file_manager/event_router.cc, and
56 // will likely be removed in the future.
54 static bool IsInitialized(); 57 static bool IsInitialized();
55 58
56 void AddObserver(Observer* observer); 59 void AddObserver(Observer* observer);
57 void RemoveObserver(Observer* observer); 60 void RemoveObserver(Observer* observer);
58 61
59 // Called to shut down all ARC services. 62 // Called to shut down all ARC services.
60 void Shutdown(); 63 void Shutdown();
61 64
62 scoped_refptr<base::TaskRunner> blocking_task_runner() const { 65 scoped_refptr<base::TaskRunner> blocking_task_runner() const {
63 return blocking_task_runner_; 66 return blocking_task_runner_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 scoped_refptr<LocalActivityResolver> activity_resolver_; 99 scoped_refptr<LocalActivityResolver> activity_resolver_;
97 100
98 base::ObserverList<Observer> observer_list_; 101 base::ObserverList<Observer> observer_list_;
99 102
100 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); 103 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
101 }; 104 };
102 105
103 } // namespace arc 106 } // namespace arc
104 107
105 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ 108 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698