The change has the followings:
1. Auto-updating of extension blacklist.
2. Handle extensions in the blacklist. If an extension is in the blacklist,
a. browser will not load the extension at start time;
b. browser will unload the extension at running time;
c. browser will not install the extension;


BUG=12118
TEST=Verify behavior described above works (they should be covered in the unittests in this change).
Review URL: http://codereview.chromium.org/165164

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23423 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index 640700eb..fe0a545 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -45,6 +45,8 @@
   virtual const ExtensionList* extensions() const = 0;
   virtual void UpdateExtension(const std::string& id, const FilePath& path) = 0;
   virtual Extension* GetExtensionById(const std::string& id) = 0;
+  virtual void UpdateExtensionBlacklist(
+    const std::vector<std::string>& blacklist) = 0;
 };
 
 // Manages installed and running Chromium extensions.
@@ -175,6 +177,11 @@
                                 const FilePath& path,
                                 Extension::Location location);
 
+  // Go through each extensions in pref, unload blacklisted extensions
+  // and update the blacklist state in pref.
+  virtual void UpdateExtensionBlacklist(
+    const std::vector<std::string>& blacklist);
+
   void set_extensions_enabled(bool enabled) { extensions_enabled_ = enabled; }
   bool extensions_enabled() { return extensions_enabled_; }