Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/extensions/permissions_updater.h

Issue 396033002: Support "always allow" for runtime script execution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replaced persisted permissions with granted permissions Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // permissions currently requested by the extension and all the permissions 49 // permissions currently requested by the extension and all the permissions
50 // required by the extension. 50 // required by the extension.
51 void InitializePermissions(const Extension* extension); 51 void InitializePermissions(const Extension* extension);
52 52
53 // Grants any withheld all-hosts (or all-hosts-like) permissions. 53 // Grants any withheld all-hosts (or all-hosts-like) permissions.
54 void GrantWithheldImpliedAllHosts(const Extension* extension); 54 void GrantWithheldImpliedAllHosts(const Extension* extension);
55 55
56 // Revokes any requests all-hosts (or all-hosts-like) permissions. 56 // Revokes any requests all-hosts (or all-hosts-like) permissions.
57 void WithholdImpliedAllHosts(const Extension* extension); 57 void WithholdImpliedAllHosts(const Extension* extension);
58 58
59 // Adds to active permissions any granted permissions that do not imply all
60 // hosts.
61 void ActivateGrantedHosts(const Extension* extension);
62
59 private: 63 private:
60 enum EventType { 64 enum EventType {
61 ADDED, 65 ADDED,
62 REMOVED, 66 REMOVED,
63 }; 67 };
64 68
65 // Sets the |extension|'s active permissions to |active| and records the 69 // 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 70 // change in the prefs. If |withheld| is non-null, also sets the extension's
67 // withheld permissions to |withheld|. Otherwise, |withheld| permissions are 71 // withheld permissions to |withheld|. Otherwise, |withheld| permissions are
68 // not changed. 72 // not changed.
(...skipping 15 matching lines...) Expand all
84 const Extension* extension, 88 const Extension* extension,
85 const PermissionSet* changed); 89 const PermissionSet* changed);
86 90
87 // The associated BrowserContext. 91 // The associated BrowserContext.
88 content::BrowserContext* browser_context_; 92 content::BrowserContext* browser_context_;
89 }; 93 };
90 94
91 } // namespace extensions 95 } // namespace extensions
92 96
93 #endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ 97 #endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698