1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/content_settings/core/common/content_settings.h"
6
IntToContentSetting(int content_setting)7 ContentSetting IntToContentSetting(int content_setting) {
8 return ((content_setting < 0) ||
9 (content_setting >= CONTENT_SETTING_NUM_SETTINGS)) ?
10 CONTENT_SETTING_DEFAULT : static_cast<ContentSetting>(content_setting);
11 }
12
ContentSettingPatternSource(const ContentSettingsPattern & primary_pattern,const ContentSettingsPattern & secondary_pattern,ContentSetting setting,const std::string & source,bool incognito)13 ContentSettingPatternSource::ContentSettingPatternSource(
14 const ContentSettingsPattern& primary_pattern,
15 const ContentSettingsPattern& secondary_pattern,
16 ContentSetting setting,
17 const std::string& source,
18 bool incognito)
19 : primary_pattern(primary_pattern),
20 secondary_pattern(secondary_pattern),
21 setting(setting),
22 source(source),
23 incognito(incognito) {}
24
ContentSettingPatternSource()25 ContentSettingPatternSource::ContentSettingPatternSource()
26 : setting(CONTENT_SETTING_DEFAULT), incognito(false) {
27 }
28
RendererContentSettingRules()29 RendererContentSettingRules::RendererContentSettingRules() {}
30
~RendererContentSettingRules()31 RendererContentSettingRules::~RendererContentSettingRules() {}
32