| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "chrome/browser/content_settings/content_settings_provider.h" | 10 #include "chrome/browser/content_settings/content_settings_provider.h" |
| 11 | 11 |
| 12 class MockContentSettingsProvider : public ContentSettingsProviderInterface { | 12 class MockContentSettingsProvider : public ContentSettingsProviderInterface { |
| 13 public: | 13 public: |
| 14 // Create a content settings provider that provides a given setting for a | 14 // Create a content settings provider that provides a given setting for a |
| 15 // given type. | 15 // given type. |
| 16 MockContentSettingsProvider(ContentSettingsType content_type, | 16 MockContentSettingsProvider(ContentSettingsType content_type, |
| 17 ContentSetting setting, | 17 ContentSetting setting, |
| 18 bool is_managed, | 18 bool is_managed, |
| 19 bool can_override); | 19 bool can_override); |
| 20 virtual ~MockContentSettingsProvider(); | 20 virtual ~MockContentSettingsProvider(); |
| 21 | 21 |
| 22 // ContentSettingsProviderInterface implementation. | 22 // ContentSettingsProviderInterface implementation. |
| 23 virtual bool CanProvideDefaultSetting(ContentSettingsType content_type); | 23 virtual bool CanProvideDefaultSetting(ContentSettingsType content_type) const; |
| 24 virtual ContentSetting ProvideDefaultSetting( | 24 virtual ContentSetting ProvideDefaultSetting( |
| 25 ContentSettingsType content_type); | 25 ContentSettingsType content_type) const; |
| 26 virtual void UpdateDefaultSetting(ContentSettingsType content_type, | 26 virtual void UpdateDefaultSetting(ContentSettingsType content_type, |
| 27 ContentSetting setting); | 27 ContentSetting setting); |
| 28 virtual bool DefaultSettingIsManaged(ContentSettingsType content_type); | 28 virtual void ResetToDefaults(); |
| 29 virtual bool DefaultSettingIsManaged(ContentSettingsType content_type) const; |
| 29 | 30 |
| 30 private: | 31 private: |
| 31 ContentSettingsType content_type_; | 32 ContentSettingsType content_type_; |
| 32 ContentSetting setting_; | 33 ContentSetting setting_; |
| 33 bool is_managed_; | 34 bool is_managed_; |
| 34 bool can_override_; | 35 bool can_override_; |
| 35 | 36 |
| 36 DISALLOW_COPY_AND_ASSIGN(MockContentSettingsProvider); | 37 DISALLOW_COPY_AND_ASSIGN(MockContentSettingsProvider); |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ | 40 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ |
| OLD | NEW |