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

Unified Diff: chrome/browser/permissions/chooser_context.h

Issue 1382783002: Store USB device permissions in website settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More chooser, less permission. Created 5 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/permissions/chooser_context.h
diff --git a/chrome/browser/permissions/chooser_context.h b/chrome/browser/permissions/chooser_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..c93059e97fa4d3d527ec375ac3a8138a9f62e09b
--- /dev/null
+++ b/chrome/browser/permissions/chooser_context.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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_PERMISSIONS_CHOOSER_CONTEXT_H_
+#define CHROME_BROWSER_PERMISSIONS_CHOOSER_CONTEXT_H_
+
+#include <list>
+
+#include "base/macros.h"
+#include "components/content_settings/core/common/content_settings_types.h"
+
+class ChooserContextBase;
+enum class ChooserType;
+class Profile;
+class KeyedServiceBaseFactory;
+
+class ChooserContext {
+ public:
+ // Helper method returning the ChooserContextBase object associated with the
+ // given ContentSettingsType. This can return nullptr if the the permission
+ // type has no associated context.
+ static ChooserContextBase* Get(Profile* profile,
+ ChooserType content_settings_type);
+
+ // Return all the factories related to ChooserContext. These are the factories
+ // used by ::Get() to create a ChooserContextBase. This is meant to be used by
+ // callers of ::Get() that need to depend on these factories.
+ static const std::list<KeyedServiceBaseFactory*>& GetFactories();
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ChooserContext);
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_CHOOSER_CONTEXT_H_

Powered by Google App Engine
This is Rietveld 408576698