OLD | NEW |
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 package org.chromium.mojo_shell_apk; | 5 package org.chromium.mojo_shell_apk; |
6 | 6 |
7 import android.util.Log; | 7 import android.util.Log; |
8 | 8 |
9 import org.chromium.base.BaseChromiumApplication; | 9 import org.chromium.base.BaseChromiumApplication; |
10 import org.chromium.base.PathUtils; | 10 import org.chromium.base.PathUtils; |
(...skipping 15 matching lines...) Expand all Loading... |
26 initializeJavaUtils(); | 26 initializeJavaUtils(); |
27 initializeNative(); | 27 initializeNative(); |
28 } | 28 } |
29 | 29 |
30 /** | 30 /** |
31 * Deletes the temporary files and directories created in the previous run o
f the application. | 31 * Deletes the temporary files and directories created in the previous run o
f the application. |
32 * This is important regardless of cleanups on exit, as the previous run cou
ld have crashed. | 32 * This is important regardless of cleanups on exit, as the previous run cou
ld have crashed. |
33 */ | 33 */ |
34 private void clearTemporaryFiles() { | 34 private void clearTemporaryFiles() { |
35 AndroidHandler.clearTemporaryFiles(this); | 35 AndroidHandler.clearTemporaryFiles(this); |
| 36 MojoMain.clearTemporaryFiles(this); |
36 } | 37 } |
37 | 38 |
38 /** | 39 /** |
39 * Initializes Java-side utils. | 40 * Initializes Java-side utils. |
40 */ | 41 */ |
41 private void initializeJavaUtils() { | 42 private void initializeJavaUtils() { |
42 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); | 43 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); |
43 } | 44 } |
44 | 45 |
45 /** | 46 /** |
46 * Loads the native library. | 47 * Loads the native library. |
47 */ | 48 */ |
48 private void initializeNative() { | 49 private void initializeNative() { |
49 try { | 50 try { |
50 LibraryLoader.ensureInitialized(); | 51 LibraryLoader.ensureInitialized(); |
51 } catch (ProcessInitException e) { | 52 } catch (ProcessInitException e) { |
52 Log.e(TAG, "libmojo_shell initialization failed.", e); | 53 Log.e(TAG, "libmojo_shell initialization failed.", e); |
53 System.exit(-1); | 54 System.exit(-1); |
54 return; | 55 return; |
55 } | 56 } |
56 } | 57 } |
57 } | 58 } |
OLD | NEW |