| 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 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 14 | 16 |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 62 |
| 61 private: | 63 private: |
| 62 Profile* profile_; | 64 Profile* profile_; |
| 63 const GURL primary_url_; | 65 const GURL primary_url_; |
| 64 const GURL secondary_url_; | 66 const GURL secondary_url_; |
| 65 ContentSettingsType content_type_; | 67 ContentSettingsType content_type_; |
| 66 PermissionSourceUI source_ui_; | 68 PermissionSourceUI source_ui_; |
| 67 bool is_initially_allowed_; | 69 bool is_initially_allowed_; |
| 68 }; | 70 }; |
| 69 | 71 |
| 72 static bool ShouldChangeDismissalToBlock(Profile* profile, |
| 73 const GURL& url, |
| 74 content::PermissionType permission); |
| 75 |
| 70 private: | 76 private: |
| 71 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil); | 77 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil); |
| 72 }; | 78 }; |
| 73 | 79 |
| 74 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ | 80 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ |
| OLD | NEW |