OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2010 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 "chrome/browser/content_settings/mock_content_settings_provider.h" | |
6 | |
7 MockContentSettingsProvider::MockContentSettingsProvider( | |
8 ContentSettingsType content_type, | |
9 ContentSetting setting, | |
10 bool is_managed, | |
11 bool can_override) : | |
gfeher
2010/11/30 12:29:12
Shouldn't the colon be in the next row?
jochen (gone - plz use gerrit)
2010/11/30 12:36:28
Done.
| |
12 content_type_(content_type), | |
13 setting_(setting), | |
14 is_managed_(is_managed), | |
15 can_override_(can_override) { | |
16 } | |
17 | |
18 MockContentSettingsProvider::~MockContentSettingsProvider() { | |
19 } | |
20 | |
21 bool MockContentSettingsProvider::canProvideDefaultSetting( | |
22 ContentSettingsType content_type) { | |
23 return content_type == content_type_; | |
24 } | |
25 | |
26 ContentSetting MockContentSettingsProvider::provideDefaultSetting( | |
27 ContentSettingsType content_type) { | |
28 return content_type == content_type_ ? setting_ : CONTENT_SETTING_DEFAULT; | |
29 } | |
30 | |
31 void MockContentSettingsProvider::updateDefaultSetting( | |
32 ContentSettingsType content_type, | |
33 ContentSetting setting) { | |
34 if (can_override_ && content_type == content_type_) | |
35 setting_ = setting; | |
36 } | |
37 | |
38 bool MockContentSettingsProvider::defaultSettingIsManaged( | |
39 ContentSettingsType content_type) { | |
40 return content_type == content_type_ && is_managed_; | |
41 } | |
OLD | NEW |