OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PLUGINS_FLASH_TEMPORARY_PERMISSION_TRACKER_FACTORY_H_ |
| 6 #define CHROME_BROWSER_PLUGINS_FLASH_TEMPORARY_PERMISSION_TRACKER_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/singleton.h" |
| 11 #include "chrome/browser/plugins/flash_temporary_permission_tracker.h" |
| 12 #include "components/keyed_service/content/refcounted_browser_context_keyed_serv
ice_factory.h" |
| 13 |
| 14 namespace content { |
| 15 class BrowserContext; |
| 16 } |
| 17 |
| 18 class FlashTemporaryPermissionTracker; |
| 19 class Profile; |
| 20 |
| 21 class FlashTemporaryPermissionTrackerFactory |
| 22 : public RefcountedBrowserContextKeyedServiceFactory { |
| 23 public: |
| 24 static scoped_refptr<FlashTemporaryPermissionTracker> GetForProfile( |
| 25 Profile* profile); |
| 26 static FlashTemporaryPermissionTrackerFactory* GetInstance(); |
| 27 |
| 28 private: |
| 29 friend struct base::DefaultSingletonTraits< |
| 30 FlashTemporaryPermissionTrackerFactory>; |
| 31 |
| 32 FlashTemporaryPermissionTrackerFactory(); |
| 33 ~FlashTemporaryPermissionTrackerFactory() override; |
| 34 |
| 35 // RefcountedBrowserContextKeyedServiceFactory methods: |
| 36 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( |
| 37 content::BrowserContext* context) const override; |
| 38 |
| 39 // BrowserContextKeyedBaseFactory methods: |
| 40 content::BrowserContext* GetBrowserContextToUse( |
| 41 content::BrowserContext* context) const override; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(FlashTemporaryPermissionTrackerFactory); |
| 44 }; |
| 45 |
| 46 #endif // CHROME_BROWSER_PLUGINS_FLASH_TEMPORARY_PERMISSION_TRACKER_FACTORY_H_ |
OLD | NEW |