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

Unified Diff: chrome/browser/android/preferences/website_preference_bridge.cc

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: chrome/browser/android/preferences/website_preference_bridge.cc
diff --git a/chrome/browser/android/preferences/website_preference_bridge.cc b/chrome/browser/android/preferences/website_preference_bridge.cc
index d36fb8c89b1205cfffe4d46870208439a0b521d1..2c1041f26d4e0b321ebc66410d88ed2aa231954f 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -41,6 +41,7 @@
#include "chrome/browser/usb/usb_chooser_context_factory.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
+#include "components/content_settings/core/common/content_settings_utils.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
#include "jni/WebsitePreferenceBridge_jni.h"
@@ -139,8 +140,10 @@ void GetOrigins(JNIEnv* env,
// Now add all origins that have a non-default setting to the list.
for (const auto& settings_it : all_settings) {
- if (settings_it.setting == default_content_setting)
+ if (content_settings::ValueToContentSetting(
+ settings_it.setting_value.get()) == default_content_setting) {
continue;
+ }
if (managedOnly &&
HostContentSettingsMap::GetProviderTypeFromSource(settings_it.source) !=
HostContentSettingsMap::ProviderType::POLICY_PROVIDER) {

Powered by Google App Engine
This is Rietveld 408576698