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

Side by Side Diff: shell/application_manager/shell_impl.cc

Issue 1965563002: Neuter the wrong-way ServiceProvider (a.k.a. exposed_services). (Closed) Base URL: https://github.com/domokit/mojo.git@work795_js_wrong_way
Patch Set: rebased Created 4 years, 7 months 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 | « shell/application_manager/shell_impl.h ('k') | shell/context.cc » ('j') | 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 #include "shell/application_manager/shell_impl.h" 5 #include "shell/application_manager/shell_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "mojo/converters/url/url_type_converters.h" 9 #include "mojo/converters/url/url_type_converters.h"
10 #include "mojo/services/content_handler/interfaces/content_handler.mojom.h" 10 #include "mojo/services/content_handler/interfaces/content_handler.mojom.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ShellImpl::~ShellImpl() { 62 ShellImpl::~ShellImpl() {
63 } 63 }
64 64
65 void ShellImpl::InitializeApplication(Array<String> args) { 65 void ShellImpl::InitializeApplication(Array<String> args) {
66 ShellPtr shell; 66 ShellPtr shell;
67 binding_.Bind(GetProxy(&shell)); 67 binding_.Bind(GetProxy(&shell));
68 application_->Initialize(std::move(shell), std::move(args), 68 application_->Initialize(std::move(shell), std::move(args),
69 identity_.url.spec()); 69 identity_.url.spec());
70 } 70 }
71 71
72 void ShellImpl::ConnectToClient( 72 void ShellImpl::ConnectToClient(const GURL& requested_url,
73 const GURL& requested_url, 73 const GURL& requestor_url,
74 const GURL& requestor_url, 74 InterfaceRequest<ServiceProvider> services) {
75 InterfaceRequest<ServiceProvider> services, 75 application_->AcceptConnection(String::From(requestor_url),
76 InterfaceHandle<ServiceProvider> exposed_services) { 76 std::move(services), nullptr,
77 application_->AcceptConnection( 77 requested_url.spec());
78 String::From(requestor_url), std::move(services),
79 std::move(exposed_services), requested_url.spec());
80 } 78 }
81 79
82 void ShellImpl::ConnectToApplication( 80 void ShellImpl::ConnectToApplication(
83 const String& app_url, 81 const String& app_url,
84 InterfaceRequest<ServiceProvider> services, 82 InterfaceRequest<ServiceProvider> services,
85 InterfaceHandle<mojo::ServiceProvider> exposed_services) { 83 InterfaceHandle<mojo::ServiceProvider> exposed_services) {
86 GURL app_gurl(app_url); 84 GURL app_gurl(app_url);
87 if (!app_gurl.is_valid()) { 85 if (!app_gurl.is_valid()) {
88 LOG(ERROR) << "Error: invalid URL: " << app_url; 86 LOG(ERROR) << "Error: invalid URL: " << app_url;
89 return; 87 return;
90 } 88 }
89 LOG_IF(ERROR, exposed_services) << "exposed_services no longer supported!";
91 manager_->ConnectToApplication(app_gurl, identity_.url, std::move(services), 90 manager_->ConnectToApplication(app_gurl, identity_.url, std::move(services),
92 std::move(exposed_services), base::Closure()); 91 base::Closure());
93 } 92 }
94 93
95 void ShellImpl::CreateApplicationConnector( 94 void ShellImpl::CreateApplicationConnector(
96 InterfaceRequest<ApplicationConnector> application_connector_request) { 95 InterfaceRequest<ApplicationConnector> application_connector_request) {
97 application_connector_impl_.Duplicate( 96 application_connector_impl_.Duplicate(
98 std::move(application_connector_request)); 97 std::move(application_connector_request));
99 } 98 }
100 99
101 } // namespace shell 100 } // namespace shell
OLDNEW
« no previous file with comments | « shell/application_manager/shell_impl.h ('k') | shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698