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

Unified Diff: chrome/browser/extensions/extensions_service.h

Issue 4687005: Track permissions granted to extensions in prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac test failure Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extensions_service.h
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index f19bb22bb7efc371c098e3516443900ff8829cd3..c8310392643e35d80b1080ea538ff231283f4a68 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -277,6 +277,15 @@ class ExtensionsService
void EnableExtension(const std::string& extension_id);
void DisableExtension(const std::string& extension_id);
+ // Updates the |extension|'s granted permissions lists to include all
+ // permissions in the |extension|'s manifest.
+ void GrantPermissions(const Extension* extension);
+
+ // Updates the |extension|'s granted permissions lists to include all
+ // permissions in the |extension|'s manifest and re-enables the
+ // extension.
+ void GrantPermissionsAndEnableExtension(const Extension* extension);
+
// Load the extension from the directory |extension_path|.
void LoadExtension(const FilePath& extension_path);
@@ -351,12 +360,10 @@ class ExtensionsService
virtual void OnLoadedInstalledExtensions();
// Called when an extension has been loaded.
- void OnExtensionLoaded(const Extension* extension,
- bool allow_privilege_increase);
+ void OnExtensionLoaded(const Extension* extension);
// Called by the backend when an extension has been installed.
- void OnExtensionInstalled(const Extension* extension,
- bool allow_privilege_increase);
+ void OnExtensionInstalled(const Extension* extension);
// Called by the backend when an external extension is found.
void OnExternalExtensionFileFound(const std::string& id,
@@ -364,6 +371,10 @@ class ExtensionsService
const FilePath& path,
Extension::Location location);
+ // Checks if the privileges requested by |extension| have increased, and if
+ // so, disables the extension and prompts the user to approve the change.
+ void DisableIfPrivilegeIncrease(const Extension* extension);
+
// Go through each extensions in pref, unload blacklisted extensions
// and update the blacklist state in pref.
virtual void UpdateExtensionBlacklist(
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/browser/extensions/extensions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698