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

Unified Diff: chrome/common/extensions/permissions/chrome_permission_message_provider.cc

Issue 1774103002: Cleanup: remove evil hack to suppress permission warnings for searchProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | chrome/common/extensions/permissions/chrome_permission_message_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/permissions/chrome_permission_message_provider.cc
diff --git a/chrome/common/extensions/permissions/chrome_permission_message_provider.cc b/chrome/common/extensions/permissions/chrome_permission_message_provider.cc
index cc2aae7b4466fcbfe93475efb5ccf0fe7eecb243..49db41868c49f98acb4f9484eb1657e2af76b873 100644
--- a/chrome/common/extensions/permissions/chrome_permission_message_provider.cc
+++ b/chrome/common/extensions/permissions/chrome_permission_message_provider.cc
@@ -44,15 +44,6 @@ class ComparablePermission {
};
using ComparablePermissions = std::vector<ComparablePermission>;
-void DropPermissionParameter(APIPermission::ID id,
- PermissionIDSet* permissions) {
- if (permissions->ContainsID(id)) {
- // Erase the permission, and insert it again without a parameter.
- permissions->erase(id);
- permissions->insert(id);
- }
-}
-
} // namespace
typedef std::set<PermissionMessage> PermissionMsgSet;
@@ -185,20 +176,6 @@ bool ChromePermissionMessageProvider::IsAPIOrManifestPrivilegeIncrease(
AddAPIPermissions(new_permissions, &new_ids);
AddManifestPermissions(new_permissions, &new_ids);
- // Ugly hack: Before M46 beta, we didn't store the parameter for settings
- // override permissions in prefs (which is where |old_permissions| is coming
- // from). To avoid a spurious permission increase warning, drop the parameter.
- // See crbug.com/533086.
- // TODO(treib,devlin): Remove this for M48, when hopefully all users will have
- // updated prefs.
- const APIPermission::ID kSettingsOverrideIDs[] = {
- APIPermission::kHomepage, APIPermission::kSearchProvider,
- APIPermission::kStartupPages};
- for (auto id : kSettingsOverrideIDs) {
- DropPermissionParameter(id, &old_ids);
- DropPermissionParameter(id, &new_ids);
- }
-
// If all the IDs were already there, it's not a privilege increase.
if (old_ids.Includes(new_ids))
return false;
« no previous file with comments | « no previous file | chrome/common/extensions/permissions/chrome_permission_message_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698