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

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

Issue 1338283003: Revert of Move fetching logic out of ApplicationManager, eliminate url mappings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « mojo/runner/about_fetcher_unittest.cc ('k') | mojo/runner/child_process_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 base::CommandLine::ForCurrentProcess()->InitFromArgv(parameters); 125 base::CommandLine::ForCurrentProcess()->InitFromArgv(parameters);
126 126
127 InitializeLogging(); 127 InitializeLogging();
128 mojo::runner::WaitForDebuggerIfNecessary(); 128 mojo::runner::WaitForDebuggerIfNecessary();
129 129
130 InitializeRedirection(); 130 InitializeRedirection();
131 131
132 // We want ~MessageLoop to happen prior to ~Context. Initializing 132 // We want ~MessageLoop to happen prior to ~Context. Initializing
133 // LazyInstances is akin to stack-allocating objects; their destructors 133 // LazyInstances is akin to stack-allocating objects; their destructors
134 // will be invoked first-in-last-out. 134 // will be invoked first-in-last-out.
135 base::FilePath shell_file_root( 135 Context* shell_context = new Context();
136 base::android::ConvertJavaStringToUTF8(env, j_local_apps_directory)); 136 shell_context->SetShellFileRoot(base::FilePath(
137 Context* shell_context = new Context(shell_file_root); 137 base::android::ConvertJavaStringToUTF8(env, j_local_apps_directory)));
138 g_context.Get().reset(shell_context); 138 g_context.Get().reset(shell_context);
139 139
140 g_java_message_loop.Get().reset(new base::MessageLoopForUI); 140 g_java_message_loop.Get().reset(new base::MessageLoopForUI);
141 base::MessageLoopForUI::current()->Start(); 141 base::MessageLoopForUI::current()->Start();
142 142
143 ConfigureAndroidServices(shell_context); 143 ConfigureAndroidServices(shell_context);
144 shell_context->Init(); 144 shell_context->Init();
145 145
146 // This is done after the main message loop is started since it may post 146 // This is done after the main message loop is started since it may post
147 // tasks. This is consistent with the ordering from the desktop version of 147 // tasks. This is consistent with the ordering from the desktop version of
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 base::AtExitManager at_exit; 187 base::AtExitManager at_exit;
188 base::CommandLine::Init(argc, argv); 188 base::CommandLine::Init(argc, argv);
189 189
190 #if !defined(OFFICIAL_BUILD) 190 #if !defined(OFFICIAL_BUILD)
191 base::debug::EnableInProcessStackDumping(); 191 base::debug::EnableInProcessStackDumping();
192 #endif 192 #endif
193 193
194 mojo::runner::InitializeLogging(); 194 mojo::runner::InitializeLogging();
195 return mojo::runner::ChildProcessMain(); 195 return mojo::runner::ChildProcessMain();
196 } 196 }
OLDNEW
« no previous file with comments | « mojo/runner/about_fetcher_unittest.cc ('k') | mojo/runner/child_process_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698