From a2bf3dc35af49aee7bdb4e39ab20e5372d040211 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Tue, 8 Nov 2016 16:58:18 -0800 Subject: [PATCH] Update to new way of passing application environment. (#3209) --- content_handler/application_controller_impl.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/content_handler/application_controller_impl.cc b/content_handler/application_controller_impl.cc index 3c1deabb8b9..838e470acaf 100644 --- a/content_handler/application_controller_impl.cc +++ b/content_handler/application_controller_impl.cc @@ -35,7 +35,7 @@ ApplicationControllerImpl::ApplicationControllerImpl( } // TODO(abarth): The Dart code should end up with outgoing_services. - if (startup_info->outgoing_services.is_pending()) { + if (startup_info->outgoing_services) { service_provider_bindings_.AddBinding( this, std::move(startup_info->outgoing_services)); } @@ -43,10 +43,12 @@ ApplicationControllerImpl::ApplicationControllerImpl( url_ = startup_info->url; runtime_holder_.reset(new RuntimeHolder()); - // TODO(abarth): The Dart code should end up with environment_services. - runtime_holder_->Init(modular::ServiceProviderPtr::Create( - std::move(startup_info->environment_services)), - std::move(bundle)); + // TODO(abarth): The Dart code should end up with environment. + modular::ServiceProviderPtr environment_services; + modular::ApplicationEnvironmentPtr::Create( + std::move(startup_info->environment)) + ->GetServices(GetProxy(&environment_services)); + runtime_holder_->Init(std::move(environment_services), std::move(bundle)); } ApplicationControllerImpl::~ApplicationControllerImpl() = default;