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

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

Issue 1011953003: Refactor Permissions related method out of ContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_type_enum_class
Patch Set: fix cros Created 5 years, 9 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
« no previous file with comments | « chrome/browser/permissions/OWNERS ('k') | chrome/browser/permissions/permission_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_context.h
diff --git a/chrome/browser/permissions/permission_context.h b/chrome/browser/permissions/permission_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..e6e2dac7ebf81351687aed27e1409f3a78cce3d5
--- /dev/null
+++ b/chrome/browser/permissions/permission_context.h
@@ -0,0 +1,39 @@
+// 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_PERMISSION_CONTEXT_H_
+#define CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_H_
+
+#include <list>
+
+#include "base/macros.h"
+#include "components/content_settings/core/common/content_settings_types.h"
+
+class PermissionContextBase;
+class Profile;
+class KeyedServiceBaseFactory;
+
+namespace content {
+enum class PermissionType;
+}; // namespace content
+
+class PermissionContext {
+ public:
+ // Helper method returning the PermissionContextBase object associated with
+ // the given ContentSettingsType.
+ static PermissionContextBase* Get(
+ Profile* profile,
+ content::PermissionType content_settings_type);
+
+ // Return all the factories related to PermissionContext. These are the
+ // factories used by ::Get() to create a PermissionContextBase.
+ // 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(PermissionContext);
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_H_
« no previous file with comments | « chrome/browser/permissions/OWNERS ('k') | chrome/browser/permissions/permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698