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

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

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_E XTENSION_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_E XTENSION_PROVIDER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_E XTENSION_PROVIDER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTOM_E XTENSION_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h" 12 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h"
13 #include "components/content_settings/core/browser/content_settings_observable_p rovider.h" 13 #include "components/content_settings/core/browser/content_settings_observable_p rovider.h"
14 14
15 namespace content_settings { 15 namespace content_settings {
16 16
17 // A content settings provider which manages settings defined by extensions. 17 // A content settings provider which manages settings defined by extensions.
18 class CustomExtensionProvider : public ObservableProvider, 18 class CustomExtensionProvider : public ObservableProvider,
19 public extensions::ContentSettingsStore::Observer { 19 public extensions::ContentSettingsStore::Observer {
20 public: 20 public:
21 CustomExtensionProvider(const scoped_refptr<extensions::ContentSettingsStore>& 21 CustomExtensionProvider(const scoped_refptr<extensions::ContentSettingsStore>&
22 extensions_settings, 22 extensions_settings,
23 bool incognito); 23 bool incognito);
24 24
25 ~CustomExtensionProvider() override; 25 ~CustomExtensionProvider() override;
26 26
27 // ProviderInterface methods: 27 // ProviderInterface methods:
28 scoped_ptr<RuleIterator> GetRuleIterator( 28 std::unique_ptr<RuleIterator> GetRuleIterator(
29 ContentSettingsType content_type, 29 ContentSettingsType content_type,
30 const ResourceIdentifier& resource_identifier, 30 const ResourceIdentifier& resource_identifier,
31 bool incognito) const override; 31 bool incognito) const override;
32 32
33 bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, 33 bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern,
34 const ContentSettingsPattern& secondary_pattern, 34 const ContentSettingsPattern& secondary_pattern,
35 ContentSettingsType content_type, 35 ContentSettingsType content_type,
36 const ResourceIdentifier& resource_identifier, 36 const ResourceIdentifier& resource_identifier,
37 base::Value* value) override; 37 base::Value* value) override;
38 38
(...skipping 13 matching lines...) Expand all
52 52
53 // The backend storing content setting rules defined by extensions. 53 // The backend storing content setting rules defined by extensions.
54 scoped_refptr<extensions::ContentSettingsStore> extensions_settings_; 54 scoped_refptr<extensions::ContentSettingsStore> extensions_settings_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(CustomExtensionProvider); 56 DISALLOW_COPY_AND_ASSIGN(CustomExtensionProvider);
57 }; 57 };
58 58
59 } // namespace content_settings 59 } // namespace content_settings
60 60
61 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTO M_EXTENSION_PROVIDER_H_ 61 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_CUSTO M_EXTENSION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698