| 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_CONTENT_SETTINGS_MA
NAGER_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_CONTENT_SETTINGS_MA
NAGER_FACTORY_H_ |
| 6 #define CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_CONTENT_SETTINGS_MA
NAGER_FACTORY_H_ | 6 #define CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_CONTENT_SETTINGS_MA
NAGER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 10 | 10 |
| 11 class BrowserContext; |
| 11 class KeyedService; | 12 class KeyedService; |
| 12 class Profile; | 13 class Profile; |
| 14 class SubresourceFilterContentSettingsManager; |
| 13 | 15 |
| 14 // This class is responsible for instantiating a profile-scoped object which | 16 // This class is responsible for instantiating a profile-scoped object which |
| 15 // observes changes to content settings. | 17 // observes changes to content settings. |
| 16 class SubresourceFilterContentSettingsManagerFactory | 18 class SubresourceFilterContentSettingsManagerFactory |
| 17 : public BrowserContextKeyedServiceFactory { | 19 : public BrowserContextKeyedServiceFactory { |
| 18 public: | 20 public: |
| 19 static void EnsureForProfile(Profile* profile); | 21 static SubresourceFilterContentSettingsManager* EnsureForProfile( |
| 22 Profile* profile); |
| 20 | 23 |
| 21 static SubresourceFilterContentSettingsManagerFactory* GetInstance(); | 24 static SubresourceFilterContentSettingsManagerFactory* GetInstance(); |
| 22 | 25 |
| 23 SubresourceFilterContentSettingsManagerFactory(); | 26 SubresourceFilterContentSettingsManagerFactory(); |
| 24 | 27 |
| 25 private: | 28 private: |
| 26 KeyedService* BuildServiceInstanceFor( | 29 KeyedService* BuildServiceInstanceFor( |
| 27 content::BrowserContext* profile) const override; | 30 content::BrowserContext* profile) const override; |
| 28 | 31 |
| 32 content::BrowserContext* GetBrowserContextToUse( |
| 33 content::BrowserContext* context) const override; |
| 34 |
| 29 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterContentSettingsManagerFactory); | 35 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterContentSettingsManagerFactory); |
| 30 }; | 36 }; |
| 31 | 37 |
| 32 #endif // CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_CONTENT_SETTINGS
_MANAGER_FACTORY_H_ | 38 #endif // CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_CONTENT_SETTINGS
_MANAGER_FACTORY_H_ |
| OLD | NEW |