Chromium Code Reviews| 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/default_content_settings_provider.h" |
|
jochen (gone - plz use gerrit)
2011/01/25 13:18:47
i would not rename the header but put both interfa
markusheintz_
2011/01/25 13:57:43
Done.
| |
| 11 | 11 |
| 12 class MockContentSettingsProvider : public ContentSettingsProviderInterface { | 12 class MockContentSettingsProvider : |
|
Bernhard Bauer
2011/01/25 13:11:19
Lint nits still apply (see http://codereview.chrom
markusheintz_
2011/01/25 13:57:43
Done.
| |
| 13 public DefaultContentSettingsProviderInterface { | |
| 13 public: | 14 public: |
| 14 // Create a content settings provider that provides a given setting for a | 15 // Create a content settings provider that provides a given setting for a |
| 15 // given type. | 16 // given type. |
| 16 MockContentSettingsProvider(ContentSettingsType content_type, | 17 MockContentSettingsProvider(ContentSettingsType content_type, |
| 17 ContentSetting setting, | 18 ContentSetting setting, |
| 18 bool is_managed, | 19 bool is_managed, |
| 19 bool can_override); | 20 bool can_override); |
| 20 virtual ~MockContentSettingsProvider(); | 21 virtual ~MockContentSettingsProvider(); |
| 21 | 22 |
| 22 // ContentSettingsProviderInterface implementation. | 23 // ContentSettingsProviderInterface implementation. |
| 23 virtual bool CanProvideDefaultSetting(ContentSettingsType content_type) const; | 24 virtual bool CanProvideDefaultSetting(ContentSettingsType content_type) const; |
| 24 virtual ContentSetting ProvideDefaultSetting( | 25 virtual ContentSetting ProvideDefaultSetting( |
| 25 ContentSettingsType content_type) const; | 26 ContentSettingsType content_type) const; |
| 26 virtual void UpdateDefaultSetting(ContentSettingsType content_type, | 27 virtual void UpdateDefaultSetting(ContentSettingsType content_type, |
| 27 ContentSetting setting); | 28 ContentSetting setting); |
| 28 virtual void ResetToDefaults(); | 29 virtual void ResetToDefaults(); |
| 29 virtual bool DefaultSettingIsManaged(ContentSettingsType content_type) const; | 30 virtual bool DefaultSettingIsManaged(ContentSettingsType content_type) const; |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 ContentSettingsType content_type_; | 33 ContentSettingsType content_type_; |
| 33 ContentSetting setting_; | 34 ContentSetting setting_; |
| 34 bool is_managed_; | 35 bool is_managed_; |
| 35 bool can_override_; | 36 bool can_override_; |
| 36 | 37 |
| 37 DISALLOW_COPY_AND_ASSIGN(MockContentSettingsProvider); | 38 DISALLOW_COPY_AND_ASSIGN(MockContentSettingsProvider); |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ | 41 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_ |
| OLD | NEW |