-
Notifications
You must be signed in to change notification settings - Fork 813
/
content_settings_mojom_traits.cc
30 lines (23 loc) · 1.34 KB
/
content_settings_mojom_traits.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "components/content_settings/core/common/content_settings_mojom_traits.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings.mojom.h"
#define RendererContentSettingRules RendererContentSettingRules_ChromiumImpl
#include "../../../../../../components/content_settings/core/common/content_settings_mojom_traits.cc"
#undef RendererContentSettingRules
namespace mojo {
bool StructTraits<content_settings::mojom::RendererContentSettingRulesDataView,
RendererContentSettingRules>::
Read(content_settings::mojom::RendererContentSettingRulesDataView data,
RendererContentSettingRules* out) {
return StructTraits<
content_settings::mojom::RendererContentSettingRulesDataView,
RendererContentSettingRules_ChromiumImpl>::Read(data, out) &&
data.ReadAutoplayRules(&out->autoplay_rules) &&
data.ReadFingerprintingRules(&out->fingerprinting_rules) &&
data.ReadBraveShieldsRules(&out->brave_shields_rules);
}
} // namespace mojo