blob: 113a8ae84b0a0064d8c23c652886ccf5c368f750 (
plain)
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
31
32
33
34
35
36
37
38
39
40
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_
#define CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_
#pragma once
#include "base/basictypes.h"
#include "chrome/browser/content_settings/content_settings_provider.h"
class MockContentSettingsProvider : public ContentSettingsProviderInterface {
public:
// Create a content settings provider that provides a given setting for a
// given type.
MockContentSettingsProvider(ContentSettingsType content_type,
ContentSetting setting,
bool is_managed,
bool can_override);
virtual ~MockContentSettingsProvider();
// ContentSettingsProviderInterface implementation.
virtual bool CanProvideDefaultSetting(ContentSettingsType content_type) const;
virtual ContentSetting ProvideDefaultSetting(
ContentSettingsType content_type) const;
virtual void UpdateDefaultSetting(ContentSettingsType content_type,
ContentSetting setting);
virtual void ResetToDefaults();
virtual bool DefaultSettingIsManaged(ContentSettingsType content_type) const;
private:
ContentSettingsType content_type_;
ContentSetting setting_;
bool is_managed_;
bool can_override_;
DISALLOW_COPY_AND_ASSIGN(MockContentSettingsProvider);
};
#endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_
|