Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3992)

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 1200833004: Apps&Extensions for Supervised Users: send permission request on outdated re-enables (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index c7fb6c018823c4c5ceef1ad0b6debe1a1f592c39..0fa7c9e76b1e729cedd759261c011eee8b57bd14 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -127,13 +127,6 @@ namespace {
// Wait this many seconds after an extensions becomes idle before updating it.
const int kUpdateIdleDelay = 5;
-#if defined(ENABLE_SUPERVISED_USERS)
-// Callback for SupervisedUserService::AddExtensionUpdateRequest.
-void ExtensionUpdateRequestSent(const std::string& id, bool success) {
- LOG_IF(WARNING, !success) << "Failed sending update request for " << id;
-}
-#endif
-
} // namespace
// ExtensionService.
@@ -1649,12 +1642,13 @@ void ExtensionService::CheckPermissionsIncrease(const Extension* extension,
// to a permissions increase, send a request to the custodian if the
// supervised user themselves can't re-enable the extension.
if (extensions::util::IsExtensionSupervised(extension, profile_) &&
- extensions::util::NeedCustodianApprovalForPermissionIncrease()) {
+ extensions::util::NeedCustodianApprovalForPermissionIncrease() &&
+ !ExtensionSyncService::Get(profile_)->HasPendingReenable(
+ extension->id(), *extension->version())) {
SupervisedUserService* supervised_user_service =
SupervisedUserServiceFactory::GetForProfile(profile_);
- supervised_user_service->AddExtensionUpdateRequest(
- extension->id(), *extension->version(),
- base::Bind(ExtensionUpdateRequestSent, extension->id()));
+ supervised_user_service->AddExtensionUpdateRequest(extension->id(),
+ *extension->version());
}
#endif
}

Powered by Google App Engine
This is Rietveld 408576698