| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/feature_list.h" |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "chrome/common/chrome_features.h" |
| 11 #include "components/content_settings/core/common/content_settings.h" | 13 #include "components/content_settings/core/common/content_settings.h" |
| 12 #include "components/content_settings/core/common/content_settings_types.h" | 14 #include "components/content_settings/core/common/content_settings_types.h" |
| 13 | 15 |
| 14 class GURL; | 16 class GURL; |
| 15 class Profile; | 17 class Profile; |
| 16 | 18 |
| 17 namespace content { | 19 namespace content { |
| 18 enum class PermissionType; | 20 enum class PermissionType; |
| 19 } // namespace content | 21 } // namespace content |
| 20 | 22 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 // We should integrate this better with the permissions layer. See | 49 // We should integrate this better with the permissions layer. See |
| 48 // crbug.com/469221. | 50 // crbug.com/469221. |
| 49 static void SetContentSettingAndRecordRevocation( | 51 static void SetContentSettingAndRecordRevocation( |
| 50 Profile* profile, | 52 Profile* profile, |
| 51 const GURL& primary_url, | 53 const GURL& primary_url, |
| 52 const GURL& secondary_url, | 54 const GURL& secondary_url, |
| 53 ContentSettingsType content_type, | 55 ContentSettingsType content_type, |
| 54 std::string resource_identifier, | 56 std::string resource_identifier, |
| 55 ContentSetting setting); | 57 ContentSetting setting); |
| 56 | 58 |
| 59 static bool ShouldChangeDismissalToBlock(Profile* profile, |
| 60 const GURL& url, |
| 61 content::PermissionType permission); |
| 62 |
| 57 private: | 63 private: |
| 58 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil); | 64 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil); |
| 59 }; | 65 }; |
| 60 | 66 |
| 61 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ | 67 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ |
| OLD | NEW |