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

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

Issue 11189094: Implement sideload wipeout for Extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
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_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 bool autoupdate_enabled, 198 bool autoupdate_enabled,
199 bool extensions_enabled); 199 bool extensions_enabled);
200 200
201 virtual ~ExtensionService(); 201 virtual ~ExtensionService();
202 202
203 // Gets the list of currently installed extensions. 203 // Gets the list of currently installed extensions.
204 virtual const ExtensionSet* extensions() const OVERRIDE; 204 virtual const ExtensionSet* extensions() const OVERRIDE;
205 virtual const ExtensionSet* disabled_extensions() const OVERRIDE; 205 virtual const ExtensionSet* disabled_extensions() const OVERRIDE;
206 const ExtensionSet* terminated_extensions() const; 206 const ExtensionSet* terminated_extensions() const;
207 207
208 // Retuns a set of all installed, disabled, and terminated extensions and 208 // Returns a set of all installed, disabled, and terminated extensions and
209 // transfers ownership to caller. 209 // transfers ownership to caller.
210 const ExtensionSet* GenerateInstalledExtensionsSet() const; 210 const ExtensionSet* GenerateInstalledExtensionsSet() const;
211 211
212 // Returns a set of all extensions disabled by the sideload wipeout
213 // initiative.
214 const ExtensionSet* GetWipedOutExtensions() const;
215
212 // Gets the object managing the set of pending extensions. 216 // Gets the object managing the set of pending extensions.
213 virtual extensions::PendingExtensionManager* 217 virtual extensions::PendingExtensionManager*
214 pending_extension_manager() OVERRIDE; 218 pending_extension_manager() OVERRIDE;
215 219
216 const FilePath& install_directory() const { return install_directory_; } 220 const FilePath& install_directory() const { return install_directory_; }
217 221
218 extensions::ProcessMap* process_map() { return &process_map_; } 222 extensions::ProcessMap* process_map() { return &process_map_; }
219 223
220 // Whether this extension can run in an incognito window. 224 // Whether this extension can run in an incognito window.
221 virtual bool IsIncognitoEnabled(const std::string& extension_id) const; 225 virtual bool IsIncognitoEnabled(const std::string& extension_id) const;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // Called by the backend when an extension has been installed. 417 // Called by the backend when an extension has been installed.
414 void OnExtensionInstalled( 418 void OnExtensionInstalled(
415 const extensions::Extension* extension, 419 const extensions::Extension* extension,
416 const syncer::StringOrdinal& page_ordinal, 420 const syncer::StringOrdinal& page_ordinal,
417 bool has_requirement_errors); 421 bool has_requirement_errors);
418 422
419 // Initializes the |extension|'s active permission set and disables the 423 // Initializes the |extension|'s active permission set and disables the
420 // extension if the privilege level has increased (e.g., due to an upgrade). 424 // extension if the privilege level has increased (e.g., due to an upgrade).
421 void InitializePermissions(const extensions::Extension* extension); 425 void InitializePermissions(const extensions::Extension* extension);
422 426
427 // Check to see if this extension needs to be disabled, as per the sideload
428 // wipeout initiative.
429 void MaybeWipeout(const extensions::Extension* extension);
430
423 // Go through each extensions in pref, unload blacklisted extensions 431 // Go through each extensions in pref, unload blacklisted extensions
424 // and update the blacklist state in pref. 432 // and update the blacklist state in pref.
425 virtual void UpdateExtensionBlacklist( 433 virtual void UpdateExtensionBlacklist(
426 const std::vector<std::string>& blacklist) OVERRIDE; 434 const std::vector<std::string>& blacklist) OVERRIDE;
427 435
428 // Go through each extension and unload those that are not allowed to run by 436 // Go through each extension and unload those that are not allowed to run by
429 // management policy providers (ie. network admin and Google-managed 437 // management policy providers (ie. network admin and Google-managed
430 // blacklist). 438 // blacklist).
431 virtual void CheckManagementPolicy() OVERRIDE; 439 virtual void CheckManagementPolicy() OVERRIDE;
432 440
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 #endif 909 #endif
902 910
903 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 911 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
904 InstallAppsWithUnlimtedStorage); 912 InstallAppsWithUnlimtedStorage);
905 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 913 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
906 InstallAppsAndCheckStorageProtection); 914 InstallAppsAndCheckStorageProtection);
907 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 915 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
908 }; 916 };
909 917
910 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 918 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698