| 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> | 
|   11 #include <vector> |  | 
|   12  |   11  | 
|   13 #include "base/base_export.h" |   12 #include "base/base_export.h" | 
|   14 #include "base/macros.h" |   13 #include "base/macros.h" | 
|   15 #include "base/memory/singleton.h" |   14 #include "base/memory/singleton.h" | 
|   16  |   15  | 
|   17 namespace base { |   16 namespace base { | 
|   18 namespace android { |   17 namespace android { | 
|   19  |   18  | 
|   20 // This enumeration maps to the values returned by BuildInfo::sdk_int(), |   19 // This enumeration maps to the values returned by BuildInfo::sdk_int(), | 
|   21 // indicating the Android release associated with a given SDK version. |   20 // indicating the Android release associated with a given SDK version. | 
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  110     return java_exception_info_; |  109     return java_exception_info_; | 
|  111   } |  110   } | 
|  112  |  111  | 
|  113   void SetJavaExceptionInfo(const std::string& info); |  112   void SetJavaExceptionInfo(const std::string& info); | 
|  114  |  113  | 
|  115   void ClearJavaExceptionInfo(); |  114   void ClearJavaExceptionInfo(); | 
|  116  |  115  | 
|  117  private: |  116  private: | 
|  118   friend struct BuildInfoSingletonTraits; |  117   friend struct BuildInfoSingletonTraits; | 
|  119  |  118  | 
|  120   explicit BuildInfo(const std::vector<std::string>& params); |  119   explicit BuildInfo(JNIEnv* env); | 
|  121  |  120  | 
|  122   // Const char* is used instead of std::strings because these values must be |  121   // Const char* is used instead of std::strings because these values must be | 
|  123   // available even if the process is in a crash state. Sadly |  122   // available even if the process is in a crash state. Sadly | 
|  124   // std::string.c_str() doesn't guarantee that memory won't be allocated when |  123   // std::string.c_str() doesn't guarantee that memory won't be allocated when | 
|  125   // it is called. |  124   // it is called. | 
|  126   const char* const brand_; |  | 
|  127   const char* const device_; |  125   const char* const device_; | 
|  128   const char* const android_build_id_; |  | 
|  129   const char* const manufacturer_; |  126   const char* const manufacturer_; | 
|  130   const char* const model_; |  127   const char* const model_; | 
|  131   const int sdk_int_; |  128   const char* const brand_; | 
|  132   const char* const build_type_; |  129   const char* const android_build_id_; | 
 |  130   const char* const android_build_fp_; | 
 |  131   const char* const gms_version_code_; | 
 |  132   const char* const package_version_code_; | 
 |  133   const char* const package_version_name_; | 
|  133   const char* const package_label_; |  134   const char* const package_label_; | 
|  134   const char* const package_name_; |  135   const char* const package_name_; | 
|  135   const char* const package_version_code_; |  136   const char* const build_type_; | 
|  136   const char* const package_version_name_; |  | 
|  137   const char* const android_build_fp_; |  | 
|  138   const char* const gms_version_code_; |  | 
|  139   // Not needed by breakpad. |  137   // Not needed by breakpad. | 
|  140   const std::string extracted_file_suffix_; |  138   const std::string extracted_file_suffix_; | 
 |  139   const int sdk_int_; | 
|  141   // This is set via set_java_exception_info, not at constructor time. |  140   // This is set via set_java_exception_info, not at constructor time. | 
|  142   const char* java_exception_info_; |  141   const char* java_exception_info_; | 
|  143  |  142  | 
|  144   DISALLOW_COPY_AND_ASSIGN(BuildInfo); |  143   DISALLOW_COPY_AND_ASSIGN(BuildInfo); | 
|  145 }; |  144 }; | 
|  146  |  145  | 
|  147 }  // namespace android |  146 }  // namespace android | 
|  148 }  // namespace base |  147 }  // namespace base | 
|  149  |  148  | 
|  150 #endif  // BASE_ANDROID_BUILD_INFO_H_ |  149 #endif  // BASE_ANDROID_BUILD_INFO_H_ | 
| OLD | NEW |