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

Side by Side Diff: services/service_manager/service_manager.h

Issue 2435153004: Change Service contract to pass ServiceInfo instead of Identity (Closed)
Patch Set: . Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ 5 #ifndef SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_
6 #define SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ 6 #define SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Creates a new Instance identified as |name|. This is intended for use by 76 // Creates a new Instance identified as |name|. This is intended for use by
77 // the Service Manager's embedder to register itself. This must only be called 77 // the Service Manager's embedder to register itself. This must only be called
78 // once. 78 // once.
79 mojom::ServiceRequest StartEmbedderService(const std::string& name); 79 mojom::ServiceRequest StartEmbedderService(const std::string& name);
80 80
81 private: 81 private:
82 class Instance; 82 class Instance;
83 83
84 // Service: 84 // Service:
85 bool OnConnect(const Identity& remote_identity, 85 bool OnConnect(const ServiceInfo& remote_info,
86 InterfaceRegistry* registry) override; 86 InterfaceRegistry* registry) override;
87 87
88 void InitCatalog(mojom::ServicePtr catalog); 88 void InitCatalog(mojom::ServicePtr catalog);
89 89
90 // Returns the resolver to use for the specified identity. 90 // Returns the resolver to use for the specified identity.
91 // NOTE: Resolvers are cached to ensure we service requests in order. If 91 // NOTE: Resolvers are cached to ensure we service requests in order. If
92 // we use a separate Resolver for each request ordering is not 92 // we use a separate Resolver for each request ordering is not
93 // guaranteed and can lead to random flake. 93 // guaranteed and can lead to random flake.
94 mojom::Resolver* GetResolver(const Identity& identity); 94 mojom::Resolver* GetResolver(const Identity& identity);
95 95
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_; 186 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_;
187 187
188 DISALLOW_COPY_AND_ASSIGN(ServiceManager); 188 DISALLOW_COPY_AND_ASSIGN(ServiceManager);
189 }; 189 };
190 190
191 mojom::Connector::ConnectCallback EmptyConnectCallback(); 191 mojom::Connector::ConnectCallback EmptyConnectCallback();
192 192
193 } // namespace service_manager 193 } // namespace service_manager
194 194
195 #endif // SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ 195 #endif // SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/service_test.h ('k') | services/service_manager/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698