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> |
(...skipping 22 matching lines...) Expand all Loading... |
33 static BuildInfo* GetInstance(); | 33 static BuildInfo* GetInstance(); |
34 | 34 |
35 // Const char* is used instead of std::strings because these values must be | 35 // Const char* is used instead of std::strings because these values must be |
36 // available even if the process is in a crash state. Sadly | 36 // available even if the process is in a crash state. Sadly |
37 // std::string.c_str() doesn't guarantee that memory won't be allocated when | 37 // std::string.c_str() doesn't guarantee that memory won't be allocated when |
38 // it is called. | 38 // it is called. |
39 const char* device() const { | 39 const char* device() const { |
40 return device_; | 40 return device_; |
41 } | 41 } |
42 | 42 |
| 43 const char* manufacturer() const { |
| 44 return manufacturer_; |
| 45 } |
| 46 |
43 const char* model() const { | 47 const char* model() const { |
44 return model_; | 48 return model_; |
45 } | 49 } |
46 | 50 |
47 const char* brand() const { | 51 const char* brand() const { |
48 return brand_; | 52 return brand_; |
49 } | 53 } |
50 | 54 |
51 const char* android_build_id() const { | 55 const char* android_build_id() const { |
52 return android_build_id_; | 56 return android_build_id_; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 private: | 95 private: |
92 friend struct BuildInfoSingletonTraits; | 96 friend struct BuildInfoSingletonTraits; |
93 | 97 |
94 explicit BuildInfo(JNIEnv* env); | 98 explicit BuildInfo(JNIEnv* env); |
95 | 99 |
96 // Const char* is used instead of std::strings because these values must be | 100 // Const char* is used instead of std::strings because these values must be |
97 // available even if the process is in a crash state. Sadly | 101 // available even if the process is in a crash state. Sadly |
98 // std::string.c_str() doesn't guarantee that memory won't be allocated when | 102 // std::string.c_str() doesn't guarantee that memory won't be allocated when |
99 // it is called. | 103 // it is called. |
100 const char* const device_; | 104 const char* const device_; |
| 105 const char* const manufacturer_; |
101 const char* const model_; | 106 const char* const model_; |
102 const char* const brand_; | 107 const char* const brand_; |
103 const char* const android_build_id_; | 108 const char* const android_build_id_; |
104 const char* const android_build_fp_; | 109 const char* const android_build_fp_; |
105 const char* const package_version_code_; | 110 const char* const package_version_code_; |
106 const char* const package_version_name_; | 111 const char* const package_version_name_; |
107 const char* const package_label_; | 112 const char* const package_label_; |
108 const char* const package_name_; | 113 const char* const package_name_; |
109 const char* const build_type_; | 114 const char* const build_type_; |
110 const int sdk_int_; | 115 const int sdk_int_; |
111 // This is set via set_java_exception_info, not at constructor time. | 116 // This is set via set_java_exception_info, not at constructor time. |
112 const char* java_exception_info_; | 117 const char* java_exception_info_; |
113 | 118 |
114 DISALLOW_COPY_AND_ASSIGN(BuildInfo); | 119 DISALLOW_COPY_AND_ASSIGN(BuildInfo); |
115 }; | 120 }; |
116 | 121 |
117 } // namespace android | 122 } // namespace android |
118 } // namespace base | 123 } // namespace base |
119 | 124 |
120 #endif // BASE_ANDROID_BUILD_INFO_H_ | 125 #endif // BASE_ANDROID_BUILD_INFO_H_ |
OLD | NEW |