Commit c64221d9 authored by Anqing Zhao's avatar Anqing Zhao Committed by Commit Bot

Add privacy notifications for crash reports in telemetry API

After crash reports in telemetry API is enabled. We need to notify users
that the related crash report metadata will be collected for privacy
purpose on chrome://management page.

PRD: go/cros-telem-crash
DD: go/cros-telem-crash-dd
Bug: 1040078
Change-Id: Ie7805138b31856a017f268c1aa9c21083937e5a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2080428
Commit-Queue: Anqing Zhao <anqing@google.com>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748597}
parent b2810262
...@@ -410,6 +410,10 @@ bool ChildStatusCollector::ShouldReportHardwareStatus() const { ...@@ -410,6 +410,10 @@ bool ChildStatusCollector::ShouldReportHardwareStatus() const {
return false; return false;
} }
bool ChildStatusCollector::ShouldReportCrashReportInfo() const {
return false;
}
void ChildStatusCollector::OnOSVersion(const std::string& version) { void ChildStatusCollector::OnOSVersion(const std::string& version) {
os_version_ = version; os_version_ = version;
} }
......
...@@ -79,6 +79,7 @@ class ChildStatusCollector : public StatusCollector, ...@@ -79,6 +79,7 @@ class ChildStatusCollector : public StatusCollector,
bool ShouldReportNetworkInterfaces() const override; bool ShouldReportNetworkInterfaces() const override;
bool ShouldReportUsers() const override; bool ShouldReportUsers() const override;
bool ShouldReportHardwareStatus() const override; bool ShouldReportHardwareStatus() const override;
bool ShouldReportCrashReportInfo() const override;
// Returns the amount of time the child has used so far today. If there is no // Returns the amount of time the child has used so far today. If there is no
// user logged in, it returns 0. // user logged in, it returns 0.
......
...@@ -2246,6 +2246,9 @@ bool DeviceStatusCollector::ShouldReportUsers() const { ...@@ -2246,6 +2246,9 @@ bool DeviceStatusCollector::ShouldReportUsers() const {
bool DeviceStatusCollector::ShouldReportHardwareStatus() const { bool DeviceStatusCollector::ShouldReportHardwareStatus() const {
return report_hardware_status_; return report_hardware_status_;
} }
bool DeviceStatusCollector::ShouldReportCrashReportInfo() const {
return report_crash_report_info_ && stat_reporting_pref_;
}
void DeviceStatusCollector::OnOSVersion(const std::string& version) { void DeviceStatusCollector::OnOSVersion(const std::string& version) {
os_version_ = version; os_version_ = version;
......
...@@ -201,6 +201,7 @@ class DeviceStatusCollector : public StatusCollector, ...@@ -201,6 +201,7 @@ class DeviceStatusCollector : public StatusCollector,
bool ShouldReportNetworkInterfaces() const override; bool ShouldReportNetworkInterfaces() const override;
bool ShouldReportUsers() const override; bool ShouldReportUsers() const override;
bool ShouldReportHardwareStatus() const override; bool ShouldReportHardwareStatus() const override;
bool ShouldReportCrashReportInfo() const override;
static void RegisterPrefs(PrefRegistrySimple* registry); static void RegisterPrefs(PrefRegistrySimple* registry);
......
...@@ -101,6 +101,7 @@ class StatusCollector { ...@@ -101,6 +101,7 @@ class StatusCollector {
virtual bool ShouldReportNetworkInterfaces() const = 0; virtual bool ShouldReportNetworkInterfaces() const = 0;
virtual bool ShouldReportUsers() const = 0; virtual bool ShouldReportUsers() const = 0;
virtual bool ShouldReportHardwareStatus() const = 0; virtual bool ShouldReportHardwareStatus() const = 0;
virtual bool ShouldReportCrashReportInfo() const = 0;
// Returns the DeviceLocalAccount associated with the currently active kiosk // Returns the DeviceLocalAccount associated with the currently active kiosk
// session, if the session was auto-launched with zero delay (this enables // session, if the session was auto-launched with zero delay (this enables
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<g id="timelapse"><path d="M16.24 7.76C15.07 6.59 13.54 6 12 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0 2.34-2.34 2.34-6.14-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g> <g id="timelapse"><path d="M16.24 7.76C15.07 6.59 13.54 6 12 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0 2.34-2.34 2.34-6.14-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="linux"><path d="M 6.9375 22.042969 C 3.867188 20.457031 1.886719 17.347656 1.824219 13.234375 C 1.527344 13.378906 1.1875 13.402344 0.800781 13.265625 C -0.3125 12.875 -0.0625 11.578125 0.34375 10.421875 C 0.683594 9.460938 1.835938 8.761719 2.402344 8.613281 C 3.71875 3.78125 6.804688 0 12 0 C 17.257812 0 20.367188 3.625 21.644531 8.628906 C 22.222656 8.796875 23.324219 9.484375 23.65625 10.421875 C 24.0625 11.578125 24.3125 12.875 23.199219 13.265625 C 22.8125 13.402344 22.472656 13.378906 22.175781 13.234375 C 22.117188 17.375 20.140625 20.472656 17.070312 22.046875 C 17.257812 22.191406 17.363281 22.375 17.363281 22.613281 C 17.363281 23.378906 17.75 24 14.898438 24 C 12.8125 24 12.457031 23.578125 12.417969 23.117188 C 12.28125 23.035156 12.140625 22.910156 12 22.910156 C 11.859375 22.910156 11.71875 23.042969 11.582031 23.128906 C 11.535156 23.582031 11.171875 24 9.101562 24 C 6.25 24 6.636719 23.378906 6.636719 22.613281 C 6.636719 22.371094 6.746094 22.183594 6.9375 22.042969 Z M 12 21.222656 C 17.929688 21.222656 20.070312 17.1875 20.070312 11.820312 C 20.070312 7.371094 18.125 3.28125 14.898438 2.597656 C 13.863281 2.378906 13.136719 4.761719 12 4.761719 C 10.863281 4.761719 10.035156 2.378906 9.101562 2.597656 C 5.863281 3.359375 3.929688 7.605469 3.929688 11.820312 C 3.929688 16.882812 6.070312 21.222656 12 21.222656 Z M 8.277344 9.324219 C 7.589844 9.324219 7.035156 8.789062 7.035156 8.132812 C 7.035156 7.476562 7.589844 6.941406 8.277344 6.941406 C 8.960938 6.941406 9.515625 7.476562 9.515625 8.132812 C 9.515625 8.789062 8.960938 9.324219 8.277344 9.324219 Z M 15.722656 9.324219 C 15.039062 9.324219 14.484375 8.789062 14.484375 8.132812 C 14.484375 7.476562 15.039062 6.941406 15.722656 6.941406 C 16.410156 6.941406 16.964844 7.476562 16.964844 8.132812 C 16.964844 8.789062 16.410156 9.324219 15.722656 9.324219 Z M 12.226562 9.964844 L 13.929688 10.683594 C 14.222656 10.804688 14.355469 11.132812 14.226562 11.414062 C 14.199219 11.46875 14.164062 11.519531 14.121094 11.5625 L 12.425781 13.308594 C 12.210938 13.535156 11.839844 13.546875 11.601562 13.339844 C 11.589844 13.332031 11.578125 13.320312 11.566406 13.308594 L 9.878906 11.558594 C 9.660156 11.332031 9.675781 10.980469 9.914062 10.773438 C 9.960938 10.734375 10.011719 10.703125 10.070312 10.679688 L 11.75 9.964844 C 11.898438 9.902344 12.074219 9.902344 12.226562 9.964844 Z M 12.226562 9.964844"></path></g> <g id="linux"><path d="M 6.9375 22.042969 C 3.867188 20.457031 1.886719 17.347656 1.824219 13.234375 C 1.527344 13.378906 1.1875 13.402344 0.800781 13.265625 C -0.3125 12.875 -0.0625 11.578125 0.34375 10.421875 C 0.683594 9.460938 1.835938 8.761719 2.402344 8.613281 C 3.71875 3.78125 6.804688 0 12 0 C 17.257812 0 20.367188 3.625 21.644531 8.628906 C 22.222656 8.796875 23.324219 9.484375 23.65625 10.421875 C 24.0625 11.578125 24.3125 12.875 23.199219 13.265625 C 22.8125 13.402344 22.472656 13.378906 22.175781 13.234375 C 22.117188 17.375 20.140625 20.472656 17.070312 22.046875 C 17.257812 22.191406 17.363281 22.375 17.363281 22.613281 C 17.363281 23.378906 17.75 24 14.898438 24 C 12.8125 24 12.457031 23.578125 12.417969 23.117188 C 12.28125 23.035156 12.140625 22.910156 12 22.910156 C 11.859375 22.910156 11.71875 23.042969 11.582031 23.128906 C 11.535156 23.582031 11.171875 24 9.101562 24 C 6.25 24 6.636719 23.378906 6.636719 22.613281 C 6.636719 22.371094 6.746094 22.183594 6.9375 22.042969 Z M 12 21.222656 C 17.929688 21.222656 20.070312 17.1875 20.070312 11.820312 C 20.070312 7.371094 18.125 3.28125 14.898438 2.597656 C 13.863281 2.378906 13.136719 4.761719 12 4.761719 C 10.863281 4.761719 10.035156 2.378906 9.101562 2.597656 C 5.863281 3.359375 3.929688 7.605469 3.929688 11.820312 C 3.929688 16.882812 6.070312 21.222656 12 21.222656 Z M 8.277344 9.324219 C 7.589844 9.324219 7.035156 8.789062 7.035156 8.132812 C 7.035156 7.476562 7.589844 6.941406 8.277344 6.941406 C 8.960938 6.941406 9.515625 7.476562 9.515625 8.132812 C 9.515625 8.789062 8.960938 9.324219 8.277344 9.324219 Z M 15.722656 9.324219 C 15.039062 9.324219 14.484375 8.789062 14.484375 8.132812 C 14.484375 7.476562 15.039062 6.941406 15.722656 6.941406 C 16.410156 6.941406 16.964844 7.476562 16.964844 8.132812 C 16.964844 8.789062 16.410156 9.324219 15.722656 9.324219 Z M 12.226562 9.964844 L 13.929688 10.683594 C 14.222656 10.804688 14.355469 11.132812 14.226562 11.414062 C 14.199219 11.46875 14.164062 11.519531 14.121094 11.5625 L 12.425781 13.308594 C 12.210938 13.535156 11.839844 13.546875 11.601562 13.339844 C 11.589844 13.332031 11.578125 13.320312 11.566406 13.308594 L 9.878906 11.558594 C 9.660156 11.332031 9.675781 10.980469 9.914062 10.773438 C 9.960938 10.734375 10.011719 10.703125 10.070312 10.679688 L 11.75 9.964844 C 11.898438 9.902344 12.074219 9.902344 12.226562 9.964844 Z M 12.226562 9.964844"></path></g>
<g id="play-store"><path d="M20.18 10.88l-3.06-1.74L14.26 12l2.86 2.86 3.06-1.74c.55-.31.82-.71.82-1.12 0-.41-.27-.81-.82-1.12zM4.71 2.45l8.42 8.42 2.55-2.55-10.7-6.06c-.07-.04-.14-.07-.21-.1-.17-.07-.3.05-.15.21.03.02.06.05.09.08zm0 19.1l-.08.08c-.15.15-.02.28.15.21.07-.03.14-.06.21-.1l10.69-6.06-2.55-2.55s-7.2 7.21-8.42 8.42zM12 12L3.38 3.38c-.19-.19-.38-.07-.38.19v16.86c0 .26.19.38.38.19L12 12z"></path></g> <g id="play-store"><path d="M20.18 10.88l-3.06-1.74L14.26 12l2.86 2.86 3.06-1.74c.55-.31.82-.71.82-1.12 0-.41-.27-.81-.82-1.12zM4.71 2.45l8.42 8.42 2.55-2.55-10.7-6.06c-.07-.04-.14-.07-.21-.1-.17-.07-.3.05-.15.21.03.02.06.05.09.08zm0 19.1l-.08.08c-.15.15-.02.28.15.21.07-.03.14-.06.21-.1l10.69-6.06-2.55-2.55s-7.2 7.21-8.42 8.42zM12 12L3.38 3.38c-.19-.19-.38-.07-.38.19v16.86c0 .26.19.38.38.19L12 12z"></path></g>
<g id="crash"><path d="M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-4.51 2.11l.26 2.79-2.74.62-1.43 2.41L12 18.82l-2.58 1.11-1.43-2.41-2.74-.62.26-2.8L3.66 12l1.85-2.12-.26-2.78 2.74-.61 1.43-2.41L12 5.18l2.58-1.11 1.43 2.41 2.74.62-.26 2.79L20.34 12l-1.85 2.11zM11 15h2v2h-2zm0-8h2v6h-2z"></path></g>
</if> </if>
<g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path><path d="M0 0h24v24H0z" fill="none"></path></g> <g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path><path d="M0 0h24v24H0z" fill="none"></path></g>
<g id="public"><path d="M0 0h24v24H0z" fill="none"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"></path></g> <g id="public"><path d="M0 0h24v24H0z" fill="none"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"></path></g>
......
...@@ -68,6 +68,7 @@ export const DeviceReportingType = { ...@@ -68,6 +68,7 @@ export const DeviceReportingType = {
DEVICE_ACTIVITY: 'device activity', DEVICE_ACTIVITY: 'device activity',
STATISTIC: 'device statistics', STATISTIC: 'device statistics',
DEVICE: 'device', DEVICE: 'device',
CRASH_REPORT: 'crash report',
LOGS: 'logs', LOGS: 'logs',
PRINT: 'print', PRINT: 'print',
CROSTINI: 'crostini', CROSTINI: 'crostini',
......
...@@ -219,6 +219,8 @@ Polymer({ ...@@ -219,6 +219,8 @@ Polymer({
return 'management:bar-chart'; return 'management:bar-chart';
case DeviceReportingType.DEVICE: case DeviceReportingType.DEVICE:
return 'cr:computer'; return 'cr:computer';
case DeviceReportingType.CRASH_REPORT:
return 'management:crash';
case DeviceReportingType.LOGS: case DeviceReportingType.LOGS:
return 'management:report'; return 'management:report';
case DeviceReportingType.PRINT: case DeviceReportingType.PRINT:
......
...@@ -58,6 +58,7 @@ content::WebUIDataSource* CreateManagementUIHtmlSource(Profile* profile) { ...@@ -58,6 +58,7 @@ content::WebUIDataSource* CreateManagementUIHtmlSource(Profile* profile) {
{kManagementReportNetworkInterfaces, {kManagementReportNetworkInterfaces,
IDS_MANAGEMENT_REPORT_DEVICE_NETWORK_INTERFACES}, IDS_MANAGEMENT_REPORT_DEVICE_NETWORK_INTERFACES},
{kManagementReportUsers, IDS_MANAGEMENT_REPORT_DEVICE_USERS}, {kManagementReportUsers, IDS_MANAGEMENT_REPORT_DEVICE_USERS},
{kManagementReportCrashReports, IDS_MANAGEMENT_REPORT_DEVICE_CRASH_REPORTS},
{kManagementPrinting, IDS_MANAGEMENT_REPORT_PRINTING}, {kManagementPrinting, IDS_MANAGEMENT_REPORT_PRINTING},
{kManagementCrostini, IDS_MANAGEMENT_CROSTINI}, {kManagementCrostini, IDS_MANAGEMENT_CROSTINI},
{kManagementCrostiniContainerConfiguration, {kManagementCrostiniContainerConfiguration,
......
...@@ -135,6 +135,7 @@ const char kManagementReportHardwareStatus[] = "managementReportHardwareStatus"; ...@@ -135,6 +135,7 @@ const char kManagementReportHardwareStatus[] = "managementReportHardwareStatus";
const char kManagementReportNetworkInterfaces[] = const char kManagementReportNetworkInterfaces[] =
"managementReportNetworkInterfaces"; "managementReportNetworkInterfaces";
const char kManagementReportUsers[] = "managementReportUsers"; const char kManagementReportUsers[] = "managementReportUsers";
const char kManagementReportCrashReports[] = "managementReportCrashReports";
const char kManagementReportExtensions[] = "managementReportExtensions"; const char kManagementReportExtensions[] = "managementReportExtensions";
const char kManagementReportAndroidApplications[] = const char kManagementReportAndroidApplications[] =
"managementReportAndroidApplications"; "managementReportAndroidApplications";
...@@ -179,6 +180,7 @@ enum class DeviceReportingType { ...@@ -179,6 +180,7 @@ enum class DeviceReportingType {
kDeviceActivity, kDeviceActivity,
kDeviceStatistics, kDeviceStatistics,
kDevice, kDevice,
kCrashReport,
kLogs, kLogs,
kPrint, kPrint,
kCrostini, kCrostini,
...@@ -198,6 +200,8 @@ std::string ToJSDeviceReportingType(const DeviceReportingType& type) { ...@@ -198,6 +200,8 @@ std::string ToJSDeviceReportingType(const DeviceReportingType& type) {
return "device statistics"; return "device statistics";
case DeviceReportingType::kDevice: case DeviceReportingType::kDevice:
return "device"; return "device";
case DeviceReportingType::kCrashReport:
return "crash report";
case DeviceReportingType::kLogs: case DeviceReportingType::kLogs:
return "logs"; return "logs";
case DeviceReportingType::kPrint: case DeviceReportingType::kPrint:
...@@ -261,6 +265,10 @@ void AddDeviceReportingInfo(base::Value* report_sources, Profile* profile) { ...@@ -261,6 +265,10 @@ void AddDeviceReportingInfo(base::Value* report_sources, Profile* profile) {
kManagementReportNetworkInterfaces, kManagementReportNetworkInterfaces,
DeviceReportingType::kDevice); DeviceReportingType::kDevice);
} }
if (collector->ShouldReportCrashReportInfo()) {
AddDeviceReportingElement(report_sources, kManagementReportCrashReports,
DeviceReportingType::kCrashReport);
}
if (manager->GetSystemLogUploader()->upload_enabled()) { if (manager->GetSystemLogUploader()->upload_enabled()) {
AddDeviceReportingElement(report_sources, kManagementLogUploadEnabled, AddDeviceReportingElement(report_sources, kManagementLogUploadEnabled,
DeviceReportingType::kLogs); DeviceReportingType::kLogs);
......
...@@ -32,6 +32,7 @@ extern const char kManagementReportActivityTimes[]; ...@@ -32,6 +32,7 @@ extern const char kManagementReportActivityTimes[];
extern const char kManagementReportHardwareStatus[]; extern const char kManagementReportHardwareStatus[];
extern const char kManagementReportNetworkInterfaces[]; extern const char kManagementReportNetworkInterfaces[];
extern const char kManagementReportUsers[]; extern const char kManagementReportUsers[];
extern const char kManagementReportCrashReports[];
extern const char kManagementPrinting[]; extern const char kManagementPrinting[];
extern const char kManagementCrostini[]; extern const char kManagementCrostini[];
extern const char kManagementCrostiniContainerConfiguration[]; extern const char kManagementCrostiniContainerConfiguration[];
......
...@@ -101,6 +101,9 @@ ...@@ -101,6 +101,9 @@
<message name="IDS_MANAGEMENT_REPORT_DEVICE_NETWORK_INTERFACES" desc="Message stating that administrators see device network interfaces."> <message name="IDS_MANAGEMENT_REPORT_DEVICE_NETWORK_INTERFACES" desc="Message stating that administrators see device network interfaces.">
Network addresses Network addresses
</message> </message>
<message name="IDS_MANAGEMENT_REPORT_DEVICE_CRASH_REPORTS" desc="Message stating that administrators see the numbers and causes of the crashes that occurred on the device recently.">
Numbers and causes of the crashes that occurred recently
</message>
<message name="IDS_MANAGEMENT_REPORT_PRINTING" desc="Message stating that administrators can see names of printed files."> <message name="IDS_MANAGEMENT_REPORT_PRINTING" desc="Message stating that administrators can see names of printed files.">
Names of files that you print Names of files that you print
</message> </message>
......
09089eb5cd67715a48bacd060a9d30afc0b82a40
\ No newline at end of file
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