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

Side by Side Diff: mojo/runner/host/child_process.cc

Issue 1485573002: Remove SimpleBroker and instead use the production broker implementation in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment Created 5 years 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/mojo_edk.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/runner/host/child_process.h" 5 #include "mojo/runner/host/child_process.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 #if defined(OS_LINUX) && !defined(OS_ANDROID) 355 #if defined(OS_LINUX) && !defined(OS_ANDROID)
356 scoped_ptr<mojo::runner::LinuxSandbox> sandbox; 356 scoped_ptr<mojo::runner::LinuxSandbox> sandbox;
357 #endif 357 #endif
358 base::NativeLibrary app_library = 0; 358 base::NativeLibrary app_library = 0;
359 // Load the application library before we engage the sandbox. 359 // Load the application library before we engage the sandbox.
360 app_library = mojo::runner::LoadNativeApplication( 360 app_library = mojo::runner::LoadNativeApplication(
361 command_line.GetSwitchValuePath(switches::kChildProcess)); 361 command_line.GetSwitchValuePath(switches::kChildProcess));
362 362
363 base::i18n::InitializeICU(); 363 base::i18n::InitializeICU();
364 CallLibraryEarlyInitialization(app_library); 364 if (app_library)
365 CallLibraryEarlyInitialization(app_library);
365 #if defined(OS_LINUX) && !defined(OS_ANDROID) 366 #if defined(OS_LINUX) && !defined(OS_ANDROID)
366 if (command_line.HasSwitch(switches::kEnableSandbox)) 367 if (command_line.HasSwitch(switches::kEnableSandbox))
367 sandbox = InitializeSandbox(); 368 sandbox = InitializeSandbox();
368 #endif 369 #endif
369 370
370 embedder::ScopedPlatformHandle platform_channel = 371 embedder::ScopedPlatformHandle platform_channel =
371 embedder::PlatformChannelPair::PassClientHandleFromParentProcess( 372 embedder::PlatformChannelPair::PassClientHandleFromParentProcess(
372 command_line); 373 command_line);
373 CHECK(platform_channel.is_valid()); 374 CHECK(platform_channel.is_valid());
374 375
(...skipping 12 matching lines...) Expand all
387 // This will block, then run whatever the controller wants. 388 // This will block, then run whatever the controller wants.
388 blocker.Block(); 389 blocker.Block();
389 390
390 app_context.Shutdown(); 391 app_context.Shutdown();
391 392
392 return 0; 393 return 0;
393 } 394 }
394 395
395 } // namespace runner 396 } // namespace runner
396 } // namespace mojo 397 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/mojo_edk.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698