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

Side by Side Diff: content/browser/mojo/mojo_shell_context.cc

Issue 1351443004: Revert of Make CapabilityFilter be part of Identity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | mojo/fetcher/about_fetcher_unittest.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 "content/browser/mojo/mojo_shell_context.h" 5 #include "content/browser/mojo/mojo_shell_context.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 void MojoShellContext::ConnectToApplicationOnOwnThread( 231 void MojoShellContext::ConnectToApplicationOnOwnThread(
232 const GURL& url, 232 const GURL& url,
233 const GURL& requestor_url, 233 const GURL& requestor_url,
234 mojo::InterfaceRequest<mojo::ServiceProvider> request, 234 mojo::InterfaceRequest<mojo::ServiceProvider> request,
235 mojo::ServiceProviderPtr exposed_services, 235 mojo::ServiceProviderPtr exposed_services,
236 const mojo::shell::CapabilityFilter& filter, 236 const mojo::shell::CapabilityFilter& filter,
237 const mojo::Shell::ConnectToApplicationCallback& callback) { 237 const mojo::Shell::ConnectToApplicationCallback& callback) {
238 scoped_ptr<mojo::shell::ConnectToApplicationParams> params( 238 scoped_ptr<mojo::shell::ConnectToApplicationParams> params(
239 new mojo::shell::ConnectToApplicationParams); 239 new mojo::shell::ConnectToApplicationParams);
240 params->set_source( 240 params->set_originator_identity(mojo::shell::Identity(requestor_url));
241 mojo::shell::Identity(requestor_url, std::string(), 241 params->set_originator_filter(mojo::shell::GetPermissiveCapabilityFilter());
242 mojo::shell::GetPermissiveCapabilityFilter())); 242 params->SetURLInfo(url);
243 params->SetTarget(mojo::shell::Identity(url, std::string(), filter));
244 params->set_services(request.Pass()); 243 params->set_services(request.Pass());
245 params->set_exposed_services(exposed_services.Pass()); 244 params->set_exposed_services(exposed_services.Pass());
245 params->set_filter(filter);
246 params->set_on_application_end(base::Bind(&base::DoNothing)); 246 params->set_on_application_end(base::Bind(&base::DoNothing));
247 params->set_connect_callback(callback); 247 params->set_connect_callback(callback);
248 application_manager_->ConnectToApplication(params.Pass()); 248 application_manager_->ConnectToApplication(params.Pass());
249 } 249 }
250 250
251 } // namespace content 251 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | mojo/fetcher/about_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698