Chromium Code Reviews| Index: chrome/browser/extensions/extension_service.cc |
| diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
| index 160ac640010bef870a8b0c1736f89074a8a20545..b05efe328ab65fcb5efa38fdd2635ea4bbed2199 100644 |
| --- a/chrome/browser/extensions/extension_service.cc |
| +++ b/chrome/browser/extensions/extension_service.cc |
| @@ -1002,7 +1002,6 @@ void ExtensionService::GrantPermissionsAndEnableExtension( |
| const Extension* extension) { |
| GrantPermissions(extension); |
| RecordPermissionMessagesHistogram(extension, "ReEnable"); |
| - extension_prefs_->SetDidExtensionEscalatePermissions(extension, false); |
| EnableExtension(extension->id()); |
| } |
| @@ -1685,14 +1684,12 @@ void ExtensionService::CheckPermissionsIncrease(const Extension* extension, |
| // reason, but instead always set the "did escalate permissions" flag, to |
| // ensure enabling it will always show a warning. |
| if (disable_reasons == Extension::DISABLE_REMOTE_INSTALL) { |
|
not at google - send to devlin
2015/06/03 15:24:58
You should be able to remove this check/branch ent
Marc Treib
2015/06/09 12:21:50
I've removed the empty branch (durr), but kept the
not at google - send to devlin
2015/06/09 20:15:39
Yeah tough call. It both is, and isn't, a permissi
Marc Treib
2015/06/10 08:34:16
I'm not sure, so I've opted to keep the current be
|
| - extension_prefs_->SetDidExtensionEscalatePermissions(extension, true); |
| } else if (is_privilege_increase) { |
| disable_reasons |= Extension::DISABLE_PERMISSIONS_INCREASE; |
| if (!extension_prefs_->DidExtensionEscalatePermissions(extension->id())) { |
| RecordPermissionMessagesHistogram(extension, "AutoDisable"); |
| } |
| extension_prefs_->SetExtensionState(extension->id(), Extension::DISABLED); |
| - extension_prefs_->SetDidExtensionEscalatePermissions(extension, true); |
| #if defined(ENABLE_SUPERVISED_USERS) |
| // If a custodian-installed extension is disabled for a supervised user due |
| @@ -1799,7 +1796,7 @@ void ExtensionService::OnExtensionInstalled( |
| // Installation of a blacklisted extension can happen from sync, policy, |
| // etc, where to maintain consistency we need to install it, just never |
| // load it (see AddExtension). Usually it should be the job of callers to |
| - // incercept blacklisted extension earlier (e.g. CrxInstaller, before even |
| + // intercept blacklisted extensions earlier (e.g. CrxInstaller, before even |
| // showing the install dialogue). |
| extension_prefs_->AcknowledgeBlacklistedExtension(id); |
| UMA_HISTOGRAM_ENUMERATION("ExtensionBlacklist.SilentInstall", |
| @@ -1827,8 +1824,7 @@ void ExtensionService::OnExtensionInstalled( |
| } |
| if (disable_reasons) |
| - extension_prefs_->AddDisableReason(id, |
| - static_cast<Extension::DisableReason>(disable_reasons)); |
| + extension_prefs_->AddDisableReasons(id, disable_reasons); |
| const Extension::State initial_state = |
| disable_reasons == Extension::DISABLE_NONE ? Extension::ENABLED |