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

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

Issue 1179413010: mandoline filesystem: Save cookie data to the mojo:filesystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sqlite-fs
Patch Set: Have mojo_runner responsible for handling the temporary directory. Created 5 years, 6 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 "base/threading/simple_thread.h" 21 #include "base/threading/simple_thread.h"
22 #include "components/view_manager/android_loader.h" 22 #include "components/view_manager/android_loader.h"
23 #include "jni/ShellMain_jni.h" 23 #include "jni/ShellMain_jni.h"
24 #include "mojo/common/message_pump_mojo.h" 24 #include "mojo/common/message_pump_mojo.h"
25 #include "mojo/runner/android/android_handler_loader.h" 25 #include "mojo/runner/android/android_handler_loader.h"
26 #include "mojo/runner/android/background_application_loader.h" 26 #include "mojo/runner/android/background_application_loader.h"
27 #include "mojo/runner/android/context_init.h" 27 #include "mojo/runner/android/context_init.h"
28 #include "mojo/runner/android/ui_application_loader_android.h" 28 #include "mojo/runner/android/ui_application_loader_android.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/scoped_user_data_dir.h"
31 #include "mojo/shell/application_loader.h" 32 #include "mojo/shell/application_loader.h"
32 #include "ui/gl/gl_surface_egl.h" 33 #include "ui/gl/gl_surface_egl.h"
33 34
34 using base::LazyInstance; 35 using base::LazyInstance;
35 36
36 namespace mojo { 37 namespace mojo {
37 namespace runner { 38 namespace runner {
38 39
39 namespace { 40 namespace {
40 41
41 // Tag for logging. 42 // Tag for logging.
42 const char kLogTag[] = "chromium"; 43 const char kLogTag[] = "chromium";
43 44
44 // Command line argument for the communication fifo. 45 // Command line argument for the communication fifo.
45 const char kFifoPath[] = "fifo-path"; 46 const char kFifoPath[] = "fifo-path";
46 47
47 class MojoShellRunner : public base::DelegateSimpleThread::Delegate { 48 class MojoShellRunner : public base::DelegateSimpleThread::Delegate {
48 public: 49 public:
49 MojoShellRunner(const std::vector<std::string>& parameters) {} 50 MojoShellRunner(const std::vector<std::string>& parameters) {}
50 ~MojoShellRunner() override {} 51 ~MojoShellRunner() override {}
51 52
52 private: 53 private:
53 void Run() override; 54 void Run() override;
54 55
56 ScopedUserDataDir scoped_user_data_dir_;
57
55 DISALLOW_COPY_AND_ASSIGN(MojoShellRunner); 58 DISALLOW_COPY_AND_ASSIGN(MojoShellRunner);
56 }; 59 };
57 60
58 LazyInstance<scoped_ptr<base::MessageLoop>> g_java_message_loop = 61 LazyInstance<scoped_ptr<base::MessageLoop>> g_java_message_loop =
59 LAZY_INSTANCE_INITIALIZER; 62 LAZY_INSTANCE_INITIALIZER;
60 63
61 LazyInstance<scoped_ptr<Context>> g_context = LAZY_INSTANCE_INITIALIZER; 64 LazyInstance<scoped_ptr<Context>> g_context = LAZY_INSTANCE_INITIALIZER;
62 65
63 LazyInstance<scoped_ptr<MojoShellRunner>> g_shell_runner = 66 LazyInstance<scoped_ptr<MojoShellRunner>> g_shell_runner =
64 LAZY_INSTANCE_INITIALIZER; 67 LAZY_INSTANCE_INITIALIZER;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 211 }
209 212
210 } // namespace runner 213 } // namespace runner
211 } // namespace mojo 214 } // namespace mojo
212 215
213 // TODO(vtl): Even though main() should never be called, mojo_shell fails to 216 // TODO(vtl): Even though main() should never be called, mojo_shell fails to
214 // link without it. Figure out if we can avoid this. 217 // link without it. Figure out if we can avoid this.
215 int main(int argc, char** argv) { 218 int main(int argc, char** argv) {
216 NOTREACHED(); 219 NOTREACHED();
217 } 220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698