Commit 450a8893 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Extensions: Remove workaround in SettingsOverrideAPIPermission::FromValue

The workaround was added due to a bug in Chrome versions before M46,
where we didn't persist the permission value in prefs (crbug.com/533086
and crbug.com/619759). By now, all users should long have updated prefs,
so time to get rid of the workaround.

Bug: none
Change-Id: I3c2581b96ece5b2a64db14f8d8df7ff93ff5cfc2
Reviewed-on: https://chromium-review.googlesource.com/1124688Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572225}
parent c66b1fc4
...@@ -50,14 +50,7 @@ bool SettingsOverrideAPIPermission::FromValue( ...@@ -50,14 +50,7 @@ bool SettingsOverrideAPIPermission::FromValue(
const base::Value* value, const base::Value* value,
std::string* /*error*/, std::string* /*error*/,
std::vector<std::string>* unhandled_permissions) { std::vector<std::string>* unhandled_permissions) {
// Ugly hack: |value| being null should be an error. But before M46 beta, we return value && value->GetAsString(&setting_value_);
// didn't store the parameter for settings override permissions in prefs.
// See crbug.com/533086 and crbug.com/619759.
// TODO(treib,devlin): Remove this for M56, when hopefully all users will have
// updated prefs.
// This should read:
// return value && value->GetAsString(&setting_value_);
return !value || value->GetAsString(&setting_value_);
} }
std::unique_ptr<base::Value> SettingsOverrideAPIPermission::ToValue() const { std::unique_ptr<base::Value> SettingsOverrideAPIPermission::ToValue() const {
......
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