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.
5 #include "chrome/browser/content_settings/content_settings_mock_provider.h"
7 namespace content_settings
{
9 MockProvider::MockProvider()
10 : read_only_(false) {}
12 MockProvider::MockProvider(bool read_only
)
13 : read_only_(read_only
) {
16 MockProvider::~MockProvider() {}
18 RuleIterator
* MockProvider::GetRuleIterator(
19 ContentSettingsType content_type
,
20 const ResourceIdentifier
& resource_identifier
,
21 bool incognito
) const {
22 return value_map_
.GetRuleIterator(content_type
, resource_identifier
, NULL
);
25 bool MockProvider::SetWebsiteSetting(
26 const ContentSettingsPattern
& requesting_url_pattern
,
27 const ContentSettingsPattern
& embedding_url_pattern
,
28 ContentSettingsType content_type
,
29 const ResourceIdentifier
& resource_identifier
,
34 value_map_
.SetValue(requesting_url_pattern
,
35 embedding_url_pattern
,
42 void MockProvider::ShutdownOnUIThread() {
46 } // namespace content_settings