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

Unified Diff: components/content_settings/core/common/content_settings_struct_traits.h

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: rebased 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: components/content_settings/core/common/content_settings_struct_traits.h
diff --git a/components/content_settings/core/common/content_settings_struct_traits.h b/components/content_settings/core/common/content_settings_struct_traits.h
index 10c78efeafd5152271019e57a6742e9adc1332be..ab3fee43862fc8889cdfb5b16a970cf94b2e5917 100644
--- a/components/content_settings/core/common/content_settings_struct_traits.h
+++ b/components/content_settings/core/common/content_settings_struct_traits.h
@@ -7,8 +7,11 @@
#include <string>
+#include "base/memory/ptr_util.h"
+#include "base/values.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings.mojom.h"
+#include "mojo/common/values_struct_traits.h"
#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
@@ -96,8 +99,9 @@ struct StructTraits<
return r.secondary_pattern;
}
- static ContentSetting setting(const ContentSettingPatternSource& r) {
- return r.setting;
+ static const std::unique_ptr<base::Value>& setting_value(
+ const ContentSettingPatternSource& r) {
+ return r.setting_value;
}
static const std::string& source(const ContentSettingPatternSource& r) {

Powered by Google App Engine
This is Rietveld 408576698