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

Unified Diff: ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: ps Created 3 years, 6 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: ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm b/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm
index 2494b4f925477fb7aea5be424b573273f0121d2c..039a9632c35b2145bbd257c39cd390dca6817377 100644
--- a/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm
@@ -10,6 +10,7 @@
#include "base/values.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
+#include "components/content_settings/core/common/content_settings_utils.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#include "ios/chrome/browser/content_settings/host_content_settings_map_factory.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_switch_item.h"
@@ -278,7 +279,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
// able to modify content settings with a secondary pattern other than the
// wildcard pattern. So only show settings that the user is able to modify.
if (entries[i].secondary_pattern == ContentSettingsPattern::Wildcard() &&
- entries[i].setting == CONTENT_SETTING_ALLOW) {
+ content_settings::ValueToContentSetting(
+ entries[i].setting_value.get()) == CONTENT_SETTING_ALLOW) {
_exceptions.AppendString(entries[i].primary_pattern.ToString());
} else {
LOG(ERROR) << "Secondary content settings patterns are not "

Powered by Google App Engine
This is Rietveld 408576698