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

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

Issue 599553002: Adds Build.MANUFACTURER to native BuildInfo wrapper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 22 matching lines...) Expand all
33 static BuildInfo* GetInstance(); 33 static BuildInfo* GetInstance();
34 34
35 // Const char* is used instead of std::strings because these values must be 35 // Const char* is used instead of std::strings because these values must be
36 // available even if the process is in a crash state. Sadly 36 // available even if the process is in a crash state. Sadly
37 // std::string.c_str() doesn't guarantee that memory won't be allocated when 37 // std::string.c_str() doesn't guarantee that memory won't be allocated when
38 // it is called. 38 // it is called.
39 const char* device() const { 39 const char* device() const {
40 return device_; 40 return device_;
41 } 41 }
42 42
43 const char* manufacturer() const {
44 return manufacturer_;
45 }
46
43 const char* model() const { 47 const char* model() const {
44 return model_; 48 return model_;
45 } 49 }
46 50
47 const char* brand() const { 51 const char* brand() const {
48 return brand_; 52 return brand_;
49 } 53 }
50 54
51 const char* android_build_id() const { 55 const char* android_build_id() const {
52 return android_build_id_; 56 return android_build_id_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 private: 95 private:
92 friend struct BuildInfoSingletonTraits; 96 friend struct BuildInfoSingletonTraits;
93 97
94 explicit BuildInfo(JNIEnv* env); 98 explicit BuildInfo(JNIEnv* env);
95 99
96 // Const char* is used instead of std::strings because these values must be 100 // Const char* is used instead of std::strings because these values must be
97 // available even if the process is in a crash state. Sadly 101 // available even if the process is in a crash state. Sadly
98 // std::string.c_str() doesn't guarantee that memory won't be allocated when 102 // std::string.c_str() doesn't guarantee that memory won't be allocated when
99 // it is called. 103 // it is called.
100 const char* const device_; 104 const char* const device_;
105 const char* const manufacturer_;
101 const char* const model_; 106 const char* const model_;
102 const char* const brand_; 107 const char* const brand_;
103 const char* const android_build_id_; 108 const char* const android_build_id_;
104 const char* const android_build_fp_; 109 const char* const android_build_fp_;
105 const char* const package_version_code_; 110 const char* const package_version_code_;
106 const char* const package_version_name_; 111 const char* const package_version_name_;
107 const char* const package_label_; 112 const char* const package_label_;
108 const char* const package_name_; 113 const char* const package_name_;
109 const char* const build_type_; 114 const char* const build_type_;
110 const int sdk_int_; 115 const int sdk_int_;
111 // This is set via set_java_exception_info, not at constructor time. 116 // This is set via set_java_exception_info, not at constructor time.
112 const char* java_exception_info_; 117 const char* java_exception_info_;
113 118
114 DISALLOW_COPY_AND_ASSIGN(BuildInfo); 119 DISALLOW_COPY_AND_ASSIGN(BuildInfo);
115 }; 120 };
116 121
117 } // namespace android 122 } // namespace android
118 } // namespace base 123 } // namespace base
119 124
120 #endif // BASE_ANDROID_BUILD_INFO_H_ 125 #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