Chromium Code Reviews| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 | 11 |
| 12 class URLPattern; | |
| 13 | |
|
gpdavis
2014/07/15 21:56:38
Will remove (see below)
| |
| 12 namespace base { | 14 namespace base { |
| 13 class DictionaryValue; | 15 class DictionaryValue; |
| 14 } | 16 } |
| 15 | 17 |
| 16 namespace content { | 18 namespace content { |
| 17 class BrowserContext; | 19 class BrowserContext; |
| 18 } | 20 } |
| 19 | 21 |
| 20 namespace extensions { | 22 namespace extensions { |
| 21 | 23 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 49 // permissions currently requested by the extension and all the permissions | 51 // permissions currently requested by the extension and all the permissions |
| 50 // required by the extension. | 52 // required by the extension. |
| 51 void InitializePermissions(const Extension* extension); | 53 void InitializePermissions(const Extension* extension); |
| 52 | 54 |
| 53 // Grants any withheld all-hosts (or all-hosts-like) permissions. | 55 // Grants any withheld all-hosts (or all-hosts-like) permissions. |
| 54 void GrantWithheldImpliedAllHosts(const Extension* extension); | 56 void GrantWithheldImpliedAllHosts(const Extension* extension); |
| 55 | 57 |
| 56 // Revokes any requests all-hosts (or all-hosts-like) permissions. | 58 // Revokes any requests all-hosts (or all-hosts-like) permissions. |
| 57 void WithholdImpliedAllHosts(const Extension* extension); | 59 void WithholdImpliedAllHosts(const Extension* extension); |
| 58 | 60 |
| 61 void AddAlwaysAllow(const Extension* extensions, const URLPattern* pattern); | |
| 62 | |
| 63 void ClearAlwaysAllow(const Extension* extensions); | |
| 64 | |
|
gpdavis
2014/07/15 21:56:38
Oops-- I originally added these here, but decided
| |
| 59 private: | 65 private: |
| 60 enum EventType { | 66 enum EventType { |
| 61 ADDED, | 67 ADDED, |
| 62 REMOVED, | 68 REMOVED, |
| 63 }; | 69 }; |
| 64 | 70 |
| 65 // Sets the |extension|'s active permissions to |active| and records the | 71 // Sets the |extension|'s active permissions to |active| and records the |
| 66 // change in the prefs. If |withheld| is non-null, also sets the extension's | 72 // change in the prefs. If |withheld| is non-null, also sets the extension's |
| 67 // withheld permissions to |withheld|. Otherwise, |withheld| permissions are | 73 // withheld permissions to |withheld|. Otherwise, |withheld| permissions are |
| 68 // not changed. | 74 // not changed. |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 84 const Extension* extension, | 90 const Extension* extension, |
| 85 const PermissionSet* changed); | 91 const PermissionSet* changed); |
| 86 | 92 |
| 87 // The associated BrowserContext. | 93 // The associated BrowserContext. |
| 88 content::BrowserContext* browser_context_; | 94 content::BrowserContext* browser_context_; |
| 89 }; | 95 }; |
| 90 | 96 |
| 91 } // namespace extensions | 97 } // namespace extensions |
| 92 | 98 |
| 93 #endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ | 99 #endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ |
| OLD | NEW |