| OLD | NEW |
| 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 "mojo/shell/application_instance.h" | 5 #include "mojo/shell/application_instance.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 if (allow_any_application_ || | 95 if (allow_any_application_ || |
| 96 identity_.filter().find(url.spec()) != identity_.filter().end()) { | 96 identity_.filter().find(url.spec()) != identity_.filter().end()) { |
| 97 CapabilityFilter capability_filter = GetPermissiveCapabilityFilter(); | 97 CapabilityFilter capability_filter = GetPermissiveCapabilityFilter(); |
| 98 if (!filter.is_null()) | 98 if (!filter.is_null()) |
| 99 capability_filter = filter->filter.To<CapabilityFilter>(); | 99 capability_filter = filter->filter.To<CapabilityFilter>(); |
| 100 | 100 |
| 101 scoped_ptr<ConnectToApplicationParams> params( | 101 scoped_ptr<ConnectToApplicationParams> params( |
| 102 new ConnectToApplicationParams); | 102 new ConnectToApplicationParams); |
| 103 params->SetSource(this); | 103 params->SetSource(this); |
| 104 GURL app_url(app_request->url); | 104 GURL app_url(app_request->url.get()); |
| 105 params->SetTargetURLRequest( | 105 params->SetTargetURLRequest( |
| 106 std::move(app_request), | 106 std::move(app_request), |
| 107 Identity(app_url, std::string(), capability_filter)); | 107 Identity(app_url, std::string(), capability_filter)); |
| 108 params->set_services(std::move(services)); | 108 params->set_services(std::move(services)); |
| 109 params->set_exposed_services(std::move(exposed_services)); | 109 params->set_exposed_services(std::move(exposed_services)); |
| 110 params->set_connect_callback(callback); | 110 params->set_connect_callback(callback); |
| 111 manager_->ConnectToApplication(std::move(params)); | 111 manager_->ConnectToApplication(std::move(params)); |
| 112 } else { | 112 } else { |
| 113 LOG(WARNING) << "CapabilityFilter prevented connection from: " << | 113 LOG(WARNING) << "CapabilityFilter prevented connection from: " << |
| 114 identity_.url() << " to: " << url.spec(); | 114 identity_.url() << " to: " << url.spec(); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 queue_requests_ = false; | 194 queue_requests_ = false; |
| 195 for (auto request : queued_client_requests_) | 195 for (auto request : queued_client_requests_) |
| 196 CallAcceptConnection(make_scoped_ptr(request)); | 196 CallAcceptConnection(make_scoped_ptr(request)); |
| 197 | 197 |
| 198 queued_client_requests_.clear(); | 198 queued_client_requests_.clear(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace shell | 201 } // namespace shell |
| 202 } // namespace mojo | 202 } // namespace mojo |
| OLD | NEW |