OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_PERMISSIONS_UPDATER_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 | 12 |
| 13 class ExtensionPermissionSet; |
| 14 class ExtensionPrefs; |
| 15 class Profile; |
| 16 |
13 namespace base { | 17 namespace base { |
14 class DictionaryValue; | 18 class DictionaryValue; |
15 } | 19 } |
16 class Extension; | |
17 class ExtensionPermissionSet; | |
18 class ExtensionPrefs; | |
19 class Profile; | |
20 | 20 |
21 namespace extensions { | 21 namespace extensions { |
22 | 22 |
| 23 class Extension; |
| 24 |
23 // Updates an Extension's active and granted permissions in persistent storage | 25 // Updates an Extension's active and granted permissions in persistent storage |
24 // and notifies interested parties of the changes. | 26 // and notifies interested parties of the changes. |
25 class PermissionsUpdater { | 27 class PermissionsUpdater { |
26 public: | 28 public: |
27 explicit PermissionsUpdater(Profile* profile); | 29 explicit PermissionsUpdater(Profile* profile); |
28 ~PermissionsUpdater(); | 30 ~PermissionsUpdater(); |
29 | 31 |
30 // Adds the set of |permissions| to the |extension|'s active permission set | 32 // Adds the set of |permissions| to the |extension|'s active permission set |
31 // and sends the relevant messages and notifications. This method assumes the | 33 // and sends the relevant messages and notifications. This method assumes the |
32 // user has already been prompted, if necessary, for the extra permissions. | 34 // user has already been prompted, if necessary, for the extra permissions. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 70 |
69 // Gets the ExtensionPrefs for the associated profile. | 71 // Gets the ExtensionPrefs for the associated profile. |
70 ExtensionPrefs* GetExtensionPrefs(); | 72 ExtensionPrefs* GetExtensionPrefs(); |
71 | 73 |
72 Profile* profile_; | 74 Profile* profile_; |
73 }; | 75 }; |
74 | 76 |
75 } // namespace extensions | 77 } // namespace extensions |
76 | 78 |
77 #endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ | 79 #endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ |
OLD | NEW |