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 SubresourceFilterActivationTracker; |
14 class SubresourceFilterContentSettingsManager; | 15 class SubresourceFilterContentSettingsManager; |
15 | 16 |
16 // This class holds profile scoped context for subresource filtering. | 17 // This class holds profile scoped context for subresource filtering. |
17 class SubresourceFilterProfileContext : public KeyedService { | 18 class SubresourceFilterProfileContext : public KeyedService { |
18 public: | 19 public: |
19 explicit SubresourceFilterProfileContext(Profile* profile); | 20 explicit SubresourceFilterProfileContext(Profile* profile); |
20 ~SubresourceFilterProfileContext() override; | 21 ~SubresourceFilterProfileContext() override; |
21 | 22 |
| 23 SubresourceFilterActivationTracker* activation_tracker() const { |
| 24 return activation_tracker_.get(); |
| 25 } |
| 26 |
22 private: | 27 private: |
23 // KeyedService: | 28 // KeyedService: |
24 void Shutdown() override; | 29 void Shutdown() override; |
25 | 30 |
26 std::unique_ptr<SubresourceFilterContentSettingsManager> | 31 std::unique_ptr<SubresourceFilterContentSettingsManager> |
27 content_settings_manager_; | 32 content_settings_manager_; |
| 33 std::unique_ptr<SubresourceFilterActivationTracker> activation_tracker_; |
28 | 34 |
29 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterProfileContext); | 35 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterProfileContext); |
30 }; | 36 }; |
31 | 37 |
32 #endif // CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_
H_ | 38 #endif // CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_
H_ |
OLD | NEW |