| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CONTENT_SETTINGS_MOCK_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_MOCK_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_MOCK_PROVIDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_MOCK_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" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 ContentSettingsPattern embedding_url_pattern, | 48 ContentSettingsPattern embedding_url_pattern, |
| 49 ContentSettingsType content_type, | 49 ContentSettingsType content_type, |
| 50 ResourceIdentifier resource_identifier, | 50 ResourceIdentifier resource_identifier, |
| 51 ContentSetting setting, | 51 ContentSetting setting, |
| 52 bool read_only, | 52 bool read_only, |
| 53 bool is_managed); | 53 bool is_managed); |
| 54 virtual ~MockProvider(); | 54 virtual ~MockProvider(); |
| 55 | 55 |
| 56 // ProviderInterface implementation | 56 // ProviderInterface implementation |
| 57 virtual ContentSetting GetContentSetting( | 57 virtual ContentSetting GetContentSetting( |
| 58 const GURL& requesting_url, | 58 const GURL& primary_url, |
| 59 const GURL& embedding_url, | 59 const GURL& secondary_url, |
| 60 ContentSettingsType content_type, | 60 ContentSettingsType content_type, |
| 61 const ResourceIdentifier& resource_identifier) const; | 61 const ResourceIdentifier& resource_identifier) const; |
| 62 | 62 |
| 63 virtual Value* GetContentSettingValue( |
| 64 const GURL& primary_url, |
| 65 const GURL& secondary_url, |
| 66 ContentSettingsType content_type, |
| 67 const ResourceIdentifier& resource_identifier) const; |
| 68 |
| 63 // The MockProvider is only able to store one content setting. So every time | 69 // The MockProvider is only able to store one content setting. So every time |
| 64 // this method is called the previously set content settings is overwritten. | 70 // this method is called the previously set content settings is overwritten. |
| 65 virtual void SetContentSetting( | 71 virtual void SetContentSetting( |
| 66 const ContentSettingsPattern& requesting_url_pattern, | 72 const ContentSettingsPattern& requesting_url_pattern, |
| 67 const ContentSettingsPattern& embedding_url_pattern, | 73 const ContentSettingsPattern& embedding_url_pattern, |
| 68 ContentSettingsType content_type, | 74 ContentSettingsType content_type, |
| 69 const ResourceIdentifier& resource_identifier, | 75 const ResourceIdentifier& resource_identifier, |
| 70 ContentSetting content_setting); | 76 ContentSetting content_setting); |
| 71 | 77 |
| 72 virtual void GetAllContentSettingsRules( | 78 virtual void GetAllContentSettingsRules( |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 ResourceIdentifier resource_identifier_; | 141 ResourceIdentifier resource_identifier_; |
| 136 ContentSetting setting_; | 142 ContentSetting setting_; |
| 137 bool read_only_; | 143 bool read_only_; |
| 138 | 144 |
| 139 DISALLOW_COPY_AND_ASSIGN(MockProvider); | 145 DISALLOW_COPY_AND_ASSIGN(MockProvider); |
| 140 }; | 146 }; |
| 141 | 147 |
| 142 } // namespace content_settings | 148 } // namespace content_settings |
| 143 | 149 |
| 144 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_MOCK_PROVIDER_H_ | 150 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_MOCK_PROVIDER_H_ |
| OLD | NEW |