Backing out Bug 413590 due to regressions.

This commit is contained in:
jminta%gmail.com 2008-02-14 20:25:20 +00:00
Родитель f9b696c70d
Коммит 96be78740e
8 изменённых файлов: 15 добавлений и 41 удалений

Просмотреть файл

@ -947,8 +947,6 @@ nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch,
PRBool *pResult)
{
NS_ENSURE_ARG_POINTER(pResult);
NS_ENSURE_ARG_POINTER(charset);
PRBool result = PR_FALSE;
nsresult err = NS_OK;

Просмотреть файл

@ -154,7 +154,6 @@ NS_IMETHODIMP nsMsgBiffManager::Shutdown()
NS_IMETHODIMP nsMsgBiffManager::AddServerBiff(nsIMsgIncomingServer *server)
{
NS_ENSURE_ARG_POINTER(server);
nsresult rv;
PRInt32 biffMinutes;
@ -212,7 +211,6 @@ NS_IMETHODIMP nsMsgBiffManager::ForceBiffAll()
NS_IMETHODIMP nsMsgBiffManager::OnServerLoaded(nsIMsgIncomingServer *server)
{
NS_ENSURE_ARG_POINTER(server);
nsresult rv;
PRBool doBiff = PR_FALSE;

Просмотреть файл

@ -628,8 +628,6 @@ NS_IMETHODIMP nsMsgGroupView::GetCellProperties(PRInt32 aRow, nsITreeColumn *aCo
NS_IMETHODIMP nsMsgGroupView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& aValue)
{
NS_ENSURE_ARG_POINTER(aCol);
if (!IsValidIndex(aRow))
return NS_MSG_INVALID_DBVIEW_INDEX;

Просмотреть файл

@ -128,7 +128,6 @@ NS_IMETHODIMP nsMsgSearchDBView::Close()
NS_IMETHODIMP nsMsgSearchDBView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& aValue)
{
NS_ENSURE_ARG_POINTER(aCol);
const PRUnichar* colID;
aCol->GetIdConst(&colID);
if (colID[0] == 'l' && colID[1] == 'o') // location, need to check for "lo" not just "l" to avoid "label" column
@ -168,9 +167,6 @@ nsresult nsMsgSearchDBView::GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDB
NS_IMETHODIMP nsMsgSearchDBView::GetFolderForViewIndex(nsMsgViewIndex index, nsIMsgFolder **aFolder)
{
if (!m_folders)
return NS_ERROR_FAILURE;
return m_folders->QueryElementAt(index, NS_GET_IID(nsIMsgFolder), (void **) aFolder);
}
@ -253,7 +249,6 @@ nsMsgSearchDBView::OnNewSearch()
m_dbToUseList.Clear();
if (m_folders)
m_folders->Clear();
m_keys.RemoveAll();
m_levels.Clear();
@ -530,7 +525,6 @@ nsMsgSearchDBView::OnStopCopy(nsresult aStatus)
{
mCurIndex++;
PRUint32 numFolders =0;
if (m_uniqueFoldersSelected)
rv = m_uniqueFoldersSelected->Count(&numFolders);
if ( mCurIndex < (PRUint32) numFolders)
{

Просмотреть файл

@ -273,8 +273,6 @@ nsMsgXFVirtualFolderDBView::OnSearchHit(nsIMsgDBHdr* aMsgHdr, nsIMsgFolder *fold
NS_IMETHODIMP
nsMsgXFVirtualFolderDBView::OnSearchDone(nsresult status)
{
if (!m_viewFolder)
return NS_ERROR_NOT_INITIALIZED;
// handle any non verified hits we haven't handled yet.
UpdateCacheAndViewForPrevSearchedFolders(nsnull);
@ -322,7 +320,6 @@ nsMsgXFVirtualFolderDBView::OnNewSearch()
m_doingSearch = PR_TRUE;
if (m_folders)
m_folders->Clear();
m_keys.RemoveAll();
m_levels.Clear();
@ -337,10 +334,9 @@ nsMsgXFVirtualFolderDBView::OnNewSearch()
// and for each folder, then open the db and pull out the cached hits, add them to the view.
// For each hit in a new folder, we'll then clean up the stale hits from the previous folder(s).
PRInt32 scopeCount = 0;
PRInt32 scopeCount;
nsCOMPtr <nsIMsgSearchSession> searchSession = do_QueryReferent(m_searchSession);
nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID);
if (searchSession)
searchSession->CountSearchScopes(&scopeCount);
for (PRInt32 i = 0; i < scopeCount; i++)
{

Просмотреть файл

@ -1054,7 +1054,7 @@ private:
nsresult nsBayesianFilter::tokenizeMessage(const char* aMessageURI, nsIMsgWindow *aMsgWindow, TokenAnalyzer* aAnalyzer)
{
NS_ENSURE_ARG_POINTER(aMessageURI);
nsCOMPtr <nsIMsgMessageService> msgService;
nsresult rv = GetMessageServiceFromURI(nsDependentCString(aMessageURI), getter_AddRefs(msgService));
NS_ENSURE_SUCCESS(rv, rv);
@ -1247,7 +1247,6 @@ NS_IMETHODIMP nsBayesianFilter::ClassifyMessage(const char *aMessageURL, nsIMsgW
/* void classifyMessages (in unsigned long aCount, [array, size_is (aCount)] in string aMsgURLs, in nsIJunkMailClassificationListener aListener); */
NS_IMETHODIMP nsBayesianFilter::ClassifyMessages(PRUint32 aCount, const char **aMsgURLs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener)
{
NS_ENSURE_ARG_POINTER(aMsgURLs);
TokenAnalyzer* analyzer = new MessageClassifier(this, aListener, aMsgWindow, aCount, aMsgURLs);
if (!analyzer) return NS_ERROR_OUT_OF_MEMORY;
TokenStreamListener *tokenListener = new TokenStreamListener(analyzer);

Просмотреть файл

@ -189,7 +189,6 @@ NS_IMETHODIMP nsMsgMailViewList::AddMailView(nsIMsgMailView * aMailView)
NS_IMETHODIMP nsMsgMailViewList::RemoveMailView(nsIMsgMailView * aMailView)
{
if (m_mailViews)
m_mailViews->RemoveElement(static_cast<nsISupports*>(aMailView));
return NS_OK;
}
@ -210,8 +209,7 @@ NS_IMETHODIMP nsMsgMailViewList::Save()
// brute force...remove all the old filters in our filter list, then we'll re-add our current
// list
nsCOMPtr<nsIMsgFilter> msgFilter;
PRUint32 numFilters = 0;
if (mFilterList)
PRUint32 numFilters;
mFilterList->GetFilterCount(&numFilters);
while (numFilters)
{
@ -223,13 +221,12 @@ NS_IMETHODIMP nsMsgMailViewList::Save()
ConvertMailViewListToFilterList();
// now save the filters to our file
return mFilterList ? mFilterList->SaveToDefaultFile() : NS_ERROR_FAILURE;
return mFilterList->SaveToDefaultFile();
}
nsresult nsMsgMailViewList::ConvertMailViewListToFilterList()
{
PRUint32 mailViewCount = 0;
if (m_mailViews)
m_mailViews->Count(&mailViewCount);
nsCOMPtr<nsIMsgMailView> mailView;
nsCOMPtr<nsIMsgFilter> newMailFilter;

Просмотреть файл

@ -826,13 +826,11 @@ NS_IMETHODIMP nsImapService::Search(nsIMsgSearchSession *aSearchSession,
nsIMsgFolder *aMsgFolder,
const char *aSearchUri)
{
NS_ENSURE_ARG_POINTER(aMsgFolder);
nsresult rv;
nsresult rv = NS_OK;
nsCAutoString folderURI;
nsCOMPtr<nsIImapUrl> imapUrl;
nsCOMPtr <nsIUrlListener> urlListener = do_QueryInterface(aSearchSession, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr <nsIUrlListener> urlListener = do_QueryInterface(aSearchSession);
nsCAutoString urlSpec;
PRUnichar hierarchySeparator = GetHierarchyDelimiter(aMsgFolder);
@ -1124,7 +1122,6 @@ NS_IMETHODIMP nsImapService::StreamMessage(const char *aMessageURI,
const char *aAdditionalHeader,
nsIURI **aURL)
{
NS_ENSURE_ARG_POINTER(aMessageURI);
nsCOMPtr<nsIMsgFolder> folder;
nsCAutoString msgKey;
nsCAutoString mimePart;
@ -1466,7 +1463,6 @@ NS_IMETHODIMP nsImapService::DeleteFolder(nsIEventTarget *aClientEventTarget,
nsIMsgWindow *aMsgWindow,
nsIURI **aURL)
{
NS_ENSURE_ARG_POINTER(aImapMailFolder);
// If it's an aol server then use 'deletefolder' url to
// remove all msgs first and then remove the folder itself.
PRBool removeFolderAndMsgs = PR_FALSE;
@ -2700,8 +2696,6 @@ NS_IMETHODIMP nsImapService::GetDefaultLocalPath(nsILocalFile **aResult)
havePref,
getter_AddRefs(localFile));
if (!localFile)
return NS_ERROR_FAILURE;
PRBool exists;
rv = localFile->Exists(&exists);
if (NS_SUCCEEDED(rv) && !exists)