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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 int sdk_int() const { | 94 int sdk_int() const { |
95 return sdk_int_; | 95 return sdk_int_; |
96 } | 96 } |
97 | 97 |
98 const char* java_exception_info() const { | 98 const char* java_exception_info() const { |
99 return java_exception_info_; | 99 return java_exception_info_; |
100 } | 100 } |
101 | 101 |
102 void set_java_exception_info(const std::string& info); | 102 void SetJavaExceptionInfo(const std::string& info); |
| 103 |
| 104 void ClearJavaExceptionInfo(); |
103 | 105 |
104 static bool RegisterBindings(JNIEnv* env); | 106 static bool RegisterBindings(JNIEnv* env); |
105 | 107 |
106 private: | 108 private: |
107 friend struct BuildInfoSingletonTraits; | 109 friend struct BuildInfoSingletonTraits; |
108 | 110 |
109 explicit BuildInfo(JNIEnv* env); | 111 explicit BuildInfo(JNIEnv* env); |
110 | 112 |
111 // Const char* is used instead of std::strings because these values must be | 113 // Const char* is used instead of std::strings because these values must be |
112 // available even if the process is in a crash state. Sadly | 114 // available even if the process is in a crash state. Sadly |
(...skipping 14 matching lines...) Expand all Loading... |
127 // This is set via set_java_exception_info, not at constructor time. | 129 // This is set via set_java_exception_info, not at constructor time. |
128 const char* java_exception_info_; | 130 const char* java_exception_info_; |
129 | 131 |
130 DISALLOW_COPY_AND_ASSIGN(BuildInfo); | 132 DISALLOW_COPY_AND_ASSIGN(BuildInfo); |
131 }; | 133 }; |
132 | 134 |
133 } // namespace android | 135 } // namespace android |
134 } // namespace base | 136 } // namespace base |
135 | 137 |
136 #endif // BASE_ANDROID_BUILD_INFO_H_ | 138 #endif // BASE_ANDROID_BUILD_INFO_H_ |
OLD | NEW |