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

Unified Diff: chrome/browser/plugins/flash_temporary_permission_tracker_factory.h

Issue 2413683005: [HBD] If DefaultPluginPolicy set to 3, prompt should allow flash for the next page load only (Closed)
Patch Set: [HBD] If DefaultPluginPolicy set to 3, prompt should allow flash for the next page load only Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/plugins/flash_temporary_permission_tracker_factory.h
diff --git a/chrome/browser/plugins/flash_temporary_permission_tracker_factory.h b/chrome/browser/plugins/flash_temporary_permission_tracker_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..5fc392f870d7978fc9a61daf44eaeb08542f3324
--- /dev/null
+++ b/chrome/browser/plugins/flash_temporary_permission_tracker_factory.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PLUGINS_FLASH_TEMPORARY_PERMISSION_TRACKER_FACTORY_H_
+#define CHROME_BROWSER_PLUGINS_FLASH_TEMPORARY_PERMISSION_TRACKER_FACTORY_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/singleton.h"
+#include "chrome/browser/plugins/flash_temporary_permission_tracker.h"
+#include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h"
+
+namespace content {
+class BrowserContext;
+}
+
+class FlashTemporaryPermissionTracker;
+class Profile;
+
+class FlashTemporaryPermissionTrackerFactory
+ : public RefcountedBrowserContextKeyedServiceFactory {
+ public:
+ static scoped_refptr<FlashTemporaryPermissionTracker> GetForProfile(
+ Profile* profile);
+ static FlashTemporaryPermissionTrackerFactory* GetInstance();
+
+ private:
+ friend struct base::DefaultSingletonTraits<
+ FlashTemporaryPermissionTrackerFactory>;
+
+ FlashTemporaryPermissionTrackerFactory();
+ ~FlashTemporaryPermissionTrackerFactory() override;
+
+ // RefcountedBrowserContextKeyedServiceFactory methods:
+ scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
+ content::BrowserContext* context) const override;
+
+ // BrowserContextKeyedBaseFactory methods:
+ content::BrowserContext* GetBrowserContextToUse(
+ content::BrowserContext* context) const override;
+
+ DISALLOW_COPY_AND_ASSIGN(FlashTemporaryPermissionTrackerFactory);
+};
+
+#endif // CHROME_BROWSER_PLUGINS_FLASH_TEMPORARY_PERMISSION_TRACKER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698