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

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

Issue 748723002: Move content_settings_custom_extension_provider.* to c/b/extensions/api/content_settings/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_custom_extension_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CUSTOM_EXTENSION_PROVID ER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_EXTENSION_PROVID ER_H_
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
11 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h"
12 #include "components/content_settings/core/browser/content_settings_observable_p rovider.h"
13
14 namespace content_settings {
15
16 // A content settings provider which manages settings defined by extensions.
17 class CustomExtensionProvider : public ObservableProvider,
18 public extensions::ContentSettingsStore::Observer {
19 public:
20 CustomExtensionProvider(const scoped_refptr<extensions::ContentSettingsStore>&
21 extensions_settings,
22 bool incognito);
23
24 ~CustomExtensionProvider() override;
25
26 // ProviderInterface methods:
27 RuleIterator* GetRuleIterator(ContentSettingsType content_type,
28 const ResourceIdentifier& resource_identifier,
29 bool incognito) const override;
30
31 bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern,
32 const ContentSettingsPattern& secondary_pattern,
33 ContentSettingsType content_type,
34 const ResourceIdentifier& resource_identifier,
35 base::Value* value) override;
36
37 void ClearAllContentSettingsRules(ContentSettingsType content_type) override {
38 }
39
40 void ShutdownOnUIThread() override;
41
42 // extensions::ContentSettingsStore::Observer methods:
43 void OnContentSettingChanged(const std::string& extension_id,
44 bool incognito) override;
45
46 private:
47 // Specifies whether this provider manages settings for incognito or regular
48 // sessions.
49 bool incognito_;
50
51 // The backend storing content setting rules defined by extensions.
52 scoped_refptr<extensions::ContentSettingsStore> extensions_settings_;
53
54 DISALLOW_COPY_AND_ASSIGN(CustomExtensionProvider);
55 };
56
57 } // namespace content_settings
58
59 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_EXTENSION_PRO VIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_custom_extension_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698