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_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 java_exception_info_(NULL) { | 62 java_exception_info_(NULL) { |
63 } | 63 } |
64 | 64 |
65 // static | 65 // static |
66 BuildInfo* BuildInfo::GetInstance() { | 66 BuildInfo* BuildInfo::GetInstance() { |
67 return Singleton<BuildInfo, BuildInfoSingletonTraits >::get(); | 67 return Singleton<BuildInfo, BuildInfoSingletonTraits >::get(); |
68 } | 68 } |
69 | 69 |
70 void BuildInfo::set_java_exception_info(const std::string& info) { | 70 void BuildInfo::set_java_exception_info(const std::string& info) { |
71 DCHECK(!java_exception_info_) << "info should be set only once."; | 71 DCHECK(!java_exception_info_) << "info should be set only once."; |
72 java_exception_info_ = strndup(info.c_str(), 1024); | 72 java_exception_info_ = strndup(info.c_str(), 4096); |
73 } | 73 } |
74 | 74 |
75 // static | 75 // static |
76 bool BuildInfo::RegisterBindings(JNIEnv* env) { | 76 bool BuildInfo::RegisterBindings(JNIEnv* env) { |
77 return RegisterNativesImpl(env); | 77 return RegisterNativesImpl(env); |
78 } | 78 } |
79 | 79 |
80 } // namespace android | 80 } // namespace android |
81 } // namespace base | 81 } // namespace base |
OLD | NEW |