| Index: chrome/browser/content_settings/content_settings_provider.h | 
| diff --git a/chrome/browser/content_settings/content_settings_provider.h b/chrome/browser/content_settings/content_settings_provider.h | 
| index e791eaddade8f36ac72730fd3a733fcc4805e030..da5a665f38169c700d299504bfe59c21889c269c 100644 | 
| --- a/chrome/browser/content_settings/content_settings_provider.h | 
| +++ b/chrome/browser/content_settings/content_settings_provider.h | 
| @@ -8,8 +8,15 @@ | 
| #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ | 
| #pragma once | 
|  | 
| +#include <string> | 
| +#include <utility> | 
| +#include <vector> | 
| + | 
| +#include "chrome/browser/content_settings/content_settings_pattern.h" | 
| #include "chrome/common/content_settings.h" | 
|  | 
| +class GURL; | 
| + | 
| class DefaultContentSettingsProvider { | 
| public: | 
| virtual ~DefaultContentSettingsProvider() {} | 
| @@ -39,4 +46,96 @@ class DefaultContentSettingsProvider { | 
| ContentSettingsType content_type) const = 0; | 
| }; | 
|  | 
| +class LegacyContentSettingsProvider { | 
| + public: | 
| +  // LEGACY ContentSettingsProvider interface | 
| +  typedef std::pair<ContentSettingsPattern, ContentSetting> PatternSettingPair; | 
| +  typedef std::vector<PatternSettingPair> SettingsForOneType; | 
| + | 
| +  virtual ~LegacyContentSettingsProvider() {} | 
| + | 
| +  // Returns a single ContentSetting which applies to a given URL. Note that | 
| +  // certain internal schemes are whitelisted. For ContentSettingsTypes that | 
| +  // require an resource identifier to be specified, the |resource_identifier| | 
| +  // must be non-empty. | 
| +  // | 
| +  // This may be called on any thread. | 
| +  virtual ContentSetting GetContentSetting( | 
| +      const GURL& url, | 
| +      ContentSettingsType content_type, | 
| +      const std::string& resource_identifier) const = 0; | 
| + | 
| +  // Returns a single ContentSetting which applies to a given URL or | 
| +  // CONTENT_SETTING_DEFAULT, if no exception applies. Note that certain | 
| +  // internal schemes are whitelisted. For ContentSettingsTypes that require an | 
| +  // resource identifier to be specified, the |resource_identifier| must be | 
| +  // non-empty. | 
| +  // | 
| +  // This may be called on any thread. | 
| +  virtual ContentSetting GetNonDefaultContentSetting( | 
| +      const GURL& url, | 
| +      ContentSettingsType content_type, | 
| +      const std::string& resource_identifier) const = 0; | 
| + | 
| +  // Returns all ContentSettings which apply to a given URL. For content | 
| +  // setting types that require an additional resource identifier, the default | 
| +  // content setting is returned. | 
| +  // | 
| +  // This may be called on any thread. | 
| +  virtual ContentSettings GetContentSettings(const GURL& url) const = 0; | 
| + | 
| +  // Returns all non-default ContentSettings which apply to a given URL. For | 
| +  // content setting types that require an additional resource identifier, | 
| +  // CONTENT_SETTING_DEFAULT is returned. | 
| +  // | 
| +  // This may be called on any thread. | 
| +  virtual ContentSettings GetNonDefaultContentSettings( | 
| +      const GURL& url) const = 0; | 
| + | 
| +  // For a given content type, returns all patterns with a non-default setting, | 
| +  // mapped to their actual settings, in lexicographical order.  |settings| | 
| +  // must be a non-NULL outparam. If this map was created for the | 
| +  // off-the-record profile, it will only return those settings differing from | 
| +  // the main map. For ContentSettingsTypes that require an resource identifier | 
| +  // to be specified, the |resource_identifier| must be non-empty. | 
| +  // | 
| +  // This may be called on any thread. | 
| +  virtual void GetSettingsForOneType(ContentSettingsType content_type, | 
| +                                     const std::string& resource_identifier, | 
| +                                     SettingsForOneType* settings) const = 0; | 
| + | 
| +  // Sets the blocking setting for a particular pattern and content type. | 
| +  // Setting the value to CONTENT_SETTING_DEFAULT causes the default setting | 
| +  // for that type to be used when loading pages matching this pattern. For | 
| +  // ContentSettingsTypes that require an resource identifier to be specified, | 
| +  // the |resource_identifier| must be non-empty. | 
| +  // | 
| +  // This should only be called on the UI thread. | 
| +  virtual void SetContentSetting(const ContentSettingsPattern& pattern, | 
| +                         ContentSettingsType content_type, | 
| +                         const std::string& resource_identifier, | 
| +                         ContentSetting setting) = 0; | 
| + | 
| +  // Convenience method to add a content setting for a given URL, making sure | 
| +  // that there is no setting overriding it. For ContentSettingsTypes that | 
| +  // require an resource identifier to be specified, the |resource_identifier| | 
| +  // must be non-empty. | 
| +  // | 
| +  // This should only be called on the UI thread. | 
| +  virtual void AddExceptionForURL(const GURL& url, | 
| +                          ContentSettingsType content_type, | 
| +                          const std::string& resource_identifier, | 
| +                          ContentSetting setting) = 0; | 
| + | 
| +  // Clears all host-specific settings for one content type. | 
| +  // | 
| +  // This should only be called on the UI thread. | 
| +  virtual void ClearSettingsForOneType(ContentSettingsType content_type) = 0; | 
| + | 
| +  // Resets all settings levels. | 
| +  // | 
| +  // This should only be called on the UI thread. | 
| +  virtual void ResetToDefaults() = 0; | 
| +}; | 
| + | 
| #endif  // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ | 
|  |