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

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

Issue 10381097: Move content settings extension API to content_settings dir. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed conflict Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_EXTENSION_PROVIDER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_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/extension_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 ExtensionProvider : public ObservableProvider,
18 public ExtensionContentSettingsStore::Observer { 18 public extensions::ContentSettingsStore::Observer {
19 public: 19 public:
20 ExtensionProvider(ExtensionContentSettingsStore* extensions_settings, 20 ExtensionProvider(extensions::ContentSettingsStore* extensions_settings,
21 bool incognito); 21 bool incognito);
22 22
23 virtual ~ExtensionProvider(); 23 virtual ~ExtensionProvider();
24 24
25 // ProviderInterface methods: 25 // ProviderInterface methods:
26 virtual RuleIterator* GetRuleIterator( 26 virtual RuleIterator* GetRuleIterator(
27 ContentSettingsType content_type, 27 ContentSettingsType content_type,
28 const ResourceIdentifier& resource_identifier, 28 const ResourceIdentifier& resource_identifier,
29 bool incognito) const OVERRIDE; 29 bool incognito) const OVERRIDE;
30 30
31 virtual bool SetWebsiteSetting( 31 virtual bool SetWebsiteSetting(
32 const ContentSettingsPattern& primary_pattern, 32 const ContentSettingsPattern& primary_pattern,
33 const ContentSettingsPattern& secondary_pattern, 33 const ContentSettingsPattern& secondary_pattern,
34 ContentSettingsType content_type, 34 ContentSettingsType content_type,
35 const ResourceIdentifier& resource_identifier, 35 const ResourceIdentifier& resource_identifier,
36 Value* value) OVERRIDE; 36 Value* value) OVERRIDE;
37 37
38 virtual void ClearAllContentSettingsRules(ContentSettingsType content_type) 38 virtual void ClearAllContentSettingsRules(ContentSettingsType content_type)
39 OVERRIDE {} 39 OVERRIDE {}
40 40
41 virtual void ShutdownOnUIThread() OVERRIDE; 41 virtual void ShutdownOnUIThread() OVERRIDE;
42 42
43 // ExtensionContentSettingsStore::Observer methods: 43 // extensions::ContentSettingsStore::Observer methods:
44 virtual void OnContentSettingChanged(const std::string& extension_id, 44 virtual void OnContentSettingChanged(const std::string& extension_id,
45 bool incognito) OVERRIDE; 45 bool incognito) OVERRIDE;
46 46
47 private: 47 private:
48 // Specifies whether this provider manages settings for incognito or regular 48 // Specifies whether this provider manages settings for incognito or regular
49 // sessions. 49 // sessions.
50 bool incognito_; 50 bool incognito_;
51 51
52 // The backend storing content setting rules defined by extensions. 52 // The backend storing content setting rules defined by extensions.
53 scoped_refptr<ExtensionContentSettingsStore> extensions_settings_; 53 scoped_refptr<extensions::ContentSettingsStore> extensions_settings_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(ExtensionProvider); 55 DISALLOW_COPY_AND_ASSIGN(ExtensionProvider);
56 }; 56 };
57 57
58 } // namespace content_settings 58 } // namespace content_settings
59 59
60 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_H _ 60 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_EXTENSION_PROVIDER_H _
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_extension_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698