| 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_INTERNAL_EXTENSION_PROV
IDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROV
IDER_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROV
IDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROV
IDER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "chrome/browser/content_settings/content_settings_observable_provider.h
" | 10 #include "chrome/browser/content_settings/content_settings_observable_provider.h
" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const ContentSettingsPattern& secondary_pattern, | 40 const ContentSettingsPattern& secondary_pattern, |
| 41 ContentSettingsType content_type, | 41 ContentSettingsType content_type, |
| 42 const ResourceIdentifier& resource_identifier, | 42 const ResourceIdentifier& resource_identifier, |
| 43 base::Value* value) OVERRIDE; | 43 base::Value* value) OVERRIDE; |
| 44 | 44 |
| 45 virtual void ClearAllContentSettingsRules(ContentSettingsType content_type) | 45 virtual void ClearAllContentSettingsRules(ContentSettingsType content_type) |
| 46 OVERRIDE; | 46 OVERRIDE; |
| 47 | 47 |
| 48 virtual void ShutdownOnUIThread() OVERRIDE; | 48 virtual void ShutdownOnUIThread() OVERRIDE; |
| 49 | 49 |
| 50 virtual std::string GetProviderName() const OVERRIDE; |
| 51 |
| 52 virtual SettingSource GetSettingSource() const OVERRIDE; |
| 53 |
| 50 // content::NotificationObserver implementation. | 54 // content::NotificationObserver implementation. |
| 51 virtual void Observe(int type, | 55 virtual void Observe(int type, |
| 52 const content::NotificationSource& source, | 56 const content::NotificationSource& source, |
| 53 const content::NotificationDetails& details) OVERRIDE; | 57 const content::NotificationDetails& details) OVERRIDE; |
| 54 private: | 58 private: |
| 55 void SetContentSettingForExtension(const extensions::Extension* extension, | 59 void SetContentSettingForExtension(const extensions::Extension* extension, |
| 56 ContentSetting setting); | 60 ContentSetting setting); |
| 57 void SetContentSettingForExtensionAndResource( | 61 void SetContentSettingForExtensionAndResource( |
| 58 const extensions::Extension* extension, | 62 const extensions::Extension* extension, |
| 59 const ResourceIdentifier& resource, | 63 const ResourceIdentifier& resource, |
| 60 ContentSetting setting); | 64 ContentSetting setting); |
| 61 | 65 |
| 62 OriginIdentifierValueMap value_map_; | 66 OriginIdentifierValueMap value_map_; |
| 63 | 67 |
| 64 // Used around accesses to the |value_map_| list to guarantee thread safety. | 68 // Used around accesses to the |value_map_| list to guarantee thread safety. |
| 65 mutable base::Lock lock_; | 69 mutable base::Lock lock_; |
| 66 scoped_ptr<content::NotificationRegistrar> registrar_; | 70 scoped_ptr<content::NotificationRegistrar> registrar_; |
| 67 | 71 |
| 68 DISALLOW_COPY_AND_ASSIGN(InternalExtensionProvider); | 72 DISALLOW_COPY_AND_ASSIGN(InternalExtensionProvider); |
| 69 }; | 73 }; |
| 70 | 74 |
| 71 } // namespace content_settings | 75 } // namespace content_settings |
| 72 | 76 |
| 73 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_P
ROVIDER_H_ | 77 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_P
ROVIDER_H_ |
| OLD | NEW |