Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: base/android/build_info.h

Issue 1236283002: [Android] Remove deprecated SysInfo property retrieval (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/android/build_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 const char* model() const { 59 const char* model() const {
60 return model_; 60 return model_;
61 } 61 }
62 62
63 const char* brand() const { 63 const char* brand() const {
64 return brand_; 64 return brand_;
65 } 65 }
66 66
67 const char* android_build_id() const { 67 const char* build_id() const {
68 return android_build_id_; 68 return build_id_;
69 } 69 }
70 70
71 const char* android_build_fp() const { 71 const char* build_fp() const {
72 return android_build_fp_; 72 return build_fp_;
73 } 73 }
74 74
75 const char* package_version_code() const { 75 const char* package_version_code() const {
76 return package_version_code_; 76 return package_version_code_;
77 } 77 }
78 78
79 const char* package_version_name() const { 79 const char* package_version_name() const {
80 return package_version_name_; 80 return package_version_name_;
81 } 81 }
82 82
83 const char* package_label() const { 83 const char* package_label() const {
84 return package_label_; 84 return package_label_;
85 } 85 }
86 86
87 const char* package_name() const { 87 const char* package_name() const {
88 return package_name_; 88 return package_name_;
89 } 89 }
90 90
91 const char* build_type() const { 91 const char* build_type() const {
92 return build_type_; 92 return build_type_;
93 } 93 }
94 94
95 const char* build_version_release() const {
96 return build_version_release_;
97 }
98
99 const char* build_version_codename() const {
100 return build_version_codename_;
101 }
102
95 int sdk_int() const { 103 int sdk_int() const {
96 return sdk_int_; 104 return sdk_int_;
97 } 105 }
98 106
107 int large_memory_class() const {
108 return large_memory_class_;
109 }
110
99 int has_language_apk_splits() const { 111 int has_language_apk_splits() const {
100 return has_language_apk_splits_; 112 return has_language_apk_splits_;
101 } 113 }
102 114
103 const char* java_exception_info() const { 115 const char* java_exception_info() const {
104 return java_exception_info_; 116 return java_exception_info_;
105 } 117 }
106 118
107 void SetJavaExceptionInfo(const std::string& info); 119 void SetJavaExceptionInfo(const std::string& info);
108 120
109 void ClearJavaExceptionInfo(); 121 void ClearJavaExceptionInfo();
110 122
111 static bool RegisterBindings(JNIEnv* env); 123 static bool RegisterBindings(JNIEnv* env);
112 124
113 private: 125 private:
114 friend struct BuildInfoSingletonTraits; 126 friend struct BuildInfoSingletonTraits;
115 127
116 explicit BuildInfo(JNIEnv* env); 128 explicit BuildInfo(JNIEnv* env);
117 129
118 // Const char* is used instead of std::strings because these values must be 130 // Const char* is used instead of std::strings because these values must be
119 // available even if the process is in a crash state. Sadly 131 // available even if the process is in a crash state. Sadly
120 // std::string.c_str() doesn't guarantee that memory won't be allocated when 132 // std::string.c_str() doesn't guarantee that memory won't be allocated when
121 // it is called. 133 // it is called.
122 const char* const device_; 134 const char* const device_;
123 const char* const manufacturer_; 135 const char* const manufacturer_;
124 const char* const model_; 136 const char* const model_;
125 const char* const brand_; 137 const char* const brand_;
126 const char* const android_build_id_; 138 const char* const build_id_;
127 const char* const android_build_fp_; 139 const char* const build_fp_;
128 const char* const package_version_code_; 140 const char* const package_version_code_;
129 const char* const package_version_name_; 141 const char* const package_version_name_;
130 const char* const package_label_; 142 const char* const package_label_;
131 const char* const package_name_; 143 const char* const package_name_;
132 const char* const build_type_; 144 const char* const build_type_;
145 const char* const build_version_release_;
146 const char* const build_version_codename_;
133 const int sdk_int_; 147 const int sdk_int_;
148 const int large_memory_class_;
134 const bool has_language_apk_splits_; 149 const bool has_language_apk_splits_;
135 // This is set via set_java_exception_info, not at constructor time. 150 // This is set via set_java_exception_info, not at constructor time.
136 const char* java_exception_info_; 151 const char* java_exception_info_;
137 152
138 DISALLOW_COPY_AND_ASSIGN(BuildInfo); 153 DISALLOW_COPY_AND_ASSIGN(BuildInfo);
139 }; 154 };
140 155
141 } // namespace android 156 } // namespace android
142 } // namespace base 157 } // namespace base
143 158
144 #endif // BASE_ANDROID_BUILD_INFO_H_ 159 #endif // BASE_ANDROID_BUILD_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | base/android/build_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698