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

Side by Side Diff: mojo/runner/android/main.cc

Issue 1264463005: mandoline sandbox: prewarm libraries before we raise the sandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/main.h" 5 #include "mojo/runner/android/main.h"
6 6
7 #include "base/android/fifo_utils.h" 7 #include "base/android/fifo_utils.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 10 matching lines...) Expand all
21 #include "components/view_manager/android_loader.h" 21 #include "components/view_manager/android_loader.h"
22 #include "jni/ShellMain_jni.h" 22 #include "jni/ShellMain_jni.h"
23 #include "mojo/common/message_pump_mojo.h" 23 #include "mojo/common/message_pump_mojo.h"
24 #include "mojo/runner/android/android_handler_loader.h" 24 #include "mojo/runner/android/android_handler_loader.h"
25 #include "mojo/runner/android/background_application_loader.h" 25 #include "mojo/runner/android/background_application_loader.h"
26 #include "mojo/runner/android/context_init.h" 26 #include "mojo/runner/android/context_init.h"
27 #include "mojo/runner/android/ui_application_loader_android.h" 27 #include "mojo/runner/android/ui_application_loader_android.h"
28 #include "mojo/runner/child_process.h" 28 #include "mojo/runner/child_process.h"
29 #include "mojo/runner/context.h" 29 #include "mojo/runner/context.h"
30 #include "mojo/runner/init.h" 30 #include "mojo/runner/init.h"
31 #include "mojo/runner/native_application_support.h"
32 #include "mojo/runner/switches.h"
31 #include "mojo/shell/application_loader.h" 33 #include "mojo/shell/application_loader.h"
32 #include "ui/gl/gl_surface_egl.h" 34 #include "ui/gl/gl_surface_egl.h"
33 35
34 using base::LazyInstance; 36 using base::LazyInstance;
35 37
36 namespace mojo { 38 namespace mojo {
37 namespace runner { 39 namespace runner {
38 40
39 namespace { 41 namespace {
40 42
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 180 }
179 181
180 } // namespace runner 182 } // namespace runner
181 } // namespace mojo 183 } // namespace mojo
182 184
183 int main(int argc, char** argv) { 185 int main(int argc, char** argv) {
184 base::AtExitManager at_exit; 186 base::AtExitManager at_exit;
185 base::CommandLine::Init(argc, argv); 187 base::CommandLine::Init(argc, argv);
186 188
187 mojo::runner::InitializeLogging(); 189 mojo::runner::InitializeLogging();
188 return mojo::runner::ChildProcessMain(); 190
191 const base::CommandLine& command_line =
192 *base::CommandLine::ForCurrentProcess();
193 CHECK(command_line.HasSwitch(switches::kChildProcess));
194 mojo::shell::NativeApplicationCleanup cleanup =
195 command_line.HasSwitch(switches::kDeleteAfterLoad)
196 ? mojo::shell::NativeApplicationCleanup::DELETE
197 : mojo::shell::NativeApplicationCleanup::DONT_DELETE;
198 base::NativeLibrary app_library = mojo::runner::LoadNativeApplication(
199 command_line.GetSwitchValuePath(switches::kChildProcess), cleanup);
200 return mojo::runner::ChildProcessMain(app_library);
189 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698