Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / android / android_about_app_info.cc
blob6ad7f8013e641a31871028e82225b776906f7781
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/android/android_about_app_info.h"
7 #include <string>
9 #include "base/strings/stringprintf.h"
10 #include "base/sys_info.h"
11 #include "v8/include/v8.h"
13 std::string AndroidAboutAppInfo::GetOsInfo() {
14 std::string android_info_str;
16 // Append information about the OS version.
17 int32 os_major_version = 0;
18 int32 os_minor_version = 0;
19 int32 os_bugfix_version = 0;
20 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
21 &os_minor_version,
22 &os_bugfix_version);
23 base::StringAppendF(&android_info_str, "%d.%d.%d", os_major_version,
24 os_minor_version, os_bugfix_version);
26 // Append information about the device.
27 bool semicolon_inserted = false;
28 std::string android_build_codename = base::SysInfo::GetAndroidBuildCodename();
29 std::string android_device_name = base::SysInfo::GetDeviceName();
30 if ("REL" == android_build_codename && android_device_name.size() > 0) {
31 android_info_str += "; " + android_device_name;
32 semicolon_inserted = true;
35 // Append the build ID.
36 std::string android_build_id = base::SysInfo::GetAndroidBuildID();
37 if (android_build_id.size() > 0) {
38 if (!semicolon_inserted) {
39 android_info_str += ";";
41 android_info_str += " Build/" + android_build_id;
44 return android_info_str;
47 std::string AndroidAboutAppInfo::GetJavaScriptVersion() {
48 std::string js_version(v8::V8::GetVersion());
49 std::string js_engine = "V8";
50 return js_engine + " " + js_version;