OLD | NEW |
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 #ifndef BASE_ANDROID_LIBRARY_LOAD_FROM_APK_STATUS_CODES_H_ | 5 #ifndef BASE_ANDROID_LIBRARY_LOAD_FROM_APK_STATUS_CODES_H_ |
6 #define BASE_ANDROID_LIBRARY_LOAD_FROM_APK_STATUS_CODES_H_ | 6 #define BASE_ANDROID_LIBRARY_LOAD_FROM_APK_STATUS_CODES_H_ |
7 | 7 |
8 namespace base { | 8 namespace base { |
9 namespace android { | 9 namespace android { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
| 13 // This enum must be kept in sync with the LibraryLoadFromApkStatus enum in |
| 14 // tools/metrics/histograms/histograms.xml. |
13 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.base.library_loader | 15 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.base.library_loader |
14 enum LibraryLoadFromApkStatusCodes { | 16 enum LibraryLoadFromApkStatusCodes { |
15 // The loader was unable to determine whether the functionality is supported. | 17 // The loader was unable to determine whether the functionality is supported. |
16 LIBRARY_LOAD_FROM_APK_STATUS_CODES_UNKNOWN = 0, | 18 LIBRARY_LOAD_FROM_APK_STATUS_CODES_UNKNOWN = 0, |
17 | 19 |
18 // The device does not support loading a library directly from the APK file. | 20 // The device does not support loading a library directly from the APK file. |
19 LIBRARY_LOAD_FROM_APK_STATUS_CODES_NOT_SUPPORTED = 1, | 21 LIBRARY_LOAD_FROM_APK_STATUS_CODES_NOT_SUPPORTED = 1, |
20 | 22 |
21 // The device supports loading a library directly from the APK file. | 23 // The device supports loading a library directly from the APK file. |
22 LIBRARY_LOAD_FROM_APK_STATUS_CODES_SUPPORTED = 2, | 24 LIBRARY_LOAD_FROM_APK_STATUS_CODES_SUPPORTED = 2, |
23 | 25 |
24 // The Chromium library was successfully loaded directly from the APK file. | 26 // The Chromium library was successfully loaded directly from the APK file. |
25 LIBRARY_LOAD_FROM_APK_STATUS_CODES_SUCCESSFUL = 3, | 27 LIBRARY_LOAD_FROM_APK_STATUS_CODES_SUCCESSFUL = 3, |
26 | 28 |
27 // The Chromium library was not page aligned in the APK file. | 29 // The Chromium library was successfully loaded using the unpack library |
28 LIBRARY_LOAD_FROM_APK_STATUS_CODES_NOT_ALIGNED = 4, | 30 // fallback because it was compressed or not page aligned in the APK file. |
| 31 LIBRARY_LOAD_FROM_APK_STATUS_CODES_USED_UNPACK_LIBRARY_FALLBACK = 4, |
| 32 |
| 33 // The Chromium library was successfully loaded using the no map executable |
| 34 // support fallback. |
| 35 LIBRARY_LOAD_FROM_APK_STATUS_CODES_USED_NO_MAP_EXEC_SUPPORT_FALLBACK = 5, |
29 | 36 |
30 // End sentinel. | 37 // End sentinel. |
31 LIBRARY_LOAD_FROM_APK_STATUS_CODES_MAX = 5, | 38 LIBRARY_LOAD_FROM_APK_STATUS_CODES_MAX = 6, |
32 }; | 39 }; |
33 | 40 |
34 } // namespace | 41 } // namespace |
35 | 42 |
36 } // namespace android | 43 } // namespace android |
37 } // namespace base | 44 } // namespace base |
38 | 45 |
39 #endif // BASE_ANDROID_LIBRARY_LOAD_FROM_APK_STATUS_CODES_H_ | 46 #endif // BASE_ANDROID_LIBRARY_LOAD_FROM_APK_STATUS_CODES_H_ |
OLD | NEW |