OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_H_ |
6 #define CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_H_ | 6 #define CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/keyed_service/core/keyed_service.h" | 11 #include "components/keyed_service/core/keyed_service.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 class SubresourceFilterContentSettingsManager; | 14 class SubresourceFilterContentSettingsManager; |
15 | 15 |
16 // This class holds profile scoped context for subresource filtering. | 16 // This class holds profile scoped context for subresource filtering. |
17 class SubresourceFilterProfileContext : public KeyedService { | 17 class SubresourceFilterProfileContext : public KeyedService { |
18 public: | 18 public: |
19 explicit SubresourceFilterProfileContext(Profile* profile); | 19 explicit SubresourceFilterProfileContext(Profile* profile); |
20 ~SubresourceFilterProfileContext() override; | 20 ~SubresourceFilterProfileContext() override; |
21 | 21 |
| 22 SubresourceFilterContentSettingsManager* settings_manager() { |
| 23 return settings_manager_.get(); |
| 24 } |
| 25 |
22 private: | 26 private: |
23 // KeyedService: | 27 // KeyedService: |
24 void Shutdown() override; | 28 void Shutdown() override; |
25 | 29 |
26 std::unique_ptr<SubresourceFilterContentSettingsManager> | 30 std::unique_ptr<SubresourceFilterContentSettingsManager> settings_manager_; |
27 content_settings_manager_; | |
28 | 31 |
29 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterProfileContext); | 32 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterProfileContext); |
30 }; | 33 }; |
31 | 34 |
32 #endif // CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_
H_ | 35 #endif // CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_
H_ |
OLD | NEW |