Bug 524091 - Remove microsummaries support. (Browser changes)
authorMarco Bonardo <mbonardo@mozilla.com>
Tue, 26 Apr 2011 14:24:57 +0200
changeset 68755 914e10b323c11cef1e9b93762d1ca5bf19bb71ee
parent 68520 bcda287821304f00ddb790b470f753f7e862b377
child 68756 034a23531362a33e21cb83c22ddff9ba5c503c0f
push idunknown
push userunknown
push dateunknown
bugs524091
milestone6.0a1
Bug 524091 - Remove microsummaries support. (Browser changes)
browser/app/profile/firefox.js
browser/base/content/browser.js
browser/components/sidebar/src/nsSidebar.js
browser/installer/removed-files.in
browser/locales/en-US/chrome/browser/sidebar/sidebar.properties
browser/locales/jar.mn
dom/interfaces/sidebar/nsISidebar.idl
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -342,20 +342,16 @@ pref("browser.search.openintab", false);
 pref("browser.search.update", true);
 
 // disable logging for the search service update system by default
 pref("browser.search.update.log", false);
 
 // Check whether we need to perform engine updates every 6 hours
 pref("browser.search.update.interval", 21600);
 
-// Whether or not microsummary and generator updates are enabled
-pref("browser.microsummary.enabled", true);
-pref("browser.microsummary.updateGenerators", true);
-
 // enable search suggestions by default
 pref("browser.search.suggest.enabled", true);
 
 pref("browser.sessionhistory.max_entries", 50);
 
 // handle links targeting new windows
 // 0=default window, 1=current window/tab, 2=new window, 3=new tab in most recent window
 pref("browser.link.open_newwindow", 3);
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1572,32 +1572,20 @@ function delayedStartup(isLoadingBlank, 
   }
 
   PlacesToolbarHelper.init();
 
   ctrlTab.readPref();
   gPrefService.addObserver(ctrlTab.prefName, ctrlTab, false);
   gPrefService.addObserver(allTabs.prefName, allTabs, false);
 
-  // Initialize the microsummary service by retrieving it, prompting its factory
-  // to create its singleton, whose constructor initializes the service.
-  // Started 4 seconds after delayedStartup (before the livemarks service below).
-  setTimeout(function() {
-    try {
-      Cc["@mozilla.org/microsummary/service;1"].getService(Ci.nsIMicrosummaryService);
-    } catch (ex) {
-      Components.utils.reportError("Failed to init microsummary service:\n" + ex);
-    }
-  }, 4000);
-
   // Delayed initialization of the livemarks update timer.
   // Livemark updates don't need to start until after bookmark UI
   // such as the toolbar has initialized. Starting 5 seconds after
-  // delayedStartup in order to stagger this after the microsummary
-  // service (see above) and before the download manager starts (see below).
+  // delayedStartup in order to stagger this before the download manager starts.
   setTimeout(function() PlacesUtils.livemarks.start(), 5000);
 
   // Initialize the download manager some time after the app starts so that
   // auto-resume downloads begin (such as after crashing or quitting with
   // active downloads) and speeds up the first-load of the download manager UI.
   // If the user manually opens the download manager before the timeout, the
   // downloads will start right away, and getting the service again won't hurt.
   setTimeout(function() {
--- a/browser/components/sidebar/src/nsSidebar.js
+++ b/browser/components/sidebar/src/nsSidebar.js
@@ -226,41 +226,16 @@ function (aDescriptionURL)
 // http://msdn.microsoft.com/en-us/library/aa342526%28VS.85%29.aspx .
 // XXX Implement this!
 nsSidebar.prototype.IsSearchProviderInstalled =
 function (aSearchURL)
 {
   return 0;
 }
 
-nsSidebar.prototype.addMicrosummaryGenerator =
-function (generatorURL)
-{
-    debug("addMicrosummaryGenerator(" + generatorURL + ")");
-
-    if (!/^https?:/i.test(generatorURL))
-      return;
-
-    var stringBundle = srGetStrBundle("chrome://browser/locale/sidebar/sidebar.properties");
-    var titleMessage = stringBundle.GetStringFromName("addMicsumGenConfirmTitle");
-    var dialogMessage = stringBundle.formatStringFromName("addMicsumGenConfirmText", [generatorURL], 1);
-      
-    if (!this.promptService.confirm(null, titleMessage, dialogMessage))
-        return;
-
-    var ioService = Components.classes["@mozilla.org/network/io-service;1"].
-                    getService(Components.interfaces.nsIIOService);
-    var generatorURI = ioService.newURI(generatorURL, null, null);
-
-    var microsummaryService = Components.classes["@mozilla.org/microsummary/service;1"].
-                              getService(Components.interfaces.nsIMicrosummaryService);
-    if (microsummaryService)
-      microsummaryService.addGenerator(generatorURI);
-}
-
 // property of nsIClassInfo
 nsSidebar.prototype.flags = nsIClassInfo.DOM_OBJECT;
 
 // property of nsIClassInfo
 nsSidebar.prototype.classDescription = "Sidebar";
 
 // method of nsIClassInfo
 nsSidebar.prototype.getInterfaces = function(count) {
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -72,16 +72,17 @@ components/nsXmlRpcClient.js
 components/pluginGlue.js
 components/sidebar.xpt
 components/WeaveCrypto.js
 components/WeaveCrypto.manifest
 components/xmlextras.xpt
 components/xpcom.xpt
 components/xpti.dat
 components/xptitemp.dat
+components/nsMicrosummaryService.js
 defaults/pref/all.js
 defaults/pref/bug259708.js
 defaults/pref/bug307259.js
 defaults/pref/reporter.js
 defaults/pref/security-prefs.js
 defaults/pref/winpref.js
 defaults/pref/xpinstall.js
 defaults/profile/US/
@@ -870,17 +871,16 @@ xpicleanup@BIN_SUFFIX@
   components/nsFormHistory.js
   components/nsHandlerService.js
   components/nsHelperAppDlg.js
   components/nsINIProcessor.js
   components/nsLivemarkService.js
   components/nsLoginInfo.js
   components/nsLoginManager.js
   components/nsLoginManagerPrompter.js
-  components/nsMicrosummaryService.js
   components/nsPlacesAutoComplete.js
   components/nsPlacesDBFlush.js
   components/nsPlacesExpiration.js
   components/nsPrivateBrowsingService.js
   components/nsPrompter.js
   components/nsProxyAutoConfig.js
   components/nsSafebrowsingApplication.js
   components/nsSearchService.js
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/sidebar/sidebar.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-addMicsumGenConfirmTitle=Add Microsummary Generator
-addMicsumGenConfirmText=Add the following microsummary generator?\n\nSource: %S
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -62,17 +62,16 @@
     locale/browser/preferences/preferences.dtd        (%chrome/browser/preferences/preferences.dtd)
     locale/browser/preferences/preferences.properties (%chrome/browser/preferences/preferences.properties)
     locale/browser/preferences/privacy.dtd            (%chrome/browser/preferences/privacy.dtd)
     locale/browser/preferences/security.dtd           (%chrome/browser/preferences/security.dtd)
 #ifdef MOZ_SERVICES_SYNC
     locale/browser/preferences/sync.dtd               (%chrome/browser/preferences/sync.dtd)
 #endif
     locale/browser/preferences/tabs.dtd               (%chrome/browser/preferences/tabs.dtd)
-    locale/browser/sidebar/sidebar.properties      (%chrome/browser/sidebar/sidebar.properties)
 #ifdef MOZ_SERVICES_SYNC
     locale/browser/syncBrand.dtd                (%chrome/browser/syncBrand.dtd)
     locale/browser/syncSetup.dtd                (%chrome/browser/syncSetup.dtd)
     locale/browser/syncSetup.properties         (%chrome/browser/syncSetup.properties)
     locale/browser/syncGenericChange.properties         (%chrome/browser/syncGenericChange.properties)
     locale/browser/syncKey.dtd                  (%chrome/browser/syncKey.dtd)
     locale/browser/syncQuota.dtd                (%chrome/browser/syncQuota.dtd)
     locale/browser/syncQuota.properties         (%chrome/browser/syncQuota.properties)
--- a/dom/interfaces/sidebar/nsISidebar.idl
+++ b/dom/interfaces/sidebar/nsISidebar.idl
@@ -39,26 +39,25 @@
 /*
 
   The Sidebar API for 3rd parties
 
 */
 
 #include "nsISupports.idl"
 
-[scriptable, uuid(67cf6231-c303-4f7e-b9b1-a0e87772ecfd)]
+[scriptable, uuid(41a22fb6-39e2-45e1-95c5-7e8cea36575d)]
 interface nsISidebar : nsISupports
 {
     void addPanel(in wstring aTitle, in string aContentURL,
                   in string aCustomizeURL);
     void addPersistentPanel(in wstring aTitle, in string aContentURL,
                             in string aCustomizeURL);
     void addSearchEngine(in string engineURL, in string iconURL,
                          in wstring suggestedTitle, in wstring suggestedCategory);
-    void addMicrosummaryGenerator(in string generatorURL);
 };
 
 [scriptable, uuid(4350fb73-9305-41df-a669-11d26222d420)]
 interface nsISidebarExternal : nsISupports
 {
     void AddSearchProvider(in string aDescriptionURL);
 		unsigned long IsSearchProviderInstalled(in string aSearchURL);
 };