Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_EXTENSION_PROVID ER_H_ |
|
Mihai Parparita -not on Chrome
2012/08/16 18:31:38
Gaurav asked me why most of the file names in this
Bernhard Bauer
2012/08/16 18:49:57
I think there are other cases where we repeat the
| |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_EXTENSION_PROVID ER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "chrome/browser/content_settings/content_settings_observable_provider.h " | 11 #include "chrome/browser/content_settings/content_settings_observable_provider.h " |
| 12 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h" | 12 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h" |
| 13 | 13 |
| 14 namespace content_settings { | 14 namespace content_settings { |
| 15 | 15 |
| 16 // A content settings provider which manages settings defined by extensions. | 16 // A content settings provider which manages settings defined by extensions. |
| 17 class ExtensionProvider : public ObservableProvider, | 17 class CustomExtensionProvider : public ObservableProvider, |
| 18 public extensions::ContentSettingsStore::Observer { | 18 public extensions::ContentSettingsStore::Observer { |
| 19 public: | 19 public: |
| 20 ExtensionProvider(extensions::ContentSettingsStore* extensions_settings, | 20 CustomExtensionProvider( |
| 21 bool incognito); | 21 extensions::ContentSettingsStore* extensions_settings, |
| 22 bool incognito); | |
| 22 | 23 |
| 23 virtual ~ExtensionProvider(); | 24 virtual ~CustomExtensionProvider(); |
| 24 | 25 |
| 25 // ProviderInterface methods: | 26 // ProviderInterface methods: |
| 26 virtual RuleIterator* GetRuleIterator( | 27 virtual RuleIterator* GetRuleIterator( |
| 27 ContentSettingsType content_type, | 28 ContentSettingsType content_type, |
| 28 const ResourceIdentifier& resource_identifier, | 29 const ResourceIdentifier& resource_identifier, |
| 29 bool incognito) const OVERRIDE; | 30 bool incognito) const OVERRIDE; |
| 30 | 31 |
| 31 virtual bool SetWebsiteSetting( | 32 virtual bool SetWebsiteSetting( |
| 32 const ContentSettingsPattern& primary_pattern, | 33 const ContentSettingsPattern& primary_pattern, |
| 33 const ContentSettingsPattern& secondary_pattern, | 34 const ContentSettingsPattern& secondary_pattern, |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 45 bool incognito) OVERRIDE; | 46 bool incognito) OVERRIDE; |
| 46 | 47 |
| 47 private: | 48 private: |
| 48 // Specifies whether this provider manages settings for incognito or regular | 49 // Specifies whether this provider manages settings for incognito or regular |
| 49 // sessions. | 50 // sessions. |
| 50 bool incognito_; | 51 bool incognito_; |
| 51 | 52 |
| 52 // The backend storing content setting rules defined by extensions. | 53 // The backend storing content setting rules defined by extensions. |
| 53 scoped_refptr<extensions::ContentSettingsStore> extensions_settings_; | 54 scoped_refptr<extensions::ContentSettingsStore> extensions_settings_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(ExtensionProvider); | 56 DISALLOW_COPY_AND_ASSIGN(CustomExtensionProvider); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 } // namespace content_settings | 59 } // namespace content_settings |
| 59 | 60 |
| 60 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_H _ | 61 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_EXTENSION_PRO VIDER_H_ |
| OLD | NEW |