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/macros.h" | 10 #include "base/macros.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // construction and report a revocation metric accordingly if the revocation | 43 // construction and report a revocation metric accordingly if the revocation |
44 // condition is met (from ALLOW to something else). | 44 // condition is met (from ALLOW to something else). |
45 class ScopedRevocationReporter { | 45 class ScopedRevocationReporter { |
46 public: | 46 public: |
47 ScopedRevocationReporter(Profile* profile, | 47 ScopedRevocationReporter(Profile* profile, |
48 const GURL& primary_url, | 48 const GURL& primary_url, |
49 const GURL& secondary_url, | 49 const GURL& secondary_url, |
50 ContentSettingsType content_type, | 50 ContentSettingsType content_type, |
51 PermissionSourceUI source_ui); | 51 PermissionSourceUI source_ui); |
52 | 52 |
| 53 ScopedRevocationReporter(Profile* profile, |
| 54 const ContentSettingsPattern& primary_pattern, |
| 55 const ContentSettingsPattern& secondary_pattern, |
| 56 ContentSettingsType content_type, |
| 57 PermissionSourceUI source_ui); |
| 58 |
53 ~ScopedRevocationReporter(); | 59 ~ScopedRevocationReporter(); |
54 | 60 |
55 private: | 61 private: |
56 Profile* profile_; | 62 Profile* profile_; |
57 const GURL primary_url_; | 63 const GURL primary_url_; |
58 const GURL secondary_url_; | 64 const GURL secondary_url_; |
59 ContentSettingsType content_type_; | 65 ContentSettingsType content_type_; |
60 PermissionSourceUI source_ui_; | 66 PermissionSourceUI source_ui_; |
61 bool is_initially_allowed_; | 67 bool is_initially_allowed_; |
62 }; | 68 }; |
63 | 69 |
64 private: | 70 private: |
65 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil); | 71 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil); |
66 }; | 72 }; |
67 | 73 |
68 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ | 74 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ |
OLD | NEW |