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

Side by Side Diff: mojo/shell/application_instance.cc

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « mojo/services/network/url_loader_impl.cc ('k') | mojo/shell/connect_to_application_params.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 "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
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
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
OLDNEW
« no previous file with comments | « mojo/services/network/url_loader_impl.cc ('k') | mojo/shell/connect_to_application_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698