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

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

Issue 10753007: Switch base/ registrations to a static class method where appropriate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/android/base_jni_registrar.cc ('k') | 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const char* package_version_name() const { 62 const char* package_version_name() const {
63 return package_version_name_; 63 return package_version_name_;
64 } 64 }
65 65
66 const char* java_exception_info() const { 66 const char* java_exception_info() const {
67 return java_exception_info_; 67 return java_exception_info_;
68 } 68 }
69 69
70 void set_java_exception_info(const std::string& info); 70 void set_java_exception_info(const std::string& info);
71 71
72
Mark Mentovai 2012/07/09 20:35:24 Extra blank line?
nilesh 2012/07/09 20:46:36 Removed
73 static bool RegisterBindings(JNIEnv* env);
74
72 private: 75 private:
73 friend struct BuildInfoSingletonTraits; 76 friend struct BuildInfoSingletonTraits;
74 77
75 explicit BuildInfo(JNIEnv* env); 78 explicit BuildInfo(JNIEnv* env);
76 79
77 // Const char* is used instead of std::strings because these values must be 80 // Const char* is used instead of std::strings because these values must be
78 // available even if the process is in a crash state. Sadly 81 // available even if the process is in a crash state. Sadly
79 // std::string.c_str() doesn't guarantee that memory won't be allocated when 82 // std::string.c_str() doesn't guarantee that memory won't be allocated when
80 // it is called. 83 // it is called.
81 const char* const device_; 84 const char* const device_;
82 const char* const model_; 85 const char* const model_;
83 const char* const brand_; 86 const char* const brand_;
84 const char* const android_build_id_; 87 const char* const android_build_id_;
85 const char* const android_build_fp_; 88 const char* const android_build_fp_;
86 const char* const package_version_code_; 89 const char* const package_version_code_;
87 const char* const package_version_name_; 90 const char* const package_version_name_;
88 // This is set via set_java_exception_info, not at constructor time. 91 // This is set via set_java_exception_info, not at constructor time.
89 const char* java_exception_info_; 92 const char* java_exception_info_;
90 93
91 DISALLOW_COPY_AND_ASSIGN(BuildInfo); 94 DISALLOW_COPY_AND_ASSIGN(BuildInfo);
92 }; 95 };
93 96
94 bool RegisterBuildInfo(JNIEnv* env);
95
96 } // namespace android 97 } // namespace android
97 } // namespace base 98 } // namespace base
98 99
99 #endif // BASE_ANDROID_BUILD_INFO_H_ 100 #endif // BASE_ANDROID_BUILD_INFO_H_
OLDNEW
« no previous file with comments | « base/android/base_jni_registrar.cc ('k') | base/android/build_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698