~ubuntu-branches/ubuntu/gutsy/firefox/gutsy

« back to all changes in this revision

Viewing changes to mailnews/base/util/nsMsgIncomingServer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ian Jackson
  • Date: 2006-10-10 18:49:32 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20061010184932-da75izt7y0e59afq
Tags: 1.99+2.0rc2+dfsg-0ubuntu1
* New upstream version 2.0rc2.
* Fix/workaround for epiphany GtkSocket lifetype crash:
  apply patch id=241087 from Mozilla Bugzilla #241535 to fix LP #63814.
* Change application name to `Firefox', as requested by mdz.
  Files changed:
    - browser/locales/en-US/chrome/branding/brand.dtd
    - browser/locales/en-US/chrome/branding/brand.properties;
  New values:
    - brandShortName and brandFullName: `Bon Echo' => `Firefox'
    - vendorShortName: `Mozilla' => `Ubuntu'
* Make preferences dialogue fit again (bah!).

Show diffs side-by-side

added added

removed removed

Lines of Context:
956
956
NS_IMETHODIMP
957
957
nsMsgIncomingServer::ForgetPassword()
958
958
{
959
 
    nsresult rv;
960
 
 
961
 
    nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
962
 
    NS_ENSURE_SUCCESS(rv,rv);
963
 
 
964
959
    nsXPIDLCString serverSpec;
965
 
    rv = GetServerURI(getter_Copies(serverSpec));
 
960
    nsresult rv = GetServerURI(getter_Copies(serverSpec));
966
961
    if (NS_FAILED(rv)) return rv;
967
962
 
968
 
    nsCOMPtr<nsIURI> uri;
969
 
    NS_NewURI(getter_AddRefs(uri), serverSpec);
970
 
 
971
963
    //this is need to make sure wallet service has been created
972
964
    rv = CreateServicesForPasswordManager();
973
965
    NS_ENSURE_SUCCESS(rv, rv);
974
 
 
975
 
    rv = observerService->NotifyObservers(uri, "login-failed", nsnull);
976
 
    NS_ENSURE_SUCCESS(rv,rv);
977
 
 
978
 
    rv = SetPassword("");
979
 
    return rv;
 
966
    nsCOMPtr <nsIPasswordManager> passwordMgr = do_GetService(NS_PASSWORDMANAGER_CONTRACTID, &rv);
 
967
    if (NS_SUCCEEDED(rv) && passwordMgr)
 
968
    {
 
969
      // Get the current server URI
 
970
      nsXPIDLCString currServerUri;
 
971
      rv = GetServerURI(getter_Copies(currServerUri));
 
972
      NS_ENSURE_SUCCESS(rv, rv);
 
973
 
 
974
      passwordMgr->RemoveUser(currServerUri, EmptyString());
 
975
    }
 
976
    return SetPassword("");
980
977
}
981
978
 
982
979
NS_IMETHODIMP
1813
1810
    if (NS_SUCCEEDED(rv) && isSecure)
1814
1811
    {
1815
1812
       *aSocketType = nsIMsgIncomingServer::useSSL;
1816
 
       SetSocketType(*aSocketType);
 
1813
      // don't call virtual method in case overrides call GetSocketType
 
1814
      nsMsgIncomingServer::SetSocketType(*aSocketType);
1817
1815
    }
1818
1816
    else
1819
1817
    {
1893
1891
NS_IMETHODIMP nsMsgIncomingServer::ConfigureTemporaryFilters(nsIMsgFilterList *aFilterList)
1894
1892
{
1895
1893
  nsresult rv = ConfigureTemporaryReturnReceiptsFilter(aFilterList);
1896
 
  NS_ENSURE_SUCCESS(rv, rv);
 
1894
  if (NS_FAILED(rv)) // shut up warnings...
 
1895
    return rv;
1897
1896
  return ConfigureTemporaryServerSpamFilters(aFilterList);
1898
1897
}
1899
1898