Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/content_settings/content_settings_internal_extension_provider.h

Issue 10823370: rename ExtensionProvider and PlatformAppProvider class (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_PLATFORM_APP_PROVIDER_H _ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROV IDER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PLATFORM_APP_PROVIDER_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 "
11 #include "chrome/browser/content_settings/content_settings_origin_identifier_val ue_map.h" 11 #include "chrome/browser/content_settings/content_settings_origin_identifier_val ue_map.h"
12 #include "chrome/common/content_settings.h" 12 #include "chrome/common/content_settings.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 15
16 class ExtensionService; 16 class ExtensionService;
17 17
18 namespace extensions { 18 namespace extensions {
19 class Extension; 19 class Extension;
20 } 20 }
21 21
22 namespace content_settings { 22 namespace content_settings {
23 23
24 // A content settings provider which disables certain plugins for platform apps. 24 // A content settings provider which disables certain plugins for platform apps.
25 class PlatformAppProvider : public ObservableProvider, 25 class InternalExtensionProvider : public ObservableProvider,
26 public content::NotificationObserver { 26 public content::NotificationObserver {
27 public: 27 public:
28 explicit PlatformAppProvider(ExtensionService* extension_service); 28 explicit InternalExtensionProvider(ExtensionService* extension_service);
29 29
30 virtual ~PlatformAppProvider(); 30 virtual ~InternalExtensionProvider();
31 31
32 // ProviderInterface methods: 32 // ProviderInterface methods:
33 virtual RuleIterator* GetRuleIterator( 33 virtual RuleIterator* GetRuleIterator(
34 ContentSettingsType content_type, 34 ContentSettingsType content_type,
35 const ResourceIdentifier& resource_identifier, 35 const ResourceIdentifier& resource_identifier,
36 bool incognito) const OVERRIDE; 36 bool incognito) const OVERRIDE;
37 37
38 virtual bool SetWebsiteSetting( 38 virtual bool SetWebsiteSetting(
39 const ContentSettingsPattern& primary_pattern, 39 const ContentSettingsPattern& primary_pattern,
40 const ContentSettingsPattern& secondary_pattern, 40 const ContentSettingsPattern& secondary_pattern,
(...skipping 13 matching lines...) Expand all
54 private: 54 private:
55 void SetContentSettingForExtension(const extensions::Extension* extension, 55 void SetContentSettingForExtension(const extensions::Extension* extension,
56 ContentSetting setting); 56 ContentSetting setting);
57 57
58 OriginIdentifierValueMap value_map_; 58 OriginIdentifierValueMap value_map_;
59 59
60 // Used around accesses to the |value_map_| list to guarantee thread safety. 60 // Used around accesses to the |value_map_| list to guarantee thread safety.
61 mutable base::Lock lock_; 61 mutable base::Lock lock_;
62 scoped_ptr<content::NotificationRegistrar> registrar_; 62 scoped_ptr<content::NotificationRegistrar> registrar_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(PlatformAppProvider); 64 DISALLOW_COPY_AND_ASSIGN(InternalExtensionProvider);
65 }; 65 };
66 66
67 } // namespace content_settings 67 } // namespace content_settings
68 68
69 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PLATFORM_APP_PROVIDE R_H_ 69 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_P ROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698