OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "services/identity/identity_service.h" | 5 #include "services/identity/identity_service.h" |
6 | 6 |
7 #include "services/identity/identity_manager.h" | 7 #include "services/identity/identity_manager.h" |
8 #include "services/service_manager/public/cpp/service_context.h" | 8 #include "services/service_manager/public/cpp/service_context.h" |
9 | 9 |
10 namespace identity { | 10 namespace identity { |
11 | 11 |
12 IdentityService::IdentityService(SigninManagerBase* signin_manager) | 12 IdentityService::IdentityService(SigninManagerBase* signin_manager) |
13 : signin_manager_(signin_manager) { | 13 : signin_manager_(signin_manager) { |
14 registry_.AddInterface<mojom::IdentityManager>(this); | 14 registry_.AddInterface<mojom::IdentityManager>(this); |
15 } | 15 } |
16 | 16 |
17 IdentityService::~IdentityService() {} | 17 IdentityService::~IdentityService() {} |
18 | 18 |
19 void IdentityService::OnStart() {} | 19 void IdentityService::OnStart() {} |
20 | 20 |
21 void IdentityService::OnBindInterface( | 21 void IdentityService::OnBindInterface( |
22 const service_manager::ServiceInfo& source_info, | 22 const service_manager::BindSourceInfo& source_info, |
23 const std::string& interface_name, | 23 const std::string& interface_name, |
24 mojo::ScopedMessagePipeHandle interface_pipe) { | 24 mojo::ScopedMessagePipeHandle interface_pipe) { |
25 registry_.BindInterface(source_info.identity, interface_name, | 25 registry_.BindInterface(source_info.identity, interface_name, |
26 std::move(interface_pipe)); | 26 std::move(interface_pipe)); |
27 } | 27 } |
28 | 28 |
29 void IdentityService::Create(const service_manager::Identity& remote_identity, | 29 void IdentityService::Create(const service_manager::Identity& remote_identity, |
30 mojom::IdentityManagerRequest request) { | 30 mojom::IdentityManagerRequest request) { |
31 IdentityManager::Create(std::move(request), signin_manager_); | 31 IdentityManager::Create(std::move(request), signin_manager_); |
32 } | 32 } |
33 | 33 |
34 } // namespace identity | 34 } // namespace identity |
OLD | NEW |