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

Side by Side Diff: content/browser/utility_process_host_impl.cc

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/utility_process_host_impl.h" 5 #include "content/browser/utility_process_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void UtilityProcessHostImpl::SetEnv(const base::EnvironmentMap& env) { 220 void UtilityProcessHostImpl::SetEnv(const base::EnvironmentMap& env) {
221 env_ = env; 221 env_ = env;
222 } 222 }
223 223
224 #endif // OS_POSIX 224 #endif // OS_POSIX
225 225
226 bool UtilityProcessHostImpl::Start() { 226 bool UtilityProcessHostImpl::Start() {
227 return StartProcess(); 227 return StartProcess();
228 } 228 }
229 229
230 service_manager::InterfaceProvider* 230 void UtilityProcessHostImpl::BindInterface(
231 UtilityProcessHostImpl::GetRemoteInterfaces() { 231 const std::string& interface_name,
232 return process_->child_connection()->GetRemoteInterfaces(); 232 mojo::ScopedMessagePipeHandle interface_pipe) {
233 process_->child_connection()->BindInterface(interface_name,
234 std::move(interface_pipe));
233 } 235 }
234 236
235 void UtilityProcessHostImpl::SetName(const base::string16& name) { 237 void UtilityProcessHostImpl::SetName(const base::string16& name) {
236 name_ = name; 238 name_ = name;
237 } 239 }
238 240
239 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) 241 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
240 // static 242 // static
241 void UtilityProcessHostImpl::EarlyZygoteLaunch() { 243 void UtilityProcessHostImpl::EarlyZygoteLaunch() {
242 DCHECK(!g_utility_zygote); 244 DCHECK(!g_utility_zygote);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 base::WeakPtr<UtilityProcessHostImpl> host, 397 base::WeakPtr<UtilityProcessHostImpl> host,
396 int error_code) { 398 int error_code) {
397 if (!host) 399 if (!host)
398 return; 400 return;
399 401
400 host->OnProcessLaunchFailed(error_code); 402 host->OnProcessLaunchFailed(error_code);
401 delete host.get(); 403 delete host.get();
402 } 404 }
403 405
404 } // namespace content 406 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/utility_process_host_impl.h ('k') | content/browser/utility_process_host_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698