Commit 1f9b5a44 authored by Ramin Halavati's avatar Ramin Halavati Committed by Chromium LUCI CQ

Update WebStore API to disable extensions for ephemeral Guest profiles.

Extensions will be disabled in the first experiments of ephemeral Guest
profiles. WebStore private APIs are updated to treat ephemeral Guest
profiles similar to the off the record ones.

Please see go/ephemeral-guest-profiles for more context.

Bug: 1125474
Change-Id: If4b4711d133f8e429b2ced09fdf6747cb0c31491
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2580805Reviewed-by: default avatarDavid Bertoni <dbertoni@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836030}
parent 7ee1de79
...@@ -784,7 +784,10 @@ WebstorePrivateCompleteInstallFunction::Run() { ...@@ -784,7 +784,10 @@ WebstorePrivateCompleteInstallFunction::Run() {
std::unique_ptr<CompleteInstall::Params> params( std::unique_ptr<CompleteInstall::Params> params(
CompleteInstall::Params::Create(*args_)); CompleteInstall::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params); EXTENSION_FUNCTION_VALIDATE(params);
// TODO(https://crbug.com/1125475): Enable Extensions for Ephemeral Guest
// profiles.
if (chrome_details_.GetProfile()->IsGuestSession() || if (chrome_details_.GetProfile()->IsGuestSession() ||
chrome_details_.GetProfile()->IsEphemeralGuestProfile() ||
chrome_details_.GetProfile()->IsOffTheRecord()) { chrome_details_.GetProfile()->IsOffTheRecord()) {
return RespondNow(Error(kIncognitoError)); return RespondNow(Error(kIncognitoError));
} }
...@@ -953,8 +956,11 @@ WebstorePrivateIsInIncognitoModeFunction:: ...@@ -953,8 +956,11 @@ WebstorePrivateIsInIncognitoModeFunction::
ExtensionFunction::ResponseAction ExtensionFunction::ResponseAction
WebstorePrivateIsInIncognitoModeFunction::Run() { WebstorePrivateIsInIncognitoModeFunction::Run() {
Profile* profile = chrome_details_.GetProfile(); Profile* profile = chrome_details_.GetProfile();
// TODO(https://crbug.com/1125475): Enable Extensions for Ephemeral Guest
// profiles.
return RespondNow(ArgumentList(IsInIncognitoMode::Results::Create( return RespondNow(ArgumentList(IsInIncognitoMode::Results::Create(
profile != profile->GetOriginalProfile()))); profile != profile->GetOriginalProfile() ||
profile->IsEphemeralGuestProfile())));
} }
WebstorePrivateLaunchEphemeralAppFunction:: WebstorePrivateLaunchEphemeralAppFunction::
......
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