Commit c3884364 authored by Shuo Weng's avatar Shuo Weng Committed by Commit Bot

Update system_profile.proto. Populate app_package_name

Bug: 833214
Change-Id: I5552bdca37a2e3e20a039b9a0ca316f4480b1217
Reviewed-on: https://chromium-review.googlesource.com/1010055
Commit-Queue: Shuo Weng <shuow@google.com>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551296}
parent 6c0c329a
......@@ -173,6 +173,10 @@ void MetricsLog::RecordCoreSystemProfile(MetricsServiceClient* client,
#if defined(OS_ANDROID)
os->set_build_fingerprint(
base::android::BuildInfo::GetInstance()->android_build_fp());
std::string package_name =
base::android::BuildInfo::GetInstance()->package_name();
if (package_name != "com.android.chrome")
system_profile->set_app_package_name(package_name);
#endif
}
......
......@@ -156,6 +156,8 @@ TEST_F(MetricsLogTest, BasicRecord) {
#if defined(OS_ANDROID)
system_profile->mutable_os()->set_build_fingerprint(
base::android::BuildInfo::GetInstance()->android_build_fp());
system_profile->set_app_package_name(
base::android::BuildInfo::GetInstance()->package_name());
#endif
// Hard to mock.
......
Name: Metrics Protos
Short Name: metrics_proto
URL: This is the canonical public repository
Version: 191322814
Date: 2018/04/02 UTC
Version: 192562418
Date: 2018/04/12 UTC
License: BSD
Security Critical: Yes
......
......@@ -15,7 +15,7 @@ import "extension_install.proto";
// Stores information about the user's brower and system configuration.
// The system configuration fields are recorded once per client session.
// Next tag: 26
// Next tag: 27
message SystemProfileProto {
// The time when the client was compiled/linked, in seconds since the epoch.
optional int64 build_timestamp = 1;
......@@ -972,4 +972,8 @@ message SystemProfileProto {
// extensions from all fully-initialized profiles. If a single extension is
// installed in multiple profiles, it will be recorded multiple times.
repeated ExtensionInstallProto extension_install = 25;
// The Chrome package name on Android, if it's different from
// "com.android.chrome".
optional string app_package_name = 26;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment