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

Side by Side Diff: chrome/browser/content_settings/content_settings_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_H_
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
11 #include "chrome/browser/content_settings/content_settings_observable_provider.h "
12 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h"
13
14 namespace content_settings {
15
16 // A content settings provider which manages settings defined by extensions.
17 class ExtensionProvider : public ObservableProvider,
18 public extensions::ContentSettingsStore::Observer {
19 public:
20 ExtensionProvider(extensions::ContentSettingsStore* extensions_settings,
21 bool incognito);
22
23 virtual ~ExtensionProvider();
24
25 // ProviderInterface methods:
26 virtual RuleIterator* GetRuleIterator(
27 ContentSettingsType content_type,
28 const ResourceIdentifier& resource_identifier,
29 bool incognito) const OVERRIDE;
30
31 virtual bool SetWebsiteSetting(
32 const ContentSettingsPattern& primary_pattern,
33 const ContentSettingsPattern& secondary_pattern,
34 ContentSettingsType content_type,
35 const ResourceIdentifier& resource_identifier,
36 Value* value) OVERRIDE;
37
38 virtual void ClearAllContentSettingsRules(ContentSettingsType content_type)
39 OVERRIDE {}
40
41 virtual void ShutdownOnUIThread() OVERRIDE;
42
43 // extensions::ContentSettingsStore::Observer methods:
44 virtual void OnContentSettingChanged(const std::string& extension_id,
45 bool incognito) OVERRIDE;
46
47 private:
48 // Specifies whether this provider manages settings for incognito or regular
49 // sessions.
50 bool incognito_;
51
52 // The backend storing content setting rules defined by extensions.
53 scoped_refptr<extensions::ContentSettingsStore> extensions_settings_;
54
55 DISALLOW_COPY_AND_ASSIGN(ExtensionProvider);
56 };
57
58 } // namespace content_settings
59
60 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698