Bug 1393219 - remove define for CaseInsensitiveCompare. r=mkmelin
authorJorg K <jorgk@jorgk.com>
Sun, 10 Sep 2017 10:10:45 +0200
changeset 22093 27e6d777270f45b1f73d0b81521918e951d505d5
parent 22092 b0d8d878f62741503ed15a597029bf37a617de4b
child 22094 0531d19ae371c148327c379822f2bfffe9fc3256
push id13491
push usermozilla@jorgk.com
push dateSun, 10 Sep 2017 08:36:31 +0000
treeherdercomm-central@0531d19ae371 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1393219
Bug 1393219 - remove define for CaseInsensitiveCompare. r=mkmelin
ldap/xpcom/src/nsLDAPURL.cpp
mailnews/base/search/src/nsMsgBodyHandler.cpp
mailnews/base/search/src/nsMsgFilterList.cpp
mailnews/base/src/nsMsgDBView.cpp
mailnews/base/util/nsMsgUtils.h
mailnews/compose/src/nsMsgAttachmentHandler.cpp
mailnews/compose/src/nsMsgComposeService.cpp
mailnews/compose/src/nsSmtpProtocol.cpp
mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/local/src/nsPop3Protocol.cpp
mailnews/mime/src/mimedrft.cpp
mailnews/news/src/nsNNTPProtocol.cpp
--- a/ldap/xpcom/src/nsLDAPURL.cpp
+++ b/ldap/xpcom/src/nsLDAPURL.cpp
@@ -554,17 +554,17 @@ NS_IMETHODIMP nsLDAPURL::AddAttribute(co
     // Wrap the attribute in commas, so that we can do an exact match.
     nsAutoCString findAttribute(",");
     findAttribute.Append(aAttribute);
     findAttribute.Append(',');
 
     // Check to see if the attribute is already stored. If it is, then also
     // check to see if it is the last attribute in the string, or if the next
     // character is a comma, this means we won't match substrings.
-    int32_t pos = mAttributes.Find(findAttribute, CaseInsensitiveCompare);
+    int32_t pos = mAttributes.Find(findAttribute, /* ignoreCase = */ true);
     if (pos != -1)
       return NS_OK;
 
     mAttributes.Append(Substring(findAttribute, 1));
   }
 
   // Now get the current path
   nsCString newPath;
@@ -585,17 +585,17 @@ NS_IMETHODIMP nsLDAPURL::RemoveAttribute
   nsAutoCString findAttribute(",");
   findAttribute.Append(aAttribute);
   findAttribute.Append(',');
 
   if (mAttributes.Equals(findAttribute, nsCaseInsensitiveCStringComparator()))
     mAttributes.Truncate();
   else
   {
-    int32_t pos = mAttributes.Find(findAttribute, CaseInsensitiveCompare);
+    int32_t pos = mAttributes.Find(findAttribute, /* ignoreCase = */ true);
     if (pos == -1)
       return NS_OK;
 
     mAttributes.Cut(pos, findAttribute.Length() - 1);
   }
 
   // Now get the current path
   nsCString newPath;
@@ -609,17 +609,17 @@ NS_IMETHODIMP nsLDAPURL::HasAttribute(co
                                       bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
 
   nsAutoCString findAttribute(",");
   findAttribute.Append(aAttribute);
   findAttribute.Append(',');
 
-  *_retval = mAttributes.Find(findAttribute, CaseInsensitiveCompare) != -1;
+  *_retval = mAttributes.Find(findAttribute, /* ignoreCase = */ true) != -1;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsLDAPURL::GetScope(int32_t *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   *_retval = mScope;
   return NS_OK;
--- a/mailnews/base/search/src/nsMsgBodyHandler.cpp
+++ b/mailnews/base/search/src/nsMsgBodyHandler.cpp
@@ -348,63 +348,63 @@ void nsMsgBodyHandler::SniffPossibleMIME
   // specifically, the headers are all case-insensitive and the values we care
   // about are also case-insensitive, with the sole exception of the boundary
   // string, so we can't just take the input line and make it lower case.
   nsCString lowerCaseLine(line);
   ToLowerCase(lowerCaseLine);
 
   if (StringBeginsWith(lowerCaseLine, NS_LITERAL_CSTRING("content-type:")))
   {
-    if (lowerCaseLine.Find("text/html", CaseInsensitiveCompare) != -1)
+    if (lowerCaseLine.Find("text/html", /* ignoreCase = */ true) != -1)
       m_partIsHtml = true;
     // Strenuous edge case: a message/rfc822 is equivalent to the content type
     // of whatever the message is. Headers should be ignored here. Even more
     // strenuous are message/partial and message/external-body, where the first
     // case requires reassembly across messages and the second is actually an
     // external source. And of course, there are other message types to handle.
     // RFC 3798 complicates things with the message/disposition-notification
     // MIME type. message/rfc822 is best treated as a multipart with no proper
     // boundary; since we only use boundaries for retriggering the headers,
     // the lack of one can safely be ignored.
-    else if (lowerCaseLine.Find("multipart/", CaseInsensitiveCompare) != -1 ||
-        lowerCaseLine.Find("message/", CaseInsensitiveCompare) != -1)
+    else if (lowerCaseLine.Find("multipart/", /* ignoreCase = */ true) != -1 ||
+             lowerCaseLine.Find("message/", /* ignoreCase = */ true) != -1)
     {
       if (m_isMultipart)
       {
         // This means we have a nested multipart tree. Since we currently only
         // handle the first children, we are probably better off assuming that
         // this nested part is going to have text/* children. After all, the
         // biggest usage that I've seen is multipart/signed.
         m_partIsText = true;
       }
       m_isMultipart = true;
     }
-    else if (lowerCaseLine.Find("text/", CaseInsensitiveCompare) == -1)
+    else if (lowerCaseLine.Find("text/", /* ignoreCase = */ true) == -1)
       m_partIsText = false; // We have disproved our assumption
   }
 
   // TODO: make this work for nested multiparts (requires some redesign)
   if (m_isMultipart && boundary.IsEmpty() &&
-      lowerCaseLine.Find("boundary=", CaseInsensitiveCompare) != -1)
+      lowerCaseLine.Find("boundary=", /* ignoreCase = */ true) != -1)
   {
-    int32_t start = lowerCaseLine.Find("boundary=", CaseInsensitiveCompare);
+    int32_t start = lowerCaseLine.Find("boundary=", /* ignoreCase = */ true);
     start += 9;
     if (line[start] == '\"')
       start++;
     int32_t end = line.RFindChar('\"');
     if (end == -1)
       end = line.Length();
 
     boundary.Assign("--");
     boundary.Append(Substring(line,start,end-start));
   }
 
   if (StringBeginsWith(lowerCaseLine,
                        NS_LITERAL_CSTRING("content-transfer-encoding:")) &&
-      lowerCaseLine.Find(ENCODING_BASE64, CaseInsensitiveCompare) != kNotFound)
+      lowerCaseLine.Find(ENCODING_BASE64, /* ignoreCase = */ true) != kNotFound)
     m_base64part = true;
 }
 
 /**
  * Decodes the given base64 string.
  *
  * It returns its decoded string in its input.
  *
--- a/mailnews/base/search/src/nsMsgFilterList.cpp
+++ b/mailnews/base/search/src/nsMsgFilterList.cpp
@@ -1151,17 +1151,17 @@ nsresult nsMsgFilterList::ComputeArbitra
       searchTerms->GetLength(&numSearchTerms);
     for (uint32_t i = 0; i < numSearchTerms; i++)
     {
       filter->GetTerm(i, &attrib, nullptr, nullptr, nullptr, arbitraryHeader);
       if (!arbitraryHeader.IsEmpty())
       {
         if (m_arbitraryHeaders.IsEmpty())
           m_arbitraryHeaders.Assign(arbitraryHeader);
-        else if (m_arbitraryHeaders.Find(arbitraryHeader, CaseInsensitiveCompare) == -1)
+        else if (m_arbitraryHeaders.Find(arbitraryHeader, /* ignoreCase = */ true) == -1)
         {
           m_arbitraryHeaders.Append(" ");
           m_arbitraryHeaders.Append(arbitraryHeader);
         }
       }
     }
   }
 
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -711,17 +711,17 @@ nsresult nsMsgDBView::FetchKeywords(nsIM
 
   rv = aHdr->GetLabel(&label);
   nsCString keywords;
   aHdr->GetStringProperty("keywords", getter_Copies(keywords));
   if (label > 0)
   {
     nsAutoCString labelStr("$label");
     labelStr.Append((char) (label + '0'));
-    if (keywords.Find(labelStr, CaseInsensitiveCompare) == -1)
+    if (keywords.Find(labelStr, /* ignoreCase = */ true) == -1)
     {
       if (!keywords.IsEmpty())
         keywords.Append(' ');
       keywords.Append(labelStr);
     }
   }
   keywordString = keywords;
   return NS_OK;
@@ -785,17 +785,17 @@ nsresult nsMsgDBView::FetchTags(nsIMsgDB
   aHdr->GetStringProperty("keywords", getter_Copies(keywords));
 
   nsMsgLabelValue label = 0;
   rv = aHdr->GetLabel(&label);
   if (label > 0)
   {
     nsAutoCString labelStr("$label");
     labelStr.Append((char) (label + '0'));
-    if (keywords.Find(labelStr, CaseInsensitiveCompare) == -1)
+    if (keywords.Find(labelStr, /* ignoreCase = */ true) == -1)
       FetchLabel(aHdr, tags);
   }
 
   nsTArray<nsCString> keywordsArray;
   ParseString(keywords, ' ', keywordsArray);
   nsAutoString tag;
 
   for (uint32_t i = 0; i < keywordsArray.Length(); i++)
--- a/mailnews/base/util/nsMsgUtils.h
+++ b/mailnews/base/util/nsMsgUtils.h
@@ -317,21 +317,16 @@ NS_MSG_BASE nsresult MsgDetectCharsetFro
  */
 NS_MSG_BASE nsresult
 ConvertBufToPlainText(nsString &aConBuf, bool formatFlowed, bool delsp,
                                          bool formatOutput, bool disallowBreaks);
 
 #include "nsEscape.h"
 
 /**
- * The internal API expects nsCaseInsensitiveC?StringComparator() and true.
- * Redefine CaseInsensitiveCompare so that Find works.
- */
-#define CaseInsensitiveCompare true
-/**
  * The following methods are not exposed to the external API, but when we're
  * using the internal API we can simply redirect the calls appropriately.
  */
 #define MsgLowerCaseEqualsLiteral(str, l) \
         (str).LowerCaseEqualsLiteral(l)
 #define MsgRFindChar(str, ch, len) \
         (str).RFindChar(ch, len)
 #define MsgCompressWhitespace(str) \
--- a/mailnews/compose/src/nsMsgAttachmentHandler.cpp
+++ b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
@@ -568,17 +568,17 @@ FetcherURLDoneCallback(nsresult aStatus,
 }
 
 nsresult
 nsMsgAttachmentHandler::SnarfMsgAttachment(nsMsgCompFields *compFields)
 {
   nsresult rv = NS_ERROR_INVALID_ARG;
   nsCOMPtr <nsIMsgMessageService> messageService;
 
-  if (m_uri.Find("-message:", CaseInsensitiveCompare) != -1)
+  if (m_uri.Find("-message:", /* ignoreCase = */ true) != -1)
   {
     nsCOMPtr <nsIFile> tmpFile;
     rv = nsMsgCreateTempFile("nsmail.tmp", getter_AddRefs(tmpFile));
     NS_ENSURE_SUCCESS(rv, rv);
     mTmpFile = do_QueryInterface(tmpFile);
     mDeleteFile = true;
     mCompFields = compFields;
     m_type = MESSAGE_RFC822;
--- a/mailnews/compose/src/nsMsgComposeService.cpp
+++ b/mailnews/compose/src/nsMsgComposeService.cpp
@@ -894,18 +894,18 @@ NS_IMETHODIMP nsMsgComposeService::Reply
   for (uint32_t i = 0; i < count; i++)
   {
     nsCOMPtr<nsIMsgIdentity> anIdentity(do_QueryElementAt(identities, i, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoCString identityEmail;
     anIdentity->GetEmail(identityEmail);
 
-    if (recipients.Find(identityEmail, CaseInsensitiveCompare) != kNotFound ||
-        ccList.Find(identityEmail, CaseInsensitiveCompare) != kNotFound)
+    if (recipients.Find(identityEmail, /* ignoreCase = */ true) != kNotFound ||
+        ccList.Find(identityEmail, /* ignoreCase = */ true) != kNotFound)
     {
       identity = anIdentity;
       break;
     }
   }
   if (!identity) // Found no match -> don't reply.
     return NS_ERROR_ABORT;
 
--- a/mailnews/compose/src/nsSmtpProtocol.cpp
+++ b/mailnews/compose/src/nsSmtpProtocol.cpp
@@ -871,45 +871,45 @@ nsresult nsSmtpProtocol::SendEhloRespons
         {
             SetFlag(SMTP_EHLO_DSN_ENABLED);
         }
         else if (StringBeginsWith(responseLine, NS_LITERAL_CSTRING("AUTH"), nsCaseInsensitiveCStringComparator()))
         {
           SetFlag(SMTP_AUTH);
 
           if (responseLine.Find(NS_LITERAL_CSTRING("GSSAPI"),
-                                CaseInsensitiveCompare) >= 0)
+                                /* ignoreCase = */ true) >= 0)
             SetFlag(SMTP_AUTH_GSSAPI_ENABLED);
 
           if (responseLine.Find(NS_LITERAL_CSTRING("CRAM-MD5"),
-                                CaseInsensitiveCompare) >= 0)
+                                /* ignoreCase = */ true) >= 0)
             SetFlag(SMTP_AUTH_CRAM_MD5_ENABLED);
 
           if (responseLine.Find(NS_LITERAL_CSTRING("NTLM"),
-                                CaseInsensitiveCompare) >= 0)
+                                /* ignoreCase = */ true) >= 0)
             SetFlag(SMTP_AUTH_NTLM_ENABLED);
 
           if (responseLine.Find(NS_LITERAL_CSTRING("MSN"),
-                                CaseInsensitiveCompare) >= 0)
+                                /* ignoreCase = */ true) >= 0)
             SetFlag(SMTP_AUTH_MSN_ENABLED);
 
           if (responseLine.Find(NS_LITERAL_CSTRING("PLAIN"),
-                                CaseInsensitiveCompare) >= 0)
+                                /* ignoreCase = */ true) >= 0)
             SetFlag(SMTP_AUTH_PLAIN_ENABLED);
 
           if (responseLine.Find(NS_LITERAL_CSTRING("LOGIN"),
-                                CaseInsensitiveCompare) >= 0)
+                                /* ignoreCase = */ true) >= 0)
             SetFlag(SMTP_AUTH_LOGIN_ENABLED);
 
           if (responseLine.Find(NS_LITERAL_CSTRING("EXTERNAL"),
-                                CaseInsensitiveCompare) >= 0)
+                                /* ignoreCase = */ true) >= 0)
             SetFlag(SMTP_AUTH_EXTERNAL_ENABLED);
 
           if (responseLine.Find(NS_LITERAL_CSTRING("XOAUTH2"),
-                                CaseInsensitiveCompare) >= 0)
+                                /* ignoreCase = */ true) >= 0)
             SetFlag(SMTP_AUTH_OAUTH2_ENABLED);
         }
         else if (StringBeginsWith(responseLine, NS_LITERAL_CSTRING("SIZE"), nsCaseInsensitiveCStringComparator()))
         {
             SetFlag(SMTP_EHLO_SIZE_ENABLED);
 
             m_sizelimit = atol((responseLine.get()) + 4);
         }
--- a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
+++ b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
@@ -909,33 +909,33 @@ nsresult nsMsgMdnGenerator::InitAndProce
               // First check in the "To:" header
               for (uint32_t i = 0; i < count; i++)
               {
                 ident = do_QueryElementAt(servIdentities, i, &rv);
                 if (NS_FAILED(rv))
                   continue;
                 ident->GetEmail(identEmail);
                 if (!mailTo.IsEmpty() && !identEmail.IsEmpty() &&
-                    mailTo.Find(identEmail, CaseInsensitiveCompare) != kNotFound)
+                    mailTo.Find(identEmail, /* ignoreCase = */ true) != kNotFound)
                 {
                   m_identity = ident;
                   break;
                 }
               }
               // If no match, check the "Cc:" header
               if (!m_identity)
               {
                 for (uint32_t i = 0; i < count; i++)
                 {
                   ident = do_QueryElementAt(servIdentities, i, &rv);
                   if (NS_FAILED(rv))
                     continue;
                   ident->GetEmail(identEmail);
                   if (!mailCC.IsEmpty() && !identEmail.IsEmpty() &&
-                      mailCC.Find(identEmail, CaseInsensitiveCompare) != kNotFound)
+                      mailCC.Find(identEmail, /* ignoreCase = */ true) != kNotFound)
                   {
                     m_identity = ident;
                     break;
                   }
                 }
               }
             }
 
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -4790,25 +4790,25 @@ nsresult nsImapMailFolder::HandleCustomF
                                              nsCString &keywords)
 {
   nsresult rv = GetDatabase();
   NS_ENSURE_SUCCESS(rv, rv);
 
   ToLowerCase(keywords);
   bool messageClassified = true;
   // Mac Mail uses "NotJunk"
-  if (keywords.Find("NonJunk", CaseInsensitiveCompare) != kNotFound ||
-      keywords.Find("NotJunk", CaseInsensitiveCompare) != kNotFound)
+  if (keywords.Find("NonJunk", /* ignoreCase = */ true) != kNotFound ||
+      keywords.Find("NotJunk", /* ignoreCase = */ true) != kNotFound)
   {
     nsAutoCString msgJunkScore;
     msgJunkScore.AppendInt(nsIJunkMailPlugin::IS_HAM_SCORE);
     mDatabase->SetStringProperty(uidOfMessage, "junkscore", msgJunkScore.get());
   }
   // ### TODO: we really should parse the keywords into space delimited keywords before checking
-  else if (keywords.Find("Junk", CaseInsensitiveCompare) != kNotFound)
+  else if (keywords.Find("Junk", /* ignoreCase = */ true) != kNotFound)
   {
     uint32_t newFlags;
     dbHdr->AndFlags(~nsMsgMessageFlags::New, &newFlags);
     nsAutoCString msgJunkScore;
     msgJunkScore.AppendInt(nsIJunkMailPlugin::IS_SPAM_SCORE);
     mDatabase->SetStringProperty(uidOfMessage, "junkscore", msgJunkScore.get());
   }
   else
@@ -9698,17 +9698,17 @@ NS_IMETHODIMP nsImapMailFolder::GetOffli
              rv = rootFolder->GetFolderWithFlags(nsMsgFolderFlags::Trash,
                                                  getter_AddRefs(subMsgFolder));
           if (labelNames[i].Equals("\"\\\\Spam\""))
              rv = rootFolder->GetFolderWithFlags(nsMsgFolderFlags::Junk,
                                                  getter_AddRefs(subMsgFolder));
           if (labelNames[i].Equals("\"\\\\Sent\""))
              rv = rootFolder->GetFolderWithFlags(nsMsgFolderFlags::SentMail,
                                                  getter_AddRefs(subMsgFolder));
-          if (labelNames[i].Find("[Imap]/", CaseInsensitiveCompare) != kNotFound)
+          if (labelNames[i].Find("[Imap]/", /* ignoreCase = */ true) != kNotFound)
           {
             MsgReplaceSubstring(labelNames[i], "[Imap]/", "");
             imapRootFolder->FindOnlineSubFolder(labelNames[i], getter_AddRefs(subFolder));
             subMsgFolder = do_QueryInterface(subFolder);
           }
           if (!subMsgFolder)
           {
             imapRootFolder->FindOnlineSubFolder(labelNames[i], getter_AddRefs(subFolder));
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -3526,26 +3526,26 @@ nsImapProtocol::FetchMessage(const nsCSt
       {
         char *headersToDL = nullptr;
         char *what = nullptr;
         const char *dbHeaders = (gUseEnvelopeCmd) ? IMAP_DB_HEADERS : IMAP_ENV_AND_DB_HEADERS;
         nsCString arbitraryHeaders;
         GetArbitraryHeadersToDownload(arbitraryHeaders);
         for (uint32_t i = 0; i < mCustomDBHeaders.Length(); i++)
         {
-          if (arbitraryHeaders.Find(mCustomDBHeaders[i], CaseInsensitiveCompare) == kNotFound)
+          if (arbitraryHeaders.Find(mCustomDBHeaders[i], /* ignoreCase = */ true) == kNotFound)
           {
             if (!arbitraryHeaders.IsEmpty())
               arbitraryHeaders.Append(' ');
             arbitraryHeaders.Append(mCustomDBHeaders[i]);
           }
         }
         for (uint32_t i = 0; i < mCustomHeaders.Length(); i++)
         {
-           if (arbitraryHeaders.Find(mCustomHeaders[i], CaseInsensitiveCompare) == kNotFound)
+           if (arbitraryHeaders.Find(mCustomHeaders[i], /* ignoreCase = */ true) == kNotFound)
           {
             if (!arbitraryHeaders.IsEmpty())
               arbitraryHeaders.Append(' ');
             arbitraryHeaders.Append(mCustomHeaders[i]);
           }
         }
         if (arbitraryHeaders.IsEmpty())
           headersToDL = strdup(dbHeaders);
@@ -5015,17 +5015,17 @@ nsImapProtocol::DiscoverMailboxSpec(nsIm
           {
             m_hostSessionList->GetOnlineTrashFolderExistsForHost(
                                   GetImapServerKey(), onlineTrashFolderExists);
           }
         }
 
         // Don't set the Trash flag if not using the Trash model
         if (GetDeleteIsMoveToTrash() && !onlineTrashFolderExists &&
-            adoptedBoxSpec->mAllocatedPathName.Find(m_trashFolderName, CaseInsensitiveCompare) != -1)
+            adoptedBoxSpec->mAllocatedPathName.Find(m_trashFolderName, /* ignoreCase = */ true) != -1)
         {
           bool trashExists = false;
           nsCString trashMatch(CreatePossibleTrashName(nsPrefix));
           nsCString serverTrashName;
           m_runningUrl->AllocateCanonicalPath(trashMatch.get(),
                                               ns->GetDelimiter(),
                                               getter_Copies(serverTrashName));
           if (StringBeginsWith(serverTrashName,
@@ -7754,20 +7754,20 @@ nsCString nsImapProtocol::CreatePossible
   nsCString returnTrash(prefix);
   returnTrash += m_trashFolderName;
   return returnTrash;
 }
 
 bool nsImapProtocol::GetListSubscribedIsBrokenOnServer()
 {
   // This is a workaround for an issue with LIST(SUBSCRIBED) crashing older versions of Zimbra
-  if (GetServerStateParser().GetServerID().Find("\"NAME\" \"Zimbra\"", CaseInsensitiveCompare) != kNotFound) {
+  if (GetServerStateParser().GetServerID().Find("\"NAME\" \"Zimbra\"", /* ignoreCase = */ true) != kNotFound) {
     nsCString serverID(GetServerStateParser().GetServerID());
-    int start = serverID.Find("\"VERSION\" \"", CaseInsensitiveCompare) + 11;
-    int length = serverID.Find("\" ", CaseInsensitiveCompare, start);
+    int start = serverID.Find("\"VERSION\" \"", /* ignoreCase = */ true) + 11;
+    int length = serverID.Find("\" ", true, start);
     const nsDependentCSubstring serverVersionSubstring = Substring(serverID, start, length);
     nsCString serverVersionStr(serverVersionSubstring);
     Version serverVersion(serverVersionStr.get());
     Version sevenTwoThree("7.2.3_");
     Version eightZeroZero("8.0.0_");
     Version eightZeroThree("8.0.3_");
     if ((serverVersion < sevenTwoThree) ||
         ((serverVersion >= eightZeroZero) && (serverVersion < eightZeroThree)))
@@ -7800,17 +7800,17 @@ bool nsImapProtocol::IsExtraSelectNeeded
     ParseString(gForceSelectServersArray[i], ',', forceSelectStringsArray);
     for (uint32_t j = 0; j < forceSelectStringsArray.Length(); j++)
     {
       // Each substring within the server string must be contained in ID string.
       // First un-escape any comma (%2c) or semicolon (%3b) within the substring.
       nsAutoCString unescapedString;
       MsgUnescapeString(forceSelectStringsArray[j], 0, unescapedString);
       if (GetServerStateParser().GetServerID()
-          .Find(unescapedString, CaseInsensitiveCompare) == kNotFound)
+          .Find(unescapedString, /* ignoreCase = */ true) == kNotFound)
       {
         retVal = false;
         break;
       }
     }
     // Matches found for all substrings for the server.
     if (retVal)
       return true;
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -1565,32 +1565,32 @@ int32_t nsPop3Protocol::CapaResponse(nsI
     }
     else
     // see RFC 2449, chapter 6.3
     if (!PL_strncasecmp(line, "SASL", 4) && strlen(line) > 6)
     {
         nsAutoCString responseLine;
         responseLine.Assign(line + 5);
 
-        if (responseLine.Find("PLAIN", CaseInsensitiveCompare) >= 0)
+        if (responseLine.Find("PLAIN", /* ignoreCase = */ true) >= 0)
             SetCapFlag(POP3_HAS_AUTH_PLAIN);
 
-        if (responseLine.Find("LOGIN", CaseInsensitiveCompare) >= 0)
+        if (responseLine.Find("LOGIN", /* ignoreCase = */ true) >= 0)
             SetCapFlag(POP3_HAS_AUTH_LOGIN);
 
-        if (responseLine.Find("GSSAPI", CaseInsensitiveCompare) >= 0)
+        if (responseLine.Find("GSSAPI", /* ignoreCase = */ true) >= 0)
             SetCapFlag(POP3_HAS_AUTH_GSSAPI);
 
-        if (responseLine.Find("CRAM-MD5", CaseInsensitiveCompare) >= 0)
+        if (responseLine.Find("CRAM-MD5", /* ignoreCase = */ true) >= 0)
           SetCapFlag(POP3_HAS_AUTH_CRAM_MD5);
 
-        if (responseLine.Find("NTLM", CaseInsensitiveCompare) >= 0)
+        if (responseLine.Find("NTLM", /* ignoreCase = */ true) >= 0)
           SetCapFlag(POP3_HAS_AUTH_NTLM);
 
-        if (responseLine.Find("MSN", CaseInsensitiveCompare) >= 0)
+        if (responseLine.Find("MSN", /* ignoreCase = */ true) >= 0)
           SetCapFlag(POP3_HAS_AUTH_NTLM|POP3_HAS_AUTH_MSN);
 
         m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
     }
 
     PR_Free(line);
     MOZ_LOG(POP3LOGMODULE, LogLevel::Debug, (POP3LOG("Capability entry processed")));
     return 0;
--- a/mailnews/mime/src/mimedrft.cpp
+++ b/mailnews/mime/src/mimedrft.cpp
@@ -472,18 +472,18 @@ mime_draft_process_attachments(mime_draf
 
   nsMsgAttachmentData         *attachData = NULL, *tmp = NULL;
   nsMsgAttachedFile           *tmpFile = NULL;
 
   //It's possible we must treat the message body as attachment!
   bool bodyAsAttachment = false;
   if (mdd->messageBody &&
       !mdd->messageBody->m_type.IsEmpty() &&
-      mdd->messageBody->m_type.Find("text/html", CaseInsensitiveCompare) == -1 &&
-      mdd->messageBody->m_type.Find("text/plain", CaseInsensitiveCompare) == -1 &&
+      mdd->messageBody->m_type.Find("text/html", /* ignoreCase = */ true) == -1 &&
+      mdd->messageBody->m_type.Find("text/plain", /* ignoreCase = */ true) == -1 &&
       !mdd->messageBody->m_type.LowerCaseEqualsLiteral("text"))
      bodyAsAttachment = true;
 
   if (!mdd->attachments.Length() && !bodyAsAttachment)
     return nullptr;
 
   int32_t totalCount = mdd->attachments.Length();
   if (bodyAsAttachment)
@@ -513,17 +513,17 @@ mime_draft_process_attachments(mime_draf
       if (NS_FAILED(nsMimeNewURI(getter_AddRefs(tmp->m_url), tmpSpec.get(), nullptr)))
         goto FAIL;
 
       if (tmp->m_realName.IsEmpty())
       {
         if (!tmpFile->m_realName.IsEmpty())
           tmp->m_realName = tmpFile->m_realName;
         else {
-          if (tmpFile->m_type.Find(MESSAGE_RFC822, CaseInsensitiveCompare) != -1)
+          if (tmpFile->m_type.Find(MESSAGE_RFC822, /* ignoreCase = */ true) != -1)
             // we have the odd case of processing an e-mail that had an unnamed
             // eml message attached
             tmp->m_realName = "ForwardedMessage.eml";
 
           else
             tmp->m_realName = tmpSpec.get();
         }
       }
@@ -1466,19 +1466,19 @@ mime_parse_stream_complete(nsMIMESession
         }
     }
 
     if (mdd->messageBody)
     {
       MSG_ComposeFormat composeFormat = nsIMsgCompFormat::Default;
       if (!mdd->messageBody->m_type.IsEmpty())
       {
-        if(mdd->messageBody->m_type.Find("text/html", CaseInsensitiveCompare) != -1)
+        if(mdd->messageBody->m_type.Find("text/html", /* ignoreCase = */ true) != -1)
           composeFormat = nsIMsgCompFormat::HTML;
-        else if (mdd->messageBody->m_type.Find("text/plain", CaseInsensitiveCompare) != -1 ||
+        else if (mdd->messageBody->m_type.Find("text/plain", /* ignoreCase = */ true) != -1 ||
                  mdd->messageBody->m_type.LowerCaseEqualsLiteral("text"))
           composeFormat = nsIMsgCompFormat::PlainText;
         else
           //We cannot use this kind of data for the message body! Therefore, move it as attachment
           bodyAsAttachment = true;
       }
       else
         composeFormat = nsIMsgCompFormat::PlainText;
--- a/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mailnews/news/src/nsNNTPProtocol.cpp
@@ -2268,35 +2268,35 @@ void nsNNTPProtocol::ParseHeaderForCance
     if (!colon)
     return;
 
     nsCString value(Substring(header, colon + 1));
     value.StripWhitespace();
 
     switch (header.First()) {
     case 'F': case 'f':
-        if (header.Find("From", CaseInsensitiveCompare) == 0) {
+        if (header.Find("From", /* ignoreCase = */ true) == 0) {
             PR_FREEIF(m_cancelFromHdr);
       m_cancelFromHdr = ToNewCString(value);
         }
         break;
     case 'M': case 'm':
-        if (header.Find("Message-ID", CaseInsensitiveCompare) == 0) {
+        if (header.Find("Message-ID", /* ignoreCase = */ true) == 0) {
             PR_FREEIF(m_cancelID);
       m_cancelID = ToNewCString(value);
         }
         break;
     case 'N': case 'n':
-        if (header.Find("Newsgroups", CaseInsensitiveCompare) == 0) {
+        if (header.Find("Newsgroups", /* ignoreCase = */ true) == 0) {
             PR_FREEIF(m_cancelNewsgroups);
       m_cancelNewsgroups = ToNewCString(value);
         }
         break;
      case 'D': case 'd':
-        if (header.Find("Distributions", CaseInsensitiveCompare) == 0) {
+        if (header.Find("Distributions", /* ignoreCase = */ true) == 0) {
             PR_FREEIF(m_cancelDistribution);
       m_cancelDistribution = ToNewCString(value);
         }
         break;
     }
 
   return;
 }