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 #include "base/android/build_info.h" | 5 #include "base/android/build_info.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 manufacturer_(StrDupParam(params, 3)), | 60 manufacturer_(StrDupParam(params, 3)), |
61 model_(StrDupParam(params, 4)), | 61 model_(StrDupParam(params, 4)), |
62 sdk_int_(SdkIntParam(params, 5)), | 62 sdk_int_(SdkIntParam(params, 5)), |
63 build_type_(StrDupParam(params, 6)), | 63 build_type_(StrDupParam(params, 6)), |
64 package_label_(StrDupParam(params, 7)), | 64 package_label_(StrDupParam(params, 7)), |
65 package_name_(StrDupParam(params, 8)), | 65 package_name_(StrDupParam(params, 8)), |
66 package_version_code_(StrDupParam(params, 9)), | 66 package_version_code_(StrDupParam(params, 9)), |
67 package_version_name_(StrDupParam(params, 10)), | 67 package_version_name_(StrDupParam(params, 10)), |
68 android_build_fp_(StrDupParam(params, 11)), | 68 android_build_fp_(StrDupParam(params, 11)), |
69 gms_version_code_(StrDupParam(params, 12)), | 69 gms_version_code_(StrDupParam(params, 12)), |
70 extracted_file_suffix_(params[13]), | 70 installer_package_name_(StrDupParam(params, 13)), |
| 71 abi_name_(StrDupParam(params, 14)), |
| 72 extracted_file_suffix_(params[15]), |
71 java_exception_info_(NULL) {} | 73 java_exception_info_(NULL) {} |
72 | 74 |
73 // static | 75 // static |
74 BuildInfo* BuildInfo::GetInstance() { | 76 BuildInfo* BuildInfo::GetInstance() { |
75 return Singleton<BuildInfo, BuildInfoSingletonTraits >::get(); | 77 return Singleton<BuildInfo, BuildInfoSingletonTraits >::get(); |
76 } | 78 } |
77 | 79 |
78 void BuildInfo::SetJavaExceptionInfo(const std::string& info) { | 80 void BuildInfo::SetJavaExceptionInfo(const std::string& info) { |
79 DCHECK(!java_exception_info_) << "info should be set only once."; | 81 DCHECK(!java_exception_info_) << "info should be set only once."; |
80 java_exception_info_ = strndup(info.c_str(), 4096); | 82 java_exception_info_ = strndup(info.c_str(), 4096); |
81 } | 83 } |
82 | 84 |
83 void BuildInfo::ClearJavaExceptionInfo() { | 85 void BuildInfo::ClearJavaExceptionInfo() { |
84 delete java_exception_info_; | 86 delete java_exception_info_; |
85 java_exception_info_ = nullptr; | 87 java_exception_info_ = nullptr; |
86 } | 88 } |
87 | 89 |
88 } // namespace android | 90 } // namespace android |
89 } // namespace base | 91 } // namespace base |
OLD | NEW |