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

Side by Side Diff: base/sys_info_android.cc

Issue 11014006: Add Android fingerprint to metrics logs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removing XML changes Created 8 years, 2 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/sys_info_posix.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 #include "base/sys_info.h" 5 #include "base/sys_info.h"
6 6
7 #include <sys/system_properties.h> 7 #include <sys/system_properties.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 int GetDalvikHeapSizeMB() { 76 int GetDalvikHeapSizeMB() {
77 char heap_size_str[PROP_VALUE_MAX]; 77 char heap_size_str[PROP_VALUE_MAX];
78 __system_property_get("dalvik.vm.heapsize", heap_size_str); 78 __system_property_get("dalvik.vm.heapsize", heap_size_str);
79 return ParseHeapSize(heap_size_str); 79 return ParseHeapSize(heap_size_str);
80 } 80 }
81 81
82 } // anonymous namespace 82 } // anonymous namespace
83 83
84 namespace base { 84 namespace base {
85 85
86 std::string SysInfo::OperatingSystemName() {
87 return "Android";
88 }
89
86 std::string SysInfo::GetAndroidBuildCodename() { 90 std::string SysInfo::GetAndroidBuildCodename() {
87 char os_version_codename_str[PROP_VALUE_MAX]; 91 char os_version_codename_str[PROP_VALUE_MAX];
88 __system_property_get("ro.build.version.codename", os_version_codename_str); 92 __system_property_get("ro.build.version.codename", os_version_codename_str);
89 return std::string(os_version_codename_str); 93 return std::string(os_version_codename_str);
90 } 94 }
91 95
92 std::string SysInfo::GetAndroidBuildID() { 96 std::string SysInfo::GetAndroidBuildID() {
93 char os_build_id_str[PROP_VALUE_MAX]; 97 char os_build_id_str[PROP_VALUE_MAX];
94 __system_property_get("ro.build.id", os_build_id_str); 98 __system_property_get("ro.build.id", os_build_id_str);
95 return std::string(os_build_id_str); 99 return std::string(os_build_id_str);
(...skipping 16 matching lines...) Expand all
112 ParseOSVersionNumbers(os_version_str, major_version, minor_version, 116 ParseOSVersionNumbers(os_version_str, major_version, minor_version,
113 bugfix_version); 117 bugfix_version);
114 } 118 }
115 119
116 int SysInfo::DalvikHeapSizeMB() { 120 int SysInfo::DalvikHeapSizeMB() {
117 static int heap_size = GetDalvikHeapSizeMB(); 121 static int heap_size = GetDalvikHeapSizeMB();
118 return heap_size; 122 return heap_size;
119 } 123 }
120 124
121 } // namespace base 125 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698