Commit 0e86f58a authored by vasilii@chromium.org's avatar vasilii@chromium.org

Fixed null pointer crash in ExtensionSettingsHandler.

BUG=349838

Review URL: https://codereview.chromium.org/190723002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255923 0039d316-1c4b-4281-b951-d872f2087c98
parent 83c63580
......@@ -843,10 +843,12 @@ void ExtensionSettingsHandler::HandleEnableMessage(
const Extension* extension =
extension_service_->GetInstalledExtension(extension_id);
if (!extension ||
!management_policy_->UserMayModifySettings(extension, NULL)) {
LOG(ERROR) << "Attempt to enable an extension that is non-usermanagable was"
<< "made. Extension id: " << extension->id();
if (!extension)
return;
if (!management_policy_->UserMayModifySettings(extension, NULL)) {
LOG(ERROR) << "An attempt was made to enable an extension that is "
<< "non-usermanagable. Extension id: " << extension->id();
return;
}
......@@ -917,8 +919,8 @@ void ExtensionSettingsHandler::HandleAllowFileAccessMessage(
return;
if (!management_policy_->UserMayModifySettings(extension, NULL)) {
LOG(ERROR) << "Attempt to change allow file access of an extension that is "
<< "non-usermanagable was made. Extension id : "
LOG(ERROR) << "An attempt was made to change allow file access of an"
<< " extension that is non-usermanagable. Extension id : "
<< extension->id();
return;
}
......@@ -938,8 +940,8 @@ void ExtensionSettingsHandler::HandleUninstallMessage(
return;
if (!management_policy_->UserMayModifySettings(extension, NULL)) {
LOG(ERROR) << "Attempt to uninstall an extension that is non-usermanagable "
<< "was made. Extension id : " << extension->id();
LOG(ERROR) << "An attempt was made to uninstall an extension that is "
<< "non-usermanagable. Extension id : " << extension->id();
return;
}
......
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