Commit b2ddeba7 authored by Xinghui Lu's avatar Xinghui Lu Committed by Commit Bot

Add real time URL check disclosure to chrome://management.

Screenshot: http://screen/WwTrA49aG1F
Strings reviewed in the doc linked in https://crbug.com/1085264#c4.


Bug: 1085264
Change-Id: Id149ee2bc09709dabd9948fcf8f1e77fdb8464c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2290565Reviewed-by: default avatarRoger Tawa <rogerta@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787904}
parent 3585f727
......@@ -114,6 +114,9 @@ content::WebUIDataSource* CreateManagementUIHtmlSource(Profile* profile) {
{kManagementOnBulkDataEntryEvent, IDS_MANAGEMENT_TEXT_ENTERED_EVENT},
{kManagementOnBulkDataEntryVisibleData,
IDS_MANAGEMENT_TEXT_ENTERED_VISIBLE_DATA},
{kManagementOnPageVisitedEvent, IDS_MANAGEMENT_PAGE_VISITED_EVENT},
{kManagementOnPageVisitedVisibleData,
IDS_MANAGEMENT_PAGE_VISITED_VISIBLE_DATA},
};
AddLocalizedStringsBulk(source, kLocalizedStrings);
......
......@@ -133,6 +133,10 @@ const char kManagementOnBulkDataEntryEvent[] = "managementOnBulkDataEntryEvent";
const char kManagementOnBulkDataEntryVisibleData[] =
"managementOnBulkDataEntryVisibleData";
const char kManagementOnPageVisitedEvent[] = "managementOnPageVisitedEvent";
const char kManagementOnPageVisitedVisibleData[] =
"managementOnPageVisitedVisibleData";
const char kReportingTypeDevice[] = "device";
const char kReportingTypeExtensions[] = "extensions";
const char kReportingTypeSecurity[] = "security";
......@@ -781,6 +785,17 @@ base::Value ManagementUIHandler::GetThreatProtectionInfo(
info.Append(std::move(value));
}
auto* on_page_visited_event =
chrome_policies.GetValue(policy::key::kEnterpriseRealTimeUrlCheckMode);
if (on_page_visited_event && on_page_visited_event->is_int() &&
on_page_visited_event->GetInt() !=
safe_browsing::REAL_TIME_CHECK_DISABLED) {
base::Value value(base::Value::Type::DICTIONARY);
value.SetStringKey("title", kManagementOnPageVisitedEvent);
value.SetStringKey("permission", kManagementOnPageVisitedVisibleData);
info.Append(std::move(value));
}
#if defined(OS_CHROMEOS)
std::string management_domain = GetDeviceDomain();
if (management_domain.empty())
......
......@@ -68,6 +68,8 @@ extern const char kManagementOnFileDownloadedEvent[];
extern const char kManagementOnFileDownloadedVisibleData[];
extern const char kManagementOnBulkDataEntryEvent[];
extern const char kManagementOnBulkDataEntryVisibleData[];
extern const char kManagementOnPageVisitedEvent[];
extern const char kManagementOnPageVisitedVisibleData[];
extern const char kPolicyKeyReportMachineIdData[];
extern const char kPolicyKeyReportUserIdData[];
......
......@@ -1153,10 +1153,12 @@ TEST_F(ManagementUIHandlerTests, ThreatReportingInfo) {
SetConnectorPolicyValue(policy::key::kOnSecurityEventEnterpriseConnector,
"[{\"service_provider\":\"google\"}]",
chrome_policies);
SetConnectorPolicyValue(policy::key::kEnterpriseRealTimeUrlCheckMode, "1",
chrome_policies);
info = handler_.GetThreatProtectionInfo(profile_no_domain.get());
info.GetAsDictionary(&threat_protection_info);
EXPECT_EQ(4u, threat_protection_info->FindListKey("info")->GetList().size());
EXPECT_EQ(5u, threat_protection_info->FindListKey("info")->GetList().size());
EXPECT_EQ(
l10n_util::GetStringUTF16(IDS_MANAGEMENT_THREAT_PROTECTION_DESCRIPTION),
base::UTF8ToUTF16(*threat_protection_info->FindStringKey("description")));
......@@ -1186,6 +1188,12 @@ TEST_F(ManagementUIHandlerTests, ThreatReportingInfo) {
value.SetStringKey("permission", kManagementEnterpriseReportingVisibleData);
expected_info.Append(std::move(value));
}
{
base::Value value(base::Value::Type::DICTIONARY);
value.SetStringKey("title", kManagementOnPageVisitedEvent);
value.SetStringKey("permission", kManagementOnPageVisitedVisibleData);
expected_info.Append(std::move(value));
}
EXPECT_EQ(expected_info, *threat_protection_info->FindListKey("info"));
}
......@@ -215,6 +215,9 @@
<message name="IDS_MANAGEMENT_ENTERPRISE_REPORTING_EVENT" desc="Event for the enterprise reporting feature">
Unsafe event occurs
</message>
<message name="IDS_MANAGEMENT_PAGE_VISITED_EVENT" desc="Event for the real time URL check feature.">
Page is visited
</message>
<message name="IDS_MANAGEMENT_FILE_ATTACHED_VISIBLE_DATA" desc="Description of the visible data for the file attachment scanning feature.">
Files you upload or attach are sent to Google Cloud or third parties for analysis. For example, they might be scanned for sensitive data or malware.
</message>
......@@ -227,4 +230,7 @@
<message name="IDS_MANAGEMENT_ENTERPRISE_REPORTING_VISIBLE_DATA" desc="Description of the visible data for the Connectors reporting feature">
When security events are flagged by Chrome Enterprise Connectors, relevant data about the event is sent to your administrator. This can include URLs of pages you visit in Chrome, file names or metadata, and the username that you use to sign in to your device and Chrome.
</message>
<message name="IDS_MANAGEMENT_PAGE_VISITED_VISIBLE_DATA" desc="Description of the visible data for the real time URL check feature.">
URLs of pages you visit are sent to Google Cloud or third parties for analysis. For example, they might be scanned to detect unsafe websites.
</message>
</grit-part>
fdc3da98ce35f6204362a1bb0ff0e11b5134d2b5
\ No newline at end of file
fdc3da98ce35f6204362a1bb0ff0e11b5134d2b5
\ 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