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

Unified Diff: base/android/build_info.h

Issue 9838033: Upstream native crash handling changes for Android. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed a stale comment. Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/android/build_info.cc » ('j') | chrome/browser/chrome_content_browser_client.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/build_info.h
diff --git a/base/android/build_info.h b/base/android/build_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..f1e7dae1596bbd9e0d97b27d278c8fbff258ffde
--- /dev/null
+++ b/base/android/build_info.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ANDROID_BUILD_INFO_H_
+#define BASE_ANDROID_BUILD_INFO_H_
+
+#include <jni.h>
+#include <string>
+
+namespace base {
+namespace android {
+
+
+// BuildInfo is a singleton class that stores android build and device
+// information.
+class BuildInfo {
+ public:
+
+ // Static factory method for getting the singleton BuildInfo instance.
+ static const BuildInfo* const GetInstance();
+
+ ~BuildInfo() {};
+
+ // We use const char* instead of std::strings because we need to have these
+ // values available even if the process is in a crash state. Sadly
+ // std::string.c_str() doesn't guarantee that memory won't be allocated when
+ // it is called.
+ const char* device;
+ const char* model;
+ const char* brand;
+ const char* android_build_id;
+ const char* android_build_fp;
+ const char* package_version_code;
+ const char* package_version_name;
+
+ private:
+ static BuildInfo* instance_;
+
+ BuildInfo(
+ const char* device,
+ const char* model,
+ const char* brand,
+ const char* android_build_id,
+ const char* android_build_fp,
+ const char* package_version_code,
+ const char* package_version_name);
+
+};
+
+bool RegisterBuildInfo(JNIEnv* env);
+
+} // namespace android
+} // namespace base
+
+
+#endif // BASE_ANDROID_BUILD_INFO_H_
« no previous file with comments | « no previous file | base/android/build_info.cc » ('j') | chrome/browser/chrome_content_browser_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698