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

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

Issue 1770533002: Change userid from a uint32_t to a string guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@33connector
Patch Set: . Created 4 years, 9 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 "content/browser/mojo/mojo_shell_client_host.h" 5 #include "content/browser/mojo/mojo_shell_client_host.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 mojo::shell::mojom::PIDReceiverPtr pid_receiver; 116 mojo::shell::mojom::PIDReceiverPtr pid_receiver;
117 mojo::InterfaceRequest<mojo::shell::mojom::PIDReceiver> request = 117 mojo::InterfaceRequest<mojo::shell::mojom::PIDReceiver> request =
118 GetProxy(&pid_receiver); 118 GetProxy(&pid_receiver);
119 new PIDSender(render_process_host, std::move(pid_receiver)); 119 new PIDSender(render_process_host, std::move(pid_receiver));
120 120
121 mojo::shell::mojom::ShellClientFactoryPtr factory; 121 mojo::shell::mojom::ShellClientFactoryPtr factory;
122 factory.Bind(mojo::InterfacePtrInfo<mojo::shell::mojom::ShellClientFactory>( 122 factory.Bind(mojo::InterfacePtrInfo<mojo::shell::mojom::ShellClientFactory>(
123 std::move(request_pipe), 0u)); 123 std::move(request_pipe), 0u));
124 124
125 shell->CreateInstanceForFactory(std::move(factory), url, 125 shell->CreateInstanceForFactory(std::move(factory), url,
126 mojo::shell::mojom::Connector::kUserInherit, 126 mojo::shell::mojom::kInheritUserID,
127 CreateCapabilityFilterForRenderer(), 127 CreateCapabilityFilterForRenderer(),
128 std::move(request)); 128 std::move(request));
129 129
130 // Store the URL on the RPH so client code can access it later via 130 // Store the URL on the RPH so client code can access it later via
131 // GetMojoApplicationInstanceURL(). 131 // GetMojoApplicationInstanceURL().
132 SetMojoApplicationInstanceURL(render_process_host, url); 132 SetMojoApplicationInstanceURL(render_process_host, url);
133 133
134 return pipe_token; 134 return pipe_token;
135 } 135 }
136 136
137 std::string GetMojoApplicationInstanceURL( 137 std::string GetMojoApplicationInstanceURL(
138 RenderProcessHost* render_process_host) { 138 RenderProcessHost* render_process_host) {
139 InstanceURL* instance_url = static_cast<InstanceURL*>( 139 InstanceURL* instance_url = static_cast<InstanceURL*>(
140 render_process_host->GetUserData(kMojoShellInstanceURL)); 140 render_process_host->GetUserData(kMojoShellInstanceURL));
141 return instance_url ? instance_url->get() : std::string(); 141 return instance_url ? instance_url->get() : std::string();
142 } 142 }
143 143
144 } // namespace content 144 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/mojo/mojo_app_connection_impl.cc ('k') | content/browser/mojo/mojo_shell_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698