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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "chrome/browser/content_settings/content_settings_provider.h" |
| 11 |
| 12 class MockContentSettingsProvider : public ContentSettingsProviderInterface { |
| 13 public: |
| 14 // Create a content settings provider that provides a given setting for a |
| 15 // given type. |
| 16 MockContentSettingsProvider(ContentSettingsType content_type, |
| 17 ContentSetting setting, |
| 18 bool is_managed, |
| 19 bool can_override); |
| 20 virtual ~MockContentSettingsProvider(); |
| 21 |
| 22 // ContentSettingsProviderInterface implementation. |
| 23 virtual bool CanProvideDefaultSetting(ContentSettingsType content_type); |
| 24 virtual ContentSetting ProvideDefaultSetting( |
| 25 ContentSettingsType content_type); |
| 26 virtual void UpdateDefaultSetting(ContentSettingsType content_type, |
| 27 ContentSetting setting); |
| 28 virtual bool DefaultSettingIsManaged(ContentSettingsType content_type); |
| 29 |
| 30 private: |
| 31 ContentSettingsType content_type_; |
| 32 ContentSetting setting_; |
| 33 bool is_managed_; |
| 34 bool can_override_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(MockContentSettingsProvider); |
| 37 }; |
| 38 |
| 39 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ |
OLD | NEW |