Bug 1488115 - Part 4: Remove nsUTF8ConverterService; r=hsivonen
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 03 Sep 2018 10:39:00 -0400
changeset 482835 c334f246f6ee1f23255353d47328b7781de0653f
parent 482834 7b3729ae7c46417575efeac5d21a2430f6093c0f
child 482836 00859e3fa59af5d8699ecbf3a20c0e98f4e8f54d
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewershsivonen
bugs1488115
milestone63.0a1
Bug 1488115 - Part 4: Remove nsUTF8ConverterService; r=hsivonen Differential Revision: https://phabricator.services.mozilla.com/D4875
intl/uconv/moz.build
intl/uconv/nsIUTF8ConverterService.idl
intl/uconv/nsUConvCID.h
intl/uconv/nsUConvModule.cpp
intl/uconv/nsUTF8ConverterService.cpp
intl/uconv/nsUTF8ConverterService.h
netwerk/mime/nsMIMEHeaderParamImpl.cpp
--- a/intl/uconv/moz.build
+++ b/intl/uconv/moz.build
@@ -4,31 +4,28 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['tests']
 
 XPIDL_SOURCES += [
     'nsIScriptableUConv.idl',
     'nsITextToSubURI.idl',
-    'nsIUTF8ConverterService.idl',
 ]
 
 XPIDL_MODULE = 'uconv'
 
 EXPORTS += [
     'nsConverterInputStream.h',
-    'nsUConvCID.h',
 ]
 
 UNIFIED_SOURCES += [
     'nsConverterInputStream.cpp',
     'nsConverterOutputStream.cpp',
     'nsScriptableUConv.cpp',
     'nsTextToSubURI.cpp',
     'nsUConvModule.cpp',
-    'nsUTF8ConverterService.cpp'
 ]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
deleted file mode 100644
--- a/intl/uconv/nsIUTF8ConverterService.idl
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:expandtab:shiftwidth=4:tabstop=4:
- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-[scriptable, uuid(249f52a3-2599-4b00-ba40-0481364831a2)]
-interface nsIUTF8ConverterService : nsISupports
-{
-};
-
deleted file mode 100644
--- a/intl/uconv/nsUConvCID.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:expandtab:shiftwidth=2:tabstop=2:
- **/
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// I am taking the first step in the hope that  this file will  become 'the'
-// repository of #defines for CID's and CONTRACTID's of implementations of
-// all interfaces in nsUConvModule and be included by any file that wants
-// to refers to one or more of implementations by CID/CONTRACTID.
-// see bug 162765 comment #33.
-
-// {2b026890-5a2e-4981-ada2-a600358947b4}
-#define NS_UTF8CONVERTERSERVICE_CID { 0x2b026890, 0x5a2e, 0x4981, \
-                            { 0xad, 0xa2, 0xa6, 0x00, 0x35, 0x89, 0x47, 0xb4 } }
-#define NS_UTF8CONVERTERSERVICE_CONTRACTID "@mozilla.org/intl/utf8converterservice;1"
-
--- a/intl/uconv/nsUConvModule.cpp
+++ b/intl/uconv/nsUConvModule.cpp
@@ -1,50 +1,44 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "mozilla/ModuleUtils.h"
 
 #include "nsTextToSubURI.h"
-#include "nsUTF8ConverterService.h"
 #include "nsConverterInputStream.h"
 #include "nsConverterOutputStream.h"
 #include "nsScriptableUConv.h"
 #include "nsIOutputStream.h"
 #include "nsITextToSubURI.h"
-#include "nsUConvCID.h"
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextToSubURI)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ConverterService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterInputStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterOutputStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnicodeConverter)
 
 NS_DEFINE_NAMED_CID(NS_TEXTTOSUBURI_CID);
 NS_DEFINE_NAMED_CID(NS_CONVERTERINPUTSTREAM_CID);
 NS_DEFINE_NAMED_CID(NS_CONVERTEROUTPUTSTREAM_CID);
 NS_DEFINE_NAMED_CID(NS_ISCRIPTABLEUNICODECONVERTER_CID);
-NS_DEFINE_NAMED_CID(NS_UTF8CONVERTERSERVICE_CID);
 
 static const mozilla::Module::CIDEntry kUConvCIDs[] = {
   { &kNS_TEXTTOSUBURI_CID, false, nullptr, nsTextToSubURIConstructor },
   { &kNS_CONVERTERINPUTSTREAM_CID, false, nullptr, nsConverterInputStreamConstructor },
   { &kNS_CONVERTEROUTPUTSTREAM_CID, false, nullptr, nsConverterOutputStreamConstructor },
   { &kNS_ISCRIPTABLEUNICODECONVERTER_CID, false, nullptr, nsScriptableUnicodeConverterConstructor },
-  { &kNS_UTF8CONVERTERSERVICE_CID, false, nullptr, nsUTF8ConverterServiceConstructor },
   { nullptr },
 };
 
 static const mozilla::Module::ContractIDEntry kUConvContracts[] = {
   { NS_ITEXTTOSUBURI_CONTRACTID, &kNS_TEXTTOSUBURI_CID },
   { NS_CONVERTERINPUTSTREAM_CONTRACTID, &kNS_CONVERTERINPUTSTREAM_CID },
   { "@mozilla.org/intl/converter-output-stream;1", &kNS_CONVERTEROUTPUTSTREAM_CID },
   { NS_ISCRIPTABLEUNICODECONVERTER_CONTRACTID, &kNS_ISCRIPTABLEUNICODECONVERTER_CID },
-  { NS_UTF8CONVERTERSERVICE_CONTRACTID, &kNS_UTF8CONVERTERSERVICE_CID },
   { nullptr }
 };
 
 static const mozilla::Module kUConvModule = {
   mozilla::Module::kVersion,
   kUConvCIDs,
   kUConvContracts,
 };
deleted file mode 100644
--- a/intl/uconv/nsUTF8ConverterService.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:expandtab:shiftwidth=2:tabstop=4:
- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#include "nsString.h"
-#include "nsUTF8ConverterService.h"
-
-using namespace mozilla;
-
-NS_IMPL_ISUPPORTS(nsUTF8ConverterService, nsIUTF8ConverterService)
-
deleted file mode 100644
--- a/intl/uconv/nsUTF8ConverterService.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef nsUTF8ConverterService_h__
-#define nsUTF8ConverterService_h__
-
-#include "nsIUTF8ConverterService.h"
-
-//==============================================================
-
-class nsUTF8ConverterService: public nsIUTF8ConverterService {
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIUTF8CONVERTERSERVICE
-
-  nsUTF8ConverterService() {}
-
-private:
-  virtual ~nsUTF8ConverterService() {}
-};
-
-#endif // nsUTF8ConverterService_h__
-
--- a/netwerk/mime/nsMIMEHeaderParamImpl.cpp
+++ b/netwerk/mime/nsMIMEHeaderParamImpl.cpp
@@ -8,17 +8,16 @@
 #include "prprf.h"
 #include "plstr.h"
 #include "plbase64.h"
 #include "nsCRT.h"
 #include "nsMemory.h"
 #include "nsTArray.h"
 #include "nsCOMPtr.h"
 #include "nsEscape.h"
-#include "nsUConvCID.h"
 #include "nsIServiceManager.h"
 #include "nsMIMEHeaderParamImpl.h"
 #include "nsReadableUtils.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsError.h"
 #include "mozilla/Encoding.h"
 
 using mozilla::Encoding;