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

Side by Side Diff: components/content_settings/core/common/content_settings_struct_traits.cc

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: rebased Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/content_settings/core/common/content_settings_struct_traits .h" 5 #include "components/content_settings/core/common/content_settings_struct_traits .h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 // static 9 // static
10 bool StructTraits<content_settings::mojom::PatternPartsDataView, 10 bool StructTraits<content_settings::mojom::PatternPartsDataView,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 // static 83 // static
84 bool StructTraits<content_settings::mojom::ContentSettingPatternSourceDataView, 84 bool StructTraits<content_settings::mojom::ContentSettingPatternSourceDataView,
85 ContentSettingPatternSource>:: 85 ContentSettingPatternSource>::
86 Read(content_settings::mojom::ContentSettingPatternSourceDataView data, 86 Read(content_settings::mojom::ContentSettingPatternSourceDataView data,
87 ContentSettingPatternSource* out) { 87 ContentSettingPatternSource* out) {
88 out->incognito = data.incognito(); 88 out->incognito = data.incognito();
89 return data.ReadPrimaryPattern(&out->primary_pattern) && 89 return data.ReadPrimaryPattern(&out->primary_pattern) &&
90 data.ReadSecondaryPattern(&out->secondary_pattern) && 90 data.ReadSecondaryPattern(&out->secondary_pattern) &&
91 data.ReadSetting(&out->setting) && data.ReadSource(&out->source); 91 data.ReadSettingValue(&out->setting_value) &&
92 data.ReadSource(&out->source);
92 } 93 }
93 94
94 // static 95 // static
95 bool StructTraits<content_settings::mojom::RendererContentSettingRulesDataView, 96 bool StructTraits<content_settings::mojom::RendererContentSettingRulesDataView,
96 RendererContentSettingRules>:: 97 RendererContentSettingRules>::
97 Read(content_settings::mojom::RendererContentSettingRulesDataView data, 98 Read(content_settings::mojom::RendererContentSettingRulesDataView data,
98 RendererContentSettingRules* out) { 99 RendererContentSettingRules* out) {
99 return data.ReadImageRules(&out->image_rules) && 100 return data.ReadImageRules(&out->image_rules) &&
100 data.ReadScriptRules(&out->script_rules) && 101 data.ReadScriptRules(&out->script_rules) &&
101 data.ReadAutoplayRules(&out->autoplay_rules); 102 data.ReadAutoplayRules(&out->autoplay_rules);
102 } 103 }
103 104
104 } // namespace mojo 105 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698