| 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/context_utils.h" | 9 #include "base/android/context_utils.h" |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 static BuildInfo* New() { | 31 static BuildInfo* New() { |
| 32 return new BuildInfo(AttachCurrentThread()); | 32 return new BuildInfo(AttachCurrentThread()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 static void Delete(BuildInfo* x) { | 35 static void Delete(BuildInfo* x) { |
| 36 // We're leaking this type, see kRegisterAtExit. | 36 // We're leaking this type, see kRegisterAtExit. |
| 37 NOTREACHED(); | 37 NOTREACHED(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 static const bool kRegisterAtExit = false; | 40 static const bool kRegisterAtExit = false; |
| 41 #ifndef NDEBUG | 41 #if DCHECK_IS_ON() |
| 42 static const bool kAllowedToAccessOnNonjoinableThread = true; | 42 static const bool kAllowedToAccessOnNonjoinableThread = true; |
| 43 #endif | 43 #endif |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 BuildInfo::BuildInfo(JNIEnv* env) | 46 BuildInfo::BuildInfo(JNIEnv* env) |
| 47 : device_(StrDupJString(Java_BuildInfo_getDevice(env))), | 47 : device_(StrDupJString(Java_BuildInfo_getDevice(env))), |
| 48 manufacturer_(StrDupJString(Java_BuildInfo_getDeviceManufacturer(env))), | 48 manufacturer_(StrDupJString(Java_BuildInfo_getDeviceManufacturer(env))), |
| 49 model_(StrDupJString(Java_BuildInfo_getDeviceModel(env))), | 49 model_(StrDupJString(Java_BuildInfo_getDeviceModel(env))), |
| 50 brand_(StrDupJString(Java_BuildInfo_getBrand(env))), | 50 brand_(StrDupJString(Java_BuildInfo_getBrand(env))), |
| 51 android_build_id_(StrDupJString(Java_BuildInfo_getAndroidBuildId(env))), | 51 android_build_id_(StrDupJString(Java_BuildInfo_getAndroidBuildId(env))), |
| (...skipping 29 matching lines...) Expand all Loading... |
| 81 java_exception_info_ = nullptr; | 81 java_exception_info_ = nullptr; |
| 82 } | 82 } |
| 83 | 83 |
| 84 // static | 84 // static |
| 85 bool BuildInfo::RegisterBindings(JNIEnv* env) { | 85 bool BuildInfo::RegisterBindings(JNIEnv* env) { |
| 86 return RegisterNativesImpl(env); | 86 return RegisterNativesImpl(env); |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace android | 89 } // namespace android |
| 90 } // namespace base | 90 } // namespace base |
| OLD | NEW |