Commit 9e29f51e authored by Garrett Beaty's avatar Garrett Beaty Committed by Chromium LUCI CQ

Revert "Add testing config for per-profile Connectors"

This reverts commit 82cf2844.

Reason for revert: Possible culrpit for increase in browser_tests runtime on linux-lacros-rel

Original change's description:
> Add testing config for per-profile Connectors
>
> A small change in ConnectorsService is required to make this test config
> work. When checking analysis/reporting settings, 2 things are required
> to obtain settings: a policy set to a valid value and a DM token (from
> the browser or the profile). The previous implementation checked the DM
> token first, meaning the blocking BrowserDMTokenStorage::RetrieveDMToken
> call would trigger on multiple tests and crash them (see patchset 1
> failures for examples of this).
>
> The solution is to simply switch the
> order of checks and read the policy first. This is also a valid
> optimization of Connectors logic, as reading prefs is faster than
> potentially reading the DM token from local storage.
>
> Change-Id: Ie1026b57cf7a4fd66663530ec2a77a72f21d6d81
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2623812
> Commit-Queue: Dominique Fauteux-Chapleau <domfc@chromium.org>
> Reviewed-by: Marc-André Decoste <mad@chromium.org>
> Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#843115}

TBR=mad@chromium.org,rkaplow@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com,domfc@chromium.org

Change-Id: I0e4c041b0dcc4372117ae5221335e101a3a8003d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628041Reviewed-by: default avatarGarrett Beaty <gbeaty@chromium.org>
Commit-Queue: Dominique Fauteux-Chapleau <domfc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843186}
parent 0287e5be
......@@ -128,18 +128,17 @@ base::Optional<ReportingSettings> ConnectorsService::GetReportingSettings(
if (!ConnectorsEnabled())
return base::nullopt;
base::Optional<ReportingSettings> settings =
connectors_manager_->GetReportingSettings(connector);
if (!settings.has_value())
return base::nullopt;
base::Optional<DmToken> dm_token = GetDmToken(ConnectorScopePref(connector));
if (!dm_token.has_value())
return base::nullopt;
settings.value().dm_token = dm_token.value().value;
settings.value().per_profile =
dm_token.value().scope == policy::POLICY_SCOPE_USER;
base::Optional<ReportingSettings> settings =
connectors_manager_->GetReportingSettings(connector);
if (settings.has_value()) {
settings.value().dm_token = dm_token.value().value;
settings.value().per_profile =
dm_token.value().scope == policy::POLICY_SCOPE_USER;
}
return settings;
}
......@@ -150,16 +149,15 @@ base::Optional<AnalysisSettings> ConnectorsService::GetAnalysisSettings(
if (!ConnectorsEnabled())
return base::nullopt;
base::Optional<AnalysisSettings> settings =
connectors_manager_->GetAnalysisSettings(url, connector);
if (!settings.has_value())
return base::nullopt;
base::Optional<DmToken> dm_token = GetDmToken(ConnectorScopePref(connector));
if (!dm_token.has_value())
return base::nullopt;
settings.value().dm_token = dm_token.value().value;
base::Optional<AnalysisSettings> settings =
connectors_manager_->GetAnalysisSettings(url, connector);
if (settings.has_value()) {
settings.value().dm_token = dm_token.value().value;
}
return settings;
}
......
......@@ -8250,7 +8250,7 @@
]
}
],
"WebProtectPerProfile": [
"WebProtectConnectors": [
{
"platforms": [
"chromeos",
......@@ -8262,7 +8262,7 @@
{
"name": "Enabled",
"enable_features": [
"PerProfileConnectorsEnabled"
"EnterpriseConnectorsEnabled"
]
}
]
......
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