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

Side by Side Diff: mojo/shell/package_manager/package_manager_impl.cc

Issue 1578473002: Pass application ids via AcceptConnection & ConnectToApplication callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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
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/package_manager/package_manager_impl.h" 5 #include "mojo/shell/package_manager/package_manager_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 target_url, 122 target_url,
123 target_filter, 123 target_filter,
124 &content_handler_identity, 124 &content_handler_identity,
125 &response)) { 125 &response)) {
126 ContentHandlerConnection* connection = 126 ContentHandlerConnection* connection =
127 GetContentHandler(content_handler_identity, source); 127 GetContentHandler(content_handler_identity, source);
128 connection->StartApplication(std::move(*application_request), 128 connection->StartApplication(std::move(*application_request),
129 std::move(response)); 129 std::move(response));
130 return connection->id(); 130 return connection->id();
131 } 131 }
132 return Shell::kInvalidContentHandlerID; 132 return Shell::kInvalidApplicationID;
133 } 133 }
134 134
135 GURL PackageManagerImpl::ResolveURL(const GURL& url) { 135 GURL PackageManagerImpl::ResolveURL(const GURL& url) {
136 return url_resolver_.get() ? url_resolver_->ResolveMojoURL(url) : url; 136 return url_resolver_.get() ? url_resolver_->ResolveMojoURL(url) : url;
137 } 137 }
138 138
139 bool PackageManagerImpl::ShouldHandleWithContentHandler( 139 bool PackageManagerImpl::ShouldHandleWithContentHandler(
140 Fetcher* fetcher, 140 Fetcher* fetcher,
141 const GURL& target_url, 141 const GURL& target_url,
142 const CapabilityFilter& target_filter, 142 const CapabilityFilter& target_filter,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 void PackageManagerImpl::OnContentHandlerConnectionClosed( 218 void PackageManagerImpl::OnContentHandlerConnectionClosed(
219 ContentHandlerConnection* connection) { 219 ContentHandlerConnection* connection) {
220 // Remove the mapping. 220 // Remove the mapping.
221 auto it = identity_to_content_handler_.find(connection->identity()); 221 auto it = identity_to_content_handler_.find(connection->identity());
222 DCHECK(it != identity_to_content_handler_.end()); 222 DCHECK(it != identity_to_content_handler_.end());
223 identity_to_content_handler_.erase(it); 223 identity_to_content_handler_.erase(it);
224 } 224 }
225 225
226 } // namespace shell 226 } // namespace shell
227 } // namespace mojo 227 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/package_manager/content_handler_unittest.cc ('k') | mojo/shell/public/cpp/application_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698