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

Side by Side Diff: chrome/browser/permissions/chooser_context.h

Issue 1560263002: Store Bluetooth permissions in website settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added code to check session->chooser_permission_manager Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_PERMISSIONS_PERMISSION_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_CHOOSER_CONTEXT_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_H_ 6 #define CHROME_BROWSER_PERMISSIONS_CHOOSER_CONTEXT_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/content_settings/core/common/content_settings_types.h" 11 #include "components/content_settings/core/common/content_settings_types.h"
12 12
13 class PermissionContextBase; 13 class ChooserContextBase;
14 class Profile; 14 class Profile;
15 class KeyedServiceBaseFactory; 15 class KeyedServiceBaseFactory;
16 16
17 namespace content { 17 namespace content {
18 enum class PermissionType; 18 enum class PermissionType;
19 }; // namespace content 19 }; // namespace content
20 20
21 class PermissionContext { 21 class ChooserContext {
22 public: 22 public:
23 // Helper method returning the PermissionContextBase object associated with 23 // Helper method returning the PermissionContextBase object associated with
24 // the given ContentSettingsType. 24 // the given ContentSettingsType.
25 // This can return nullptr if the the permission type has no associated 25 // This can return nullptr if the the permission type has no associated
26 // context. 26 // context.
27 static PermissionContextBase* Get( 27 static ChooserContextBase* Get(Profile* profile,
28 Profile* profile, 28 content::PermissionType content_settings_type);
29 content::PermissionType content_settings_type);
30 29
31 // Return all the factories related to PermissionContext. These are the 30 // Return all the factories related to ChooserContext. These are the
32 // factories used by ::Get() to create a PermissionContextBase. 31 // factories used by ::Get() to create a ChooserContextBase.
33 // This is meant to be used by callers of ::Get() that need to depend on these 32 // This is meant to be used by callers of ::Get() that need to depend on these
34 // factories. 33 // factories.
35 static const std::list<KeyedServiceBaseFactory*>& GetFactories(); 34 static const std::list<KeyedServiceBaseFactory*>& GetFactories();
36 35
37 private: 36 private:
38 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionContext); 37 DISALLOW_IMPLICIT_CONSTRUCTORS(ChooserContext);
39 }; 38 };
40 39
41 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_H_ 40 #endif // CHROME_BROWSER_PERMISSIONS_CHOOSER_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/bluetooth/bluetooth_permission_context_factory.cc ('k') | chrome/browser/permissions/chooser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698