#ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_MOCK_PROVIDER_H_
#define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_MOCK_PROVIDER_H_
#include <vector>
#include "base/basictypes.h"
#include "chrome/browser/content_settings/content_settings_observable_provider.h"
#include "chrome/browser/content_settings/content_settings_origin_identifier_value_map.h"
#include "chrome/common/content_settings_pattern.h"
#include "chrome/common/content_settings_types.h"
namespace content_settings {
class MockProvider : public ObservableProvider {
public:
MockProvider();
explicit MockProvider(bool read_only);
virtual ~MockProvider();
virtual RuleIterator* GetRuleIterator(
ContentSettingsType content_type,
const ResourceIdentifier& resource_identifier,
bool incognito) const OVERRIDE;
virtual bool SetWebsiteSetting(
const ContentSettingsPattern& requesting_url_pattern,
const ContentSettingsPattern& embedding_url_pattern,
ContentSettingsType content_type,
const ResourceIdentifier& resource_identifier,
base::Value* value) OVERRIDE;
virtual void ClearAllContentSettingsRules(
ContentSettingsType content_type) OVERRIDE {}
virtual void ShutdownOnUIThread() OVERRIDE;
void set_read_only(bool read_only) {
read_only_ = read_only;
}
bool read_only() const {
return read_only_;
}
private:
OriginIdentifierValueMap value_map_;
bool read_only_;
DISALLOW_COPY_AND_ASSIGN(MockProvider);
};
}
#endif