| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BUILD_INFO_H_ | 5 #ifndef BASE_ANDROID_BUILD_INFO_H_ |
| 6 #define BASE_ANDROID_BUILD_INFO_H_ | 6 #define BASE_ANDROID_BUILD_INFO_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/base_export.h" | 12 #include "base/base_export.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 namespace android { | 17 namespace android { |
| 18 | 18 |
| 19 // This enumeration maps to the values returned by BuildInfo::sdk_int(), | 19 // This enumeration maps to the values returned by BuildInfo::sdk_int(), |
| 20 // indicating the Android release associated with a given SDK version. | 20 // indicating the Android release associated with a given SDK version. |
| 21 enum SdkVersion { | 21 enum SdkVersion { |
| 22 SDK_VERSION_JELLY_BEAN = 16, | 22 SDK_VERSION_JELLY_BEAN = 16, |
| 23 SDK_VERSION_JELLY_BEAN_MR1 = 17, | 23 SDK_VERSION_JELLY_BEAN_MR1 = 17, |
| 24 SDK_VERSION_JELLY_BEAN_MR2 = 18, | 24 SDK_VERSION_JELLY_BEAN_MR2 = 18, |
| 25 SDK_VERSION_KITKAT = 19, | 25 SDK_VERSION_KITKAT = 19, |
| 26 SDK_VERSION_KITKAT_WEAR = 20, | 26 SDK_VERSION_KITKAT_WEAR = 20, |
| 27 SDK_VERSION_LOLLIPOP = 21, | 27 SDK_VERSION_LOLLIPOP = 21, |
| 28 SDK_VERSION_LOLLIPOP_MR1 = 22, | 28 SDK_VERSION_LOLLIPOP_MR1 = 22, |
| 29 SDK_VERSION_MARSHMALLOW = 23 | 29 SDK_VERSION_MARSHMALLOW = 23, |
| 30 SDK_VERSION_NOUGAT = 24 |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 // BuildInfo is a singleton class that stores android build and device | 33 // BuildInfo is a singleton class that stores android build and device |
| 33 // information. It will be called from Android specific code and gets used | 34 // information. It will be called from Android specific code and gets used |
| 34 // primarily in crash reporting. | 35 // primarily in crash reporting. |
| 35 | 36 |
| 36 // It is also used to store the last java exception seen during JNI. | 37 // It is also used to store the last java exception seen during JNI. |
| 37 // TODO(nileshagrawal): Find a better place to store this info. | 38 // TODO(nileshagrawal): Find a better place to store this info. |
| 38 class BASE_EXPORT BuildInfo { | 39 class BASE_EXPORT BuildInfo { |
| 39 public: | 40 public: |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // This is set via set_java_exception_info, not at constructor time. | 136 // This is set via set_java_exception_info, not at constructor time. |
| 136 const char* java_exception_info_; | 137 const char* java_exception_info_; |
| 137 | 138 |
| 138 DISALLOW_COPY_AND_ASSIGN(BuildInfo); | 139 DISALLOW_COPY_AND_ASSIGN(BuildInfo); |
| 139 }; | 140 }; |
| 140 | 141 |
| 141 } // namespace android | 142 } // namespace android |
| 142 } // namespace base | 143 } // namespace base |
| 143 | 144 |
| 144 #endif // BASE_ANDROID_BUILD_INFO_H_ | 145 #endif // BASE_ANDROID_BUILD_INFO_H_ |
| OLD | NEW |