| Index: services/shell/public/cpp/lib/interface_registry.cc
|
| diff --git a/services/shell/public/cpp/lib/interface_registry.cc b/services/shell/public/cpp/lib/interface_registry.cc
|
| index b585eaee26654e0908cc5ed5ded2914e38909b1d..ebfaddd35ace806392e426ee68569432371092bd 100644
|
| --- a/services/shell/public/cpp/lib/interface_registry.cc
|
| +++ b/services/shell/public/cpp/lib/interface_registry.cc
|
| @@ -39,29 +39,20 @@
|
| }
|
|
|
| void InterfaceRegistry::PauseBinding() {
|
| - DCHECK(!is_paused_);
|
| - is_paused_ = true;
|
| + DCHECK(!pending_request_.is_pending());
|
| + DCHECK(binding_.is_bound());
|
| + pending_request_ = binding_.Unbind();
|
| }
|
|
|
| void InterfaceRegistry::ResumeBinding() {
|
| - DCHECK(is_paused_);
|
| - is_paused_ = false;
|
| -
|
| - while (!pending_interface_requests_.empty()) {
|
| - auto& request = pending_interface_requests_.front();
|
| - GetInterface(request.first, std::move(request.second));
|
| - pending_interface_requests_.pop();
|
| - }
|
| + DCHECK(pending_request_.is_pending());
|
| + DCHECK(!binding_.is_bound());
|
| + binding_.Bind(std::move(pending_request_));
|
| }
|
|
|
| // mojom::InterfaceProvider:
|
| void InterfaceRegistry::GetInterface(const mojo::String& interface_name,
|
| mojo::ScopedMessagePipeHandle handle) {
|
| - if (is_paused_) {
|
| - pending_interface_requests_.emplace(interface_name, std::move(handle));
|
| - return;
|
| - }
|
| -
|
| auto iter = name_to_binder_.find(interface_name);
|
| if (iter != name_to_binder_.end()) {
|
| iter->second->BindInterface(connection_, interface_name, std::move(handle));
|
| @@ -70,8 +61,6 @@
|
| << "interface: " << interface_name << " connection_name:"
|
| << connection_->GetConnectionName() << " remote_name:"
|
| << connection_->GetRemoteIdentity().name();
|
| - } else if (!default_binder_.is_null()) {
|
| - default_binder_.Run(interface_name, std::move(handle));
|
| }
|
| }
|
|
|
|
|