Bug 651622 - Remove WinCE code from browser/*; r=dolske
authorEd Morley <bmo@edmorley.co.uk>
Fri, 22 Apr 2011 10:38:41 +0200
changeset 68420 157b8fe56dd627f2128d5adddd4673868b48f9f8
parent 68419 e1b06f3256c8e68b29e7cbae0e4d0c382b42aa0b
child 68421 f0a03fc3247dc9a7246705e5303788c8cc87eece
push idunknown
push userunknown
push dateunknown
reviewersdolske
bugs651622
milestone6.0a1
Bug 651622 - Remove WinCE code from browser/*; r=dolske
browser/app/Makefile.in
browser/app/profile/firefox.js
browser/base/Makefile.in
browser/base/content/browser-menubar.inc
browser/base/content/browser.js
browser/base/content/browser.xul
browser/components/Makefile.in
browser/components/build/Makefile.in
browser/components/build/nsModule.cpp
browser/components/nsBrowserGlue.js
browser/components/shell/content/setDesktopBackground.xul
browser/components/shell/public/Makefile.in
browser/components/shell/src/Makefile.in
browser/components/shell/src/nsWindowsShellService.cpp
browser/components/shell/src/nsWindowsShellService.h
browser/installer/package-manifest.in
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -79,17 +79,17 @@ endif
 
 LIBS += $(JEMALLOC_LIBS)
 
 ifdef LIBXUL_SDK
 include $(topsrcdir)/config/rules.mk
 else
 # Build a binary bootstrapping with XRE_main
 
-ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
+ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
 PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
 else
 PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
 endif
 
 CPPSRCS = nsBrowserApp.cpp
 
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
@@ -156,26 +156,18 @@ endif
 # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
 NSDISTMODE = copy
 
 include $(topsrcdir)/config/config.mk
 
 ifdef _MSC_VER
 # Always enter a Windows program through wmain, whether or not we're
 # a console application.
-ifdef WINCE
-WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
-else
 WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
 endif
-endif
-
-ifdef WINCE
-EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,corelibc)
-endif
 
 ifdef BUILD_STATIC_LIBS
 include $(topsrcdir)/config/static-config.mk
 
 EXTRA_DEPS	+= \
 	$(STATIC_EXTRA_DEPS) \
 	$(NULL)
 DEFINES		+= $(STATIC_DEFINES)
@@ -184,17 +176,17 @@ EXTRA_DSO_LIBS	+= $(STATIC_EXTRA_DSO_LIB
 EXTRA_LIBS	+= $(STATIC_EXTRA_LIBS)
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
 OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
 endif
 
-ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
+ifeq ($(OS_ARCH),WINNT)
 RCINCLUDE = splash.rc
 ifndef GNU_CC
 RCFLAGS += -DMOZ_PHOENIX -I$(srcdir)
 else
 RCFLAGS += -DMOZ_PHOENIX --include-dir $(srcdir)
 endif
 ifdef BUILD_STATIC_LIBS
 RCFLAGS += -DMOZ_STATIC_BUILD
@@ -243,17 +235,17 @@ ifndef GNU_CC
 LDFLAGS += /HEAP:0x40000
 ifeq ($(OS_TEST),x86_64)
 # set stack to 2MB on x64 build.  See bug 582910
 LDFLAGS += -STACK:2097152
 endif
 endif
 endif
 
-ifneq (,$(filter-out OS2 WINNT WINCE,$(OS_ARCH)))
+ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
 
 $(MOZ_APP_NAME):: $(topsrcdir)/build/unix/mozilla.in $(GLOBAL_DEPS)
 	cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \
 		-e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@
 	chmod +x $@
 
 libs:: $(MOZ_APP_NAME)
 	$(INSTALL) $< $(DIST)/bin
@@ -285,23 +277,16 @@ endif
 
 ifdef MOZ_SPLASHSCREEN
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 libs::
 	$(INSTALL) $(IFLAGS1) $(DIST)/branding/splash.bmp $(DIST)/bin
 endif
 endif
 
-ifdef WINCE
-ifdef MOZ_FASTSTART
-libs::
-	cp -f $(DIST)/bin/faststartstub.exe $(DIST)/bin/$(MOZ_APP_NAME)faststart.exe
-endif
-endif
-
 libs:: $(srcdir)/profile/prefs.js
 	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
 
 libs:: $(srcdir)/blocklist.xml
 	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -303,22 +303,17 @@ pref("browser.urlbar.default.behavior", 
 // Number of milliseconds to wait for the http headers (and thus
 // the Content-Disposition filename) before giving up and falling back to 
 // picking a filename without that info in hand so that the user sees some
 // feedback from their action.
 pref("browser.download.saveLinkAsFilenameTimeout", 1000);
 
 pref("browser.download.useDownloadDir", true);
 
-#ifdef WINCE
-pref("browser.download.folderList", 2);
-pref("browser.download.dir", "\\Storage Card");
-#else
 pref("browser.download.folderList", 1);
-#endif
 pref("browser.download.manager.showAlertOnComplete", true);
 pref("browser.download.manager.showAlertInterval", 2000);
 pref("browser.download.manager.retention", 2);
 pref("browser.download.manager.showWhenStarting", true);
 pref("browser.download.manager.closeWhenDone", false);
 pref("browser.download.manager.focusWhenStarting", false);
 pref("browser.download.manager.flashCount", 2);
 pref("browser.download.manager.addToRecentDocs", true);
@@ -366,21 +361,17 @@ pref("browser.sessionhistory.max_entries
 pref("browser.link.open_newwindow", 3);
 
 // 0: no restrictions - divert everything
 // 1: don't divert window.open at all
 // 2: don't divert window.open with features
 pref("browser.link.open_newwindow.restriction", 2);
 
 // Tabbed browser
-#ifndef WINCE
 pref("browser.tabs.autoHide", false);
-#else
-pref("browser.tabs.autoHide", true);
-#endif
 pref("browser.tabs.closeWindowWithLastTab", true);
 pref("browser.tabs.insertRelatedAfterCurrent", true);
 pref("browser.tabs.warnOnClose", true);
 pref("browser.tabs.warnOnOpen", true);
 pref("browser.tabs.maxOpenBeforeWarn", 15);
 pref("browser.tabs.loadInBackground", true);
 pref("browser.tabs.opentabfor.middleclick", true);
 pref("browser.tabs.loadDivertedInBackground", false);
@@ -420,21 +411,16 @@ pref("browser.bookmarks.max_backups",   
 
 // Scripts & Windows prefs
 pref("dom.disable_open_during_load",              true);
 pref("javascript.options.showInConsole",          true);
 #ifdef DEBUG
 pref("general.warnOnAboutConfig",                 false);
 #endif
 
-#ifdef WINCE
-// Set the threshold higher to avoid some slow script warnings
-pref("dom.max_script_run_time",                   20);
-#endif
-
 // This is the pref to control the location bar, change this to true to 
 // force this - this makes the origin of popup windows more obvious to avoid
 // spoofing. We would rather not do it by default because it affects UE for web
 // applications, but without it there isn't a really good way to prevent chrome
 // spoofing, see bug 337344
 pref("dom.disable_window_open_feature.location",  true);
 // prevent JS from setting status messages
 pref("dom.disable_window_status_change",          true);
@@ -770,21 +756,17 @@ pref("browser.EULA.version", 3);
 pref("browser.rights.version", 3);
 pref("browser.rights.3.shown", false);
 
 #ifdef DEBUG
 // Don't show the about:rights notification in debug builds.
 pref("browser.rights.override", true);
 #endif
 
-#ifdef WINCE
-pref("browser.sessionstore.resume_from_crash", false);
-#else
 pref("browser.sessionstore.resume_from_crash", true);
-#endif
 pref("browser.sessionstore.resume_session_once", false);
 
 // minimal interval between two save operations in milliseconds
 pref("browser.sessionstore.interval", 15000);
 // maximum amount of POSTDATA to be saved in bytes per history entry (-1 = all of it)
 // (NB: POSTDATA will be saved either entirely or not at all)
 pref("browser.sessionstore.postdata", 0);
 // on which sites to save text data, POSTDATA and cookies
@@ -894,49 +876,16 @@ pref("browser.privatebrowsing.dont_promp
 // Don't try to alter this pref, it'll be reset the next time you use the
 // bookmarking dialog
 pref("browser.bookmarks.editDialog.firstEditField", "namePicker");
 
 // base url for the wifi geolocation network provider
 pref("geo.wifi.uri", "https://www.google.com/loc/json");
 pref("geo.wifi.protocol", 0);
 
-#ifdef WINCE
-
-// tweak awesomebar -- increase the delay until a search happens.
-pref("browser.urlbar.delay", 250);
-
-// disable safe browsing, due to perf hit
-pref("browser.safebrowsing.enabled", false);
-pref("browser.safebrowsing.malware.enabled", false);
-
-// don't check for default browser
-pref("browser.shell.checkDefaultBrowser", false);
-
-// disable bfcache for memory
-pref("browser.sessionhistory.max_total_viewers", 0);
-
-pref("browser.sessionhistory.optimize_eviction", false);
-
-// tweak default content sink prefs
-pref("content.sink.interactive_deflect_count", 10); /* default 0 */
-pref("content.sink.perf_deflect_count", 50); /* default 200 */
-pref("content.sink.interactive_parse_time", 5000); /* default 3000 */
-pref("content.sink.perf_parse_time", 150000); /* default 360000 */
-pref("content.sink.pending_event_mode", 0); /* default 1 */
-pref("content.sink.event_probe_rate", 1); /* default 1 */
-pref("content.sink.interactive_time", 750000); /* default 750000 */
-pref("content.sink.initial_perf_time", 500000); /* default 2000000 */
-pref("content.sink.enable_perf_mode", 0); /* default 0; 0 == switch, 1 == stay interactive, 2 == stay perf */
-
-// Write sessionstore.js less often
-pref("browser.sessionstore.interval", 60000);
-
-#endif /* WINCE */
-
 // Whether to use a panel that looks like an OS X sheet for customization
 #ifdef XP_MACOSX
 pref("toolbar.customization.usesheet", true);
 #else
 pref("toolbar.customization.usesheet", false);
 #endif
 
 // The default for this pref reflects whether the build is capable of IPC.
@@ -949,28 +898,26 @@ pref("dom.ipc.plugins.enabled.i386.javap
 pref("dom.ipc.plugins.enabled.i386.javaappletplugin.plugin", true);
 // x86_64 ipc preferences
 pref("dom.ipc.plugins.enabled.x86_64", true);
 #else
 pref("dom.ipc.plugins.enabled", true);
 #endif
 
 #ifdef XP_WIN
-#ifndef WINCE
 pref("browser.taskbar.previews.enable", false);
 pref("browser.taskbar.previews.max", 20);
 pref("browser.taskbar.previews.cachetime", 5);
 pref("browser.taskbar.lists.enabled", true);
 pref("browser.taskbar.lists.frequent.enabled", true);
 pref("browser.taskbar.lists.recent.enabled", false);
 pref("browser.taskbar.lists.maxListItemCount", 7);
 pref("browser.taskbar.lists.tasks.enabled", true);
 pref("browser.taskbar.lists.refreshInSeconds", 120);
 #endif
-#endif
 
 #ifdef MOZ_SERVICES_SYNC
 // The sync engines to use.
 pref("services.sync.registerEngines", "Bookmarks,Form,History,Password,Prefs,Tab");
 // Preferences to be synced by default
 pref("services.sync.prefs.sync.accessibility.blockautorefresh", true);
 pref("services.sync.prefs.sync.accessibility.browsewithcaret", true);
 pref("services.sync.prefs.sync.accessibility.typeaheadfind", true);
--- a/browser/base/Makefile.in
+++ b/browser/base/Makefile.in
@@ -70,20 +70,18 @@ DEFINES += \
 	-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
 	$(NULL)
 
 ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DHAVE_SHELL_SERVICE=1
 endif
 
 ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
-ifneq ($(OS_ARCH),WINCE)
 DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
 endif
-endif
 
 ifneq (,$(filter windows, $(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DCAN_DRAW_IN_TITLEBAR=1
 endif
 
 ifneq (,$(filter windows gtk2, $(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DMENUBAR_CAN_AUTOHIDE=1
 endif
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
@@ -86,17 +86,16 @@
                           accesskey="&savePageCmd.accesskey;"
                           key="key_savePage"
                           command="Browser:SavePage"/>
                 <menuitem id="menu_sendLink"
                           label="&sendPageCmd.label;"
                           accesskey="&sendPageCmd.accesskey;"
                           command="Browser:SendLink"/>
                 <menuseparator/>
-#ifndef WINCE
                 <menuitem id="menu_printSetup"
                           label="&printSetupCmd.label;"
                           accesskey="&printSetupCmd.accesskey;"
                           command="cmd_pageSetup"/>
 #ifndef XP_MACOSX
                 <menuitem id="menu_printPreview"
                           label="&printPreviewCmd.label;"
                           accesskey="&printPreviewCmd.accesskey;"
@@ -110,17 +109,16 @@
                 <menuseparator/>
                 <menuitem id="menu_import"
                           label="&import.label;"
                           accesskey="&import.accesskey;"
                           oncommand="BrowserImport();"/>
 #ifndef XP_MACOSX
                 <menuseparator/>
 #endif
-#endif
                 <menuitem id="goOfflineMenuitem"
                           label="&goOfflineCmd.label;"
                           accesskey="&goOfflineCmd.accesskey;"
                           type="checkbox"
                           observes="workOfflineMenuitemState"
                           oncommand="BrowserOffline.toggleOfflineStatus();"/>
                 <menuitem id="menu_FileQuitItem"
 #ifdef XP_WIN
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -183,34 +183,32 @@ let gInitialPages = [
 #include browser-tabview.js
 
 #ifdef MOZ_SERVICES_SYNC
 #include browser-syncui.js
 #endif
 
 XPCOMUtils.defineLazyGetter(this, "Win7Features", function () {
 #ifdef XP_WIN
-#ifndef WINCE
   const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
   if (WINTASKBAR_CONTRACTID in Cc &&
       Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
     let temp = {};
     Cu.import("resource://gre/modules/WindowsPreviewPerTab.jsm", temp);
     let AeroPeek = temp.AeroPeek;
     return {
       onOpenWindow: function () {
         AeroPeek.onOpenWindow(window);
       },
       onCloseWindow: function () {
         AeroPeek.onCloseWindow(window);
       }
     };
   }
 #endif
-#endif
   return null;
 });
 
 #ifdef MOZ_CRASHREPORTER
 XPCOMUtils.defineLazyServiceGetter(this, "gCrashReporter",
                                    "@mozilla.org/xre/app-info;1",
                                    "nsICrashReporter");
 #endif
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -462,21 +462,17 @@
 </vbox>
 #endif
 
 <deck flex="1" id="tab-view-deck">
 <vbox flex="1" id="browser-panel">
 
   <toolbox id="navigator-toolbox"
            defaultmode="icons" mode="icons"
-#ifdef WINCE
-           defaulticonsize="small" iconsize="small"
-#else
            iconsize="large"
-#endif
            tabsontop="true"
            persist="tabsontop">
     <!-- Menu -->
     <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
              defaultset="menubar-items"
              mode="icons" iconsize="small" defaulticonsize="small"
              lockiconsize="true"
 #ifdef MENUBAR_CAN_AUTOHIDE
@@ -494,23 +490,18 @@
       <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
       <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
 #endif
     </toolbar>
 
     <toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
              toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
              fullscreentoolbar="true" mode="icons" customizable="true"
-#ifdef WINCE
-             iconsize="small" defaulticonsize="small"
-             defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,navigator-throbber,fullscreenflex,window-controls"
-#else
              iconsize="large"
              defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,fullscreenflex,window-controls"
-#endif
              context="toolbar-context-menu">
 
       <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
                    context="backForwardMenu" removable="true"
                    title="&backForwardItem.title;">
         <toolbarbutton id="back-button" class="toolbarbutton-1"
                        label="&backCmd.label;"
                        command="Browser:BackOrBackDuplicate"
--- a/browser/components/Makefile.in
+++ b/browser/components/Makefile.in
@@ -65,27 +65,22 @@ PARALLEL_DIRS = \
   feeds \
   places \
   preferences \
   privatebrowsing \
   search \
   sessionstore \
   shell \
   sidebar \
+  migration \
   $(NULL)
 
-ifndef WINCE
-PARALLEL_DIRS += migration
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows) 
-ifndef WINCE
 PARALLEL_DIRS += wintaskbar
 endif
-endif
 
 ifdef MOZ_SAFE_BROWSING
 PARALLEL_DIRS += safebrowsing
 endif
 
 ifdef ENABLE_TESTS
 DIRS += test
 endif
--- a/browser/components/build/Makefile.in
+++ b/browser/components/build/Makefile.in
@@ -49,23 +49,20 @@ SHARED_LIBRARY_LIBS = \
 	$(NULL)
 
 ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
 SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
 endif
 
 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib)
 
-# migration requires mozreg, which doesn't build on WINCE; only include
-# it on non-CE
-ifndef WINCE
+# migration requires mozreg
 LOCAL_INCLUDES += -I$(srcdir)/../migration/src
 SHARED_LIBRARY_LIBS += ../migration/src/$(LIB_PREFIX)migration_s.$(LIB_SUFFIX)
 EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX)
-endif
 
 # This has to come after the above chunk, because mozreg_s has dependencies on
 # stuff in MOZ_COMPONENT_LIBS.
 EXTRA_DSO_LDOPTS += \
 	$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
 	$(MOZ_COMPONENT_LIBS) \
 	$(NULL)
 
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -44,18 +44,16 @@
 #if defined(XP_WIN)
 #include "nsWindowsShellService.h"
 #elif defined(XP_MACOSX)
 #include "nsMacShellService.h"
 #elif defined(MOZ_WIDGET_GTK2)
 #include "nsGNOMEShellService.h"
 #endif
 
-#ifndef WINCE
-
 #include "nsProfileMigrator.h"
 #include "nsDogbertProfileMigrator.h"
 #if !defined(XP_OS2)
 #include "nsOperaProfileMigrator.h"
 #endif
 #include "nsPhoenixProfileMigrator.h"
 #include "nsSeamonkeyProfileMigrator.h"
 #if defined(XP_WIN) && !defined(__MINGW32__)
@@ -63,18 +61,16 @@
 #elif defined(XP_MACOSX)
 #include "nsSafariProfileMigrator.h"
 #include "nsOmniWebProfileMigrator.h"
 #include "nsMacIEProfileMigrator.h"
 #include "nsCaminoProfileMigrator.h"
 #include "nsICabProfileMigrator.h"
 #endif
 
-#endif // WINCE
-
 #include "rdf.h"
 #include "nsFeedSniffer.h"
 #include "AboutRedirector.h"
 #include "nsIAboutModule.h"
 
 #include "nsPrivateBrowsingServiceWrapper.h"
 #include "nsNetCID.h"
 
@@ -86,18 +82,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(Directory
 #if defined(XP_WIN)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
 #elif defined(XP_MACOSX)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
 #elif defined(MOZ_WIDGET_GTK2)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
 #endif
 
-#ifndef WINCE
-
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDogbertProfileMigrator)
 #if !defined(XP_OS2)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
 #endif
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPhoenixProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSeamonkeyProfileMigrator)
 #if defined(XP_WIN) && !defined(__MINGW32__)
@@ -105,31 +99,28 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfi
 #elif defined(XP_MACOSX)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafariProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsOmniWebProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacIEProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCaminoProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsICabProfileMigrator)
 #endif
 
-#endif
-
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrivateBrowsingServiceWrapper, Init)
 
 NS_DEFINE_NAMED_CID(NS_BROWSERDIRECTORYPROVIDER_CID);
 #if defined(XP_WIN)
 NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
 #elif defined(MOZ_WIDGET_GTK2)
 NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
 #endif
 NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID);
 NS_DEFINE_NAMED_CID(NS_BROWSER_ABOUT_REDIRECTOR_CID);
-#ifndef WINCE
 NS_DEFINE_NAMED_CID(NS_FIREFOX_PROFILEMIGRATOR_CID);
 #if defined(XP_WIN) && !defined(__MINGW32__)
 NS_DEFINE_NAMED_CID(NS_WINIEPROFILEMIGRATOR_CID);
 #elif defined(XP_MACOSX)
 NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_SAFARIPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_MACIEPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_OMNIWEBPROFILEMIGRATOR_CID);
@@ -137,29 +128,27 @@ NS_DEFINE_NAMED_CID(NS_CAMINOPROFILEMIGR
 NS_DEFINE_NAMED_CID(NS_ICABPROFILEMIGRATOR_CID);
 #endif
 #if !defined(XP_OS2)
 NS_DEFINE_NAMED_CID(NS_OPERAPROFILEMIGRATOR_CID);
 #endif
 NS_DEFINE_NAMED_CID(NS_DOGBERTPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_PHOENIXPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEMIGRATOR_CID);
-#endif /* WINCE */
 NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
 
 static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
     { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, NULL, DirectoryProviderConstructor },
 #if defined(XP_WIN)
     { &kNS_SHELLSERVICE_CID, false, NULL, nsWindowsShellServiceConstructor },
 #elif defined(MOZ_WIDGET_GTK2)
     { &kNS_SHELLSERVICE_CID, false, NULL, nsGNOMEShellServiceConstructor },
 #endif
     { &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
     { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
-#ifndef WINCE
     { &kNS_FIREFOX_PROFILEMIGRATOR_CID, false, NULL, nsProfileMigratorConstructor },
 #if defined(XP_WIN) && !defined(__MINGW32__)
     { &kNS_WINIEPROFILEMIGRATOR_CID, false, NULL, nsIEProfileMigratorConstructor },
 #elif defined(XP_MACOSX)
     { &kNS_SHELLSERVICE_CID, false, NULL, nsMacShellServiceConstructor },
     { &kNS_SAFARIPROFILEMIGRATOR_CID, false, NULL, nsSafariProfileMigratorConstructor },
     { &kNS_MACIEPROFILEMIGRATOR_CID, false, NULL, nsMacIEProfileMigratorConstructor },
     { &kNS_OMNIWEBPROFILEMIGRATOR_CID, false, NULL, nsOmniWebProfileMigratorConstructor },
@@ -167,17 +156,16 @@ static const mozilla::Module::CIDEntry k
     { &kNS_ICABPROFILEMIGRATOR_CID, false, NULL, nsICabProfileMigratorConstructor },
 #endif
 #if !defined(XP_OS2)
     { &kNS_OPERAPROFILEMIGRATOR_CID, false, NULL, nsOperaProfileMigratorConstructor },
 #endif
     { &kNS_DOGBERTPROFILEMIGRATOR_CID, false, NULL, nsDogbertProfileMigratorConstructor },
     { &kNS_PHOENIXPROFILEMIGRATOR_CID, false, NULL, nsPhoenixProfileMigratorConstructor },
     { &kNS_SEAMONKEYPROFILEMIGRATOR_CID, false, NULL, nsSeamonkeyProfileMigratorConstructor },
-#endif /* WINCE */
     { &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID, false, NULL, nsPrivateBrowsingServiceWrapperConstructor },
     { NULL }
 };
 
 static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
     { NS_BROWSERDIRECTORYPROVIDER_CONTRACTID, &kNS_BROWSERDIRECTORYPROVIDER_CID },
 #if defined(XP_WIN)
     { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
@@ -193,17 +181,16 @@ static const mozilla::Module::ContractID
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "rights", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
 #ifdef MOZ_SERVICES_SYNC
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "sync-tabs", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
 #endif
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
-#ifndef WINCE
     { NS_PROFILEMIGRATOR_CONTRACTID, &kNS_FIREFOX_PROFILEMIGRATOR_CID },
 #if defined(XP_WIN) && !defined(__MINGW32__)
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "ie", &kNS_WINIEPROFILEMIGRATOR_CID },
 #elif defined(XP_MACOSX)
     { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "safari", &kNS_SAFARIPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "macie", &kNS_MACIEPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "omniweb", &kNS_OMNIWEBPROFILEMIGRATOR_CID },
@@ -211,17 +198,16 @@ static const mozilla::Module::ContractID
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "icab", &kNS_ICABPROFILEMIGRATOR_CID },
 #endif
 #if !defined(XP_OS2)
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "opera", &kNS_OPERAPROFILEMIGRATOR_CID },
 #endif
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "dogbert", &kNS_DOGBERTPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "phoenix", &kNS_PHOENIXPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey", &kNS_SEAMONKEYPROFILEMIGRATOR_CID },
-#endif /* WINCE */
     { NS_PRIVATE_BROWSING_SERVICE_CONTRACTID, &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID },
     { NULL }
 };
 
 static const mozilla::Module::CategoryEntry kBrowserCategories[] = {
     { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "browser-directory-provider", NS_BROWSERDIRECTORYPROVIDER_CONTRACTID },
     { NS_CONTENT_SNIFFER_CATEGORY, "Feed Sniffer", NS_FEEDSNIFFER_CONTRACTID },
     { NULL }
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -365,45 +365,29 @@ BrowserGlue.prototype = {
     }
 
     Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
   },
 
   // the first browser window has finished initializing
   _onFirstWindowLoaded: function BG__onFirstWindowLoaded() {
 #ifdef XP_WIN
-#ifndef WINCE
     // For windows seven, initialize the jump list module.
     const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
     if (WINTASKBAR_CONTRACTID in Cc &&
         Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
       let temp = {};
       Cu.import("resource://gre/modules/WindowsJumpLists.jsm", temp);
       temp.WinTaskbarJumpList.startup();
     }
 #endif
-#endif
   },
 
   // profile shutdown handler (contains profile cleanup routines)
   _onProfileShutdown: function BG__onProfileShutdown() {
-#ifdef MOZ_UPDATER
-#ifdef WINCE
-    // If there's a pending update, clear cache to free up disk space.
-    try {
-      let um = Cc["@mozilla.org/updates/update-manager;1"].
-               getService(Ci.nsIUpdateManager);
-      if (um.activeUpdate && um.activeUpdate.state == "pending") {
-        let cacheService = Cc["@mozilla.org/network/cache-service;1"].
-                           getService(Ci.nsICacheService);
-        cacheService.evictEntries(Ci.nsICache.STORE_ANYWHERE);
-      }
-    } catch (e) { }
-#endif
-#endif
     this._shutdownPlaces();
     this._sanitizer.onShutdown();
   },
 
   // Browser startup complete. All initial windows have opened.
   _onBrowserStartup: function BG__onBrowserStartup() {
     // Show about:rights notification, if needed.
     if (this._shouldShowRights())
--- a/browser/components/shell/content/setDesktopBackground.xul
+++ b/browser/components/shell/content/setDesktopBackground.xul
@@ -72,19 +72,17 @@
     <hbox align="center">
       <label value="&position.label;"/>
       <menulist id="menuPosition"
                 label="&position.label;" 
                 oncommand="gSetBackground.updatePosition();">
         <menupopup>
           <menuitem label="&center.label;"  value="CENTER"/>
           <menuitem label="&tile.label;"    value="TILE"/>
-#ifndef WINCE
           <menuitem label="&stretch.label;" value="STRETCH"/>
-#endif
         </menupopup>
       </menulist>
       <spacer flex="1"/>
       <label value="&color.label;"/>
       <colorpicker id="desktopColor"
                    type="button" 
                    onchange="gSetBackground.updateColor(this.color);"/> 
     </hbox>
--- a/browser/components/shell/public/Makefile.in
+++ b/browser/components/shell/public/Makefile.in
@@ -42,17 +42,17 @@ VPATH   = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = shellservice
 XPIDL_MODULE  = shellservice
 
 XPIDLSRCS = nsIShellService.idl
 
-ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
+ifeq ($(OS_ARCH),WINNT)
 XPIDLSRCS += nsIWindowsShellService.idl
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 XPIDLSRCS += nsIMacShellService.idl
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/shell/src/Makefile.in
+++ b/browser/components/shell/src/Makefile.in
@@ -45,17 +45,17 @@ include $(DEPTH)/config/autoconf.mk
 MODULE = shellservice
 FORCE_STATIC_LIB = 1
 FORCE_USE_PIC = 1
 ifndef MOZ_MEMORY
 USE_STATIC_LIBS = 1
 endif
 
 
-ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
+ifeq ($(OS_ARCH),WINNT)
 CPPSRCS = nsWindowsShellService.cpp
 else
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 CPPSRCS = nsMacShellService.cpp
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT), gtk2)
 CPPSRCS = nsGNOMEShellService.cpp
 endif
--- a/browser/components/shell/src/nsWindowsShellService.cpp
+++ b/browser/components/shell/src/nsWindowsShellService.cpp
@@ -86,21 +86,17 @@
 #define REG_SUCCEEDED(val) \
   (val == ERROR_SUCCESS)
 
 #define REG_FAILED(val) \
   (val != ERROR_SUCCESS)
 
 #define NS_TASKBAR_CONTRACTID "@mozilla.org/windows-taskbar;1"
 
-#ifndef WINCE
 NS_IMPL_ISUPPORTS2(nsWindowsShellService, nsIWindowsShellService, nsIShellService)
-#else
-NS_IMPL_ISUPPORTS1(nsWindowsShellService, nsIShellService)
-#endif
 
 static nsresult
 OpenKeyForReading(HKEY aKeyRoot, const nsAString& aKeyName, HKEY* aKey)
 {
   const nsString &flatName = PromiseFlatString(aKeyName);
 
   DWORD res = ::RegOpenKeyExW(aKeyRoot, flatName.get(), 0, KEY_READ, aKey);
   switch (res) {
@@ -110,43 +106,16 @@ OpenKeyForReading(HKEY aKeyRoot, const n
     return NS_ERROR_FILE_ACCESS_DENIED;
   case ERROR_FILE_NOT_FOUND:
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   return NS_OK;
 }
 
-#ifdef WINCE
-static nsresult
-OpenKeyForWriting(HKEY aStartKey, const nsAString& aKeyName, HKEY* aKey)
-{
-  const nsString &flatName = PromiseFlatString(aKeyName);
-
-  DWORD dwDisp = 0;
-  DWORD res = ::RegCreateKeyExW(aStartKey, flatName.get(), 0, NULL,
-                                0, KEY_READ | KEY_WRITE, NULL, aKey,
-                                &dwDisp);
-  switch (res) {
-  case ERROR_SUCCESS:
-    break;
-  case ERROR_ACCESS_DENIED:
-    return NS_ERROR_FILE_ACCESS_DENIED;
-  case ERROR_FILE_NOT_FOUND:
-    res = ::RegCreateKeyExW(aStartKey, flatName.get(), 0, NULL,
-                            0, KEY_READ | KEY_WRITE, NULL, aKey,
-                            NULL);
-    if (res != ERROR_SUCCESS)
-      return NS_ERROR_FILE_ACCESS_DENIED;
-  }
-
-  return NS_OK;
-}
-#endif
-
 ///////////////////////////////////////////////////////////////////////////////
 // Default Browser Registry Settings
 //
 // The setting of these values are made by an external binary since writing
 // these values may require elevation.
 //
 // - File Extension Mappings
 //   -----------------------
@@ -212,73 +181,47 @@ OpenKeyForWriting(HKEY aStartKey, const 
 //
 
 typedef struct {
   char* keyName;
   char* valueName;
   char* valueData;
 } SETTING;
 
-#ifndef WINCE
 #define APP_REG_NAME L"Firefox"
 #define CLS_HTML "FirefoxHTML"
 #define CLS_URL "FirefoxURL"
 #define CPL_DESKTOP L"Control Panel\\Desktop"
 #define VAL_OPEN "\"%APPPATH%\" -requestPending -osint -url \"%1\""
 #define VAL_FILE_ICON "%APPPATH%,1"
-#else
-#define CPL_DESKTOP L"ControlPanel\\Desktop"
-#define VAL_OPEN "\"%APPPATH%\" -osint -url \"%1\""
-#define VAL_FILE_ICON "%APPPATH%,-2"
-#endif
-
 #define DI "\\DefaultIcon"
 #define SOP "\\shell\\open\\command"
 
-
 #define MAKE_KEY_NAME1(PREFIX, MID) \
   PREFIX MID
 
 // The DefaultIcon registry key value should never be used when checking if
 // Firefox is the default browser for file handlers since other applications
 // (e.g. MS Office) may modify the DefaultIcon registry key value to add Icon
 // Handlers. see http://msdn2.microsoft.com/en-us/library/aa969357.aspx for
 // more info.
 static SETTING gSettings[] = {
-#ifndef WINCE
   // File Handler Class
   { MAKE_KEY_NAME1(CLS_HTML, SOP), "", VAL_OPEN },
 
   // Protocol Handler Class - for Vista and above
   { MAKE_KEY_NAME1(CLS_URL, SOP), "", VAL_OPEN },
-#else
-  { MAKE_KEY_NAME1("FTP", DI), "", VAL_FILE_ICON },
-  { MAKE_KEY_NAME1("FTP", SOP), "", VAL_OPEN },
-
-  // File handlers for Windows CE
-  { MAKE_KEY_NAME1("bmpfile", DI), "", VAL_FILE_ICON },
-  { MAKE_KEY_NAME1("bmpfile", SOP), "", VAL_OPEN },
-  { MAKE_KEY_NAME1("giffile", DI), "", VAL_FILE_ICON },
-  { MAKE_KEY_NAME1("giffile", SOP), "", VAL_OPEN },
-  { MAKE_KEY_NAME1("jpegfile", DI), "", VAL_FILE_ICON },
-  { MAKE_KEY_NAME1("jpegfile", SOP), "", VAL_OPEN },
-  { MAKE_KEY_NAME1("pngfile", DI), "", VAL_FILE_ICON },
-  { MAKE_KEY_NAME1("pngfile", SOP), "", VAL_OPEN },
-  { MAKE_KEY_NAME1("htmlfile", DI), "", VAL_FILE_ICON },
-  { MAKE_KEY_NAME1("htmlfile", SOP), "", VAL_OPEN },
-#endif
 
   // Protocol Handlers
   { MAKE_KEY_NAME1("HTTP", DI),    "", VAL_FILE_ICON },
   { MAKE_KEY_NAME1("HTTP", SOP),   "", VAL_OPEN },
   { MAKE_KEY_NAME1("HTTPS", DI),   "", VAL_FILE_ICON },
   { MAKE_KEY_NAME1("HTTPS", SOP),  "", VAL_OPEN }
 };
 
-#if !defined(WINCE)
 nsresult
 GetHelperPath(nsAutoString& aPath)
 {
   nsresult rv;
   nsCOMPtr<nsIProperties> directoryService = 
     do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -308,22 +251,20 @@ LaunchHelper(nsAutoString& aPath)
 
   if (!ok)
     return NS_ERROR_FAILURE;
 
   CloseHandle(pi.hProcess);
   CloseHandle(pi.hThread);
   return NS_OK;
 }
-#endif // !defined(WINCE)
 
 NS_IMETHODIMP
 nsWindowsShellService::ShortcutMaintenance()
 {
-#if !defined(WINCE)
   nsresult rv;
 
   // Launch helper.exe so it can update the application user model ids on
   // shortcuts in the user's taskbar and start menu. This keeps older pinned
   // shortcuts grouped correctly after major updates. Note, we also do this
   // through the upgrade installer script, however, this is the only place we
   // have a chance to trap links created by users who do control the install/
   // update process of the browser.
@@ -383,23 +324,18 @@ nsWindowsShellService::ShortcutMaintenan
 
   nsAutoString appHelperPath;
   if (NS_FAILED(GetHelperPath(appHelperPath)))
     return NS_ERROR_UNEXPECTED;
 
   appHelperPath.AppendLiteral(" /UpdateShortcutAppUserModelIds");
 
   return LaunchHelper(appHelperPath);
-#else
-  NS_NOTREACHED("ShortcutMaintenance not implemented on wince!");
-  return NS_OK;
-#endif // !defined(WINCE)
 }
 
-#ifndef WINCE
 PRBool
 nsWindowsShellService::IsDefaultBrowserVista(PRBool* aIsDefaultBrowser)
 {
 #if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
   IApplicationAssociationRegistration* pAAR;
   
   HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
                                 NULL,
@@ -413,17 +349,16 @@ nsWindowsShellService::IsDefaultBrowserV
                                     aIsDefaultBrowser);
 
     pAAR->Release();
     return PR_TRUE;
   }
 #endif  
   return PR_FALSE;
 }
-#endif
 
 NS_IMETHODIMP
 nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck,
                                         PRBool* aIsDefaultBrowser)
 {
   // If this is the first browser window, maintain internal state that we've
   // checked this session (so that subsequent window opens don't show the 
   // default browser dialog).
@@ -434,22 +369,20 @@ nsWindowsShellService::IsDefaultBrowser(
   SETTING* end = gSettings + sizeof(gSettings)/sizeof(SETTING);
 
   *aIsDefaultBrowser = PR_TRUE;
 
   PRUnichar exePath[MAX_BUF];
   if (!::GetModuleFileNameW(0, exePath, MAX_BUF))
     return NS_ERROR_FAILURE;
 
-#ifndef WINCE
   // Convert the path to a long path since GetModuleFileNameW returns the path
   // that was used to launch Firefox which is not necessarily a long path.
   if (!::GetLongPathNameW(exePath, exePath, MAX_BUF))
     return NS_ERROR_FAILURE;
-#endif
 
   nsAutoString appLongPath(exePath);
 
   nsresult rv;
   PRUnichar currValue[MAX_BUF];
   for (settings = gSettings; settings < end; ++settings) {
     NS_ConvertUTF8toUTF16 dataLongPath(settings->valueData);
     NS_ConvertUTF8toUTF16 key(settings->keyName);
@@ -473,126 +406,40 @@ nsWindowsShellService::IsDefaultBrowser(
     if (REG_FAILED(res) ||
         !dataLongPath.Equals(currValue, CaseInsensitiveCompare)) {
       // Key wasn't set, or was set to something other than our registry entry
       *aIsDefaultBrowser = PR_FALSE;
       return NS_OK;
     }
   }
 
-#ifndef WINCE
   // Only check if Firefox is the default browser on Vista if the previous
   // checks show that Firefox is the default browser.
   if (*aIsDefaultBrowser)
     IsDefaultBrowserVista(aIsDefaultBrowser);
-#endif
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers)
 {
-#ifndef WINCE
   nsAutoString appHelperPath;
   if (NS_FAILED(GetHelperPath(appHelperPath)))
     return NS_ERROR_FAILURE;
 
   if (aForAllUsers) {
     appHelperPath.AppendLiteral(" /SetAsDefaultAppGlobal");
   } else {
     appHelperPath.AppendLiteral(" /SetAsDefaultAppUser");
   }
 
   return LaunchHelper(appHelperPath);
-#else
-  SETTING* settings;
-  SETTING* end = gSettings + sizeof(gSettings)/sizeof(SETTING);
-
-  PRUnichar exePath[MAX_BUF];
-  if (!::GetModuleFileNameW(0, exePath, MAX_BUF))
-    return NS_ERROR_FAILURE;
-
-  nsAutoString appLongPath(exePath);
-
-  // The .png registry key isn't present by default so also add Content Type.
-  SetRegKey(NS_LITERAL_STRING(".png"), EmptyString(),
-            NS_LITERAL_STRING("pngfile"));
-  SetRegKey(NS_LITERAL_STRING(".png"), NS_LITERAL_STRING("Content Type"),
-            NS_LITERAL_STRING("image/png"));
-
-  // Set these keys to their default value for a clean install in case another
-  // app has changed these keys.
-  SetRegKey(NS_LITERAL_STRING(".htm"), EmptyString(),
-            NS_LITERAL_STRING("htmlfile"));
-  SetRegKey(NS_LITERAL_STRING(".html"), EmptyString(),
-            NS_LITERAL_STRING("htmlfile"));
-  SetRegKey(NS_LITERAL_STRING(".bmp"), EmptyString(),
-            NS_LITERAL_STRING("bmpfile"));
-  SetRegKey(NS_LITERAL_STRING(".gif"), EmptyString(),
-            NS_LITERAL_STRING("giffile"));
-  SetRegKey(NS_LITERAL_STRING(".jpe"), EmptyString(),
-            NS_LITERAL_STRING("jpegfile"));
-  SetRegKey(NS_LITERAL_STRING(".jpg"), EmptyString(),
-            NS_LITERAL_STRING("jpegfile"));
-  SetRegKey(NS_LITERAL_STRING(".jpeg"), EmptyString(),
-            NS_LITERAL_STRING("jpegfile"));
-
-  for (settings = gSettings; settings < end; ++settings) {
-    NS_ConvertUTF8toUTF16 dataLongPath(settings->valueData);
-    NS_ConvertUTF8toUTF16 key(settings->keyName);
-    NS_ConvertUTF8toUTF16 value(settings->valueName);
-    PRInt32 offset = dataLongPath.Find("%APPPATH%");
-    dataLongPath.Replace(offset, 9, appLongPath);
-    SetRegKey(key, value, dataLongPath);
-  }
-  // On Windows CE RegFlushKey can negatively impact performance if there are a
-  // lot of pending writes to the HKEY_CLASSES_ROOT registry hive but it is
-  // necessary to save the values in the case where the user performs a hard
-  // power off of the device.
-  ::RegFlushKey(HKEY_CLASSES_ROOT);
-#endif
-
-  return NS_OK;
 }
 
-#ifdef WINCE
-void
-nsWindowsShellService::SetRegKey(const nsString& aKeyName,
-                                 const nsString& aValueName,
-                                 const nsString& aValue)
-{
-  PRUnichar buf[MAX_BUF];
-  DWORD len = sizeof buf;
-
-  HKEY theKey;
-  nsresult rv = OpenKeyForWriting(HKEY_CLASSES_ROOT, aKeyName, &theKey);
-  if (NS_FAILED(rv))
-    return;
-
-  // Get the current value.
-  DWORD res = ::RegQueryValueExW(theKey, PromiseFlatString(aValueName).get(),
-                                 NULL, NULL, (LPBYTE)buf, &len);
-
-  // Set the new value if it doesn't exist or it is different than the current
-  // value.
-  nsAutoString current(buf);
-  if (REG_FAILED(res) || !current.Equals(aValue)) {
-    const nsString &flatValue = PromiseFlatString(aValue);
-
-    ::RegSetValueExW(theKey, PromiseFlatString(aValueName).get(),
-                     0, REG_SZ, (const BYTE *)flatValue.get(),
-                     (flatValue.Length() + 1) * sizeof(PRUnichar));
-  }
-
-  // Close the key we opened.
-  ::RegCloseKey(theKey);
-}
-#endif
-
 NS_IMETHODIMP
 nsWindowsShellService::GetShouldCheckDefaultBrowser(PRBool* aResult)
 {
   // If we've already checked, the browser has been started and this is a 
   // new window open, and we don't want to check again.
   if (mCheckedThisSession) {
     *aResult = PR_FALSE;
     return NS_OK;
@@ -763,17 +610,16 @@ nsWindowsShellService::SetDesktopBackgro
      PRBool result = PR_FALSE;
      DWORD  dwDisp = 0;
      HKEY   key;
      // Try to create/open a subkey under HKCU.
      DWORD res = ::RegCreateKeyExW(HKEY_CURRENT_USER, CPL_DESKTOP,
                                    0, NULL, REG_OPTION_NON_VOLATILE,
                                    KEY_WRITE, NULL, &key, &dwDisp);
     if (REG_SUCCEEDED(res)) {
-#ifndef WINCE
       PRUnichar tile[2], style[2];
       switch (aPosition) {
         case BACKGROUND_TILE:
           tile[0] = '1';
           style[0] = '1';
           break;
         case BACKGROUND_CENTER:
           tile[0] = '0';
@@ -790,35 +636,19 @@ nsWindowsShellService::SetDesktopBackgro
       // The size is always 3 unicode characters.
       PRInt32 size = 3 * sizeof(PRUnichar);
       ::RegSetValueExW(key, L"TileWallpaper",
                        0, REG_SZ, (const BYTE *)tile, size);
       ::RegSetValueExW(key, L"WallpaperStyle",
                        0, REG_SZ, (const BYTE *)style, size);
       ::SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, (PVOID)path.get(),
                               SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
-#else
-      DWORD tile = (aPosition == BACKGROUND_TILE);
-      ::RegSetValueExW(key, L"Tile",
-                       0, REG_DWORD, (const BYTE *)&tile, sizeof(DWORD));
-      // On WinCE SPI_SETDESKWALLPAPER isn't available, so set the registry
-      // entry ourselves and then broadcast UI change
-      PRInt32 size = (path.Length() + 1) * sizeof(PRUnichar);
-      ::RegSetValueExW(key, L"Wallpaper",
-                       0, REG_SZ, (const BYTE *)path.get(), size);
-      ::SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, NULL, 0);
-#endif
 
       // Close the key we opened.
       ::RegCloseKey(key);
-
-#ifdef WINCE
-      // Ensure that the writes are flushed in case of hard reboot
-      ::RegFlushKey(HKEY_CURRENT_USER);
-#endif
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::OpenApplication(PRInt32 aApplication)
 {
@@ -934,19 +764,16 @@ nsWindowsShellService::SetDesktopBackgro
   int aParameters[2] = { COLOR_BACKGROUND, COLOR_DESKTOP };
   BYTE r = (aColor >> 16);
   BYTE g = (aColor << 16) >> 24;
   BYTE b = (aColor << 24) >> 24;
   COLORREF colors[2] = { RGB(r,g,b), RGB(r,g,b) };
 
   ::SetSysColors(sizeof(aParameters) / sizeof(int), aParameters, colors);
 
-  // SetSysColors is persisting across sessions on Windows CE, so no need to
-  // write to registry
-#ifndef WINCE
   PRBool result = PR_FALSE;
   DWORD  dwDisp = 0;
   HKEY   key;
   // Try to create/open a subkey under HKCU.
   DWORD rv = ::RegCreateKeyExW(HKEY_CURRENT_USER,
                                L"Control Panel\\Colors", 0, NULL,
                                REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL,
                                &key, &dwDisp);
@@ -958,21 +785,19 @@ nsWindowsShellService::SetDesktopBackgro
 
     ::RegSetValueExW(key, L"Background",
                      0, REG_SZ, (const BYTE *)backColor.get(),
                      (backColor.Length() + 1) * sizeof(PRUnichar));
   }
   
   // Close the key we opened.
   ::RegCloseKey(key);
-#endif
   return NS_OK;
 }
 
-#ifndef WINCE
 NS_IMETHODIMP
 nsWindowsShellService::GetUnreadMailCount(PRUint32* aCount)
 {
   *aCount = 0;
 
   HKEY accountKey;
   if (GetMailAccountKey(&accountKey)) {
     DWORD type, unreadCount;
@@ -1022,17 +847,16 @@ nsWindowsShellService::GetMailAccountKey
       break;
   }
   while (1);
 
   // Close the key we opened.
   ::RegCloseKey(mailKey);
   return PR_FALSE;
 }
-#endif
 
 NS_IMETHODIMP
 nsWindowsShellService::OpenApplicationWithURI(nsILocalFile* aApplication,
                                               const nsACString& aURI)
 {
   nsresult rv;
   nsCOMPtr<nsIProcess> process = 
     do_CreateInstance("@mozilla.org/process/util;1", &rv);
--- a/browser/components/shell/src/nsWindowsShellService.h
+++ b/browser/components/shell/src/nsWindowsShellService.h
@@ -41,40 +41,28 @@
 
 #include "nscore.h"
 #include "nsStringAPI.h"
 #include "nsIWindowsShellService.h"
 
 #include <windows.h>
 #include <ole2.h>
 
-#ifndef WINCE
 class nsWindowsShellService : public nsIWindowsShellService
-#else
-class nsWindowsShellService : public nsIShellService
-#endif
 {
 public:
   nsWindowsShellService() : mCheckedThisSession(PR_FALSE) {}; 
   virtual ~nsWindowsShellService() {};
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISHELLSERVICE
-#ifndef WINCE
   NS_DECL_NSIWINDOWSSHELLSERVICE
-#endif
 
 protected:
-#ifndef WINCE
   PRBool    IsDefaultBrowserVista(PRBool* aIsDefaultBrowser);
 
   PRBool    GetMailAccountKey(HKEY* aResult);
-#else
-  void      SetRegKey(const nsString& aKeyName,
-                      const nsString& aValueName,
-                      const nsString& aValue);
-#endif
 
 private:
   PRBool    mCheckedThisSession;
 };
 
 #endif // nswindowsshellservice_h____
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -32,20 +32,18 @@
 @BINPATH@/defaults/profile/bookmarks.html
 @BINPATH@/defaults/profile/localstore.rdf
 @BINPATH@/defaults/profile/mimeTypes.rdf
 @BINPATH@/defaults/profile/chrome/*
 @BINPATH@/update.locale
 @BINPATH@/updater.ini
 @BINPATH@/dictionaries/*
 #ifdef XP_WIN32
-#ifndef WINCE
 @BINPATH@/uninstall/helper.exe
 #endif
-#endif
 
 [xpcom]
 @BINPATH@/dependentlibs.list
 #ifndef MOZ_STATIC_JS
 @BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
 #endif
 @BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
@@ -57,19 +55,17 @@
 #else
 @BINPATH@/@DLL_PREFIX@xul@DLL_SUFFIX@
 #endif
 #ifdef XP_MACOSX
 @BINPATH@/@MOZ_CHILD_PROCESS_NAME@.app/
 #else
 @BINPATH@/@MOZ_CHILD_PROCESS_NAME@
 #endif
-#ifdef WINCE
-@BINPATH@/mozce_shunt.dll
-#elifdef XP_WIN32
+#ifdef XP_WIN32
 #ifndef MOZ_MEMORY
 #if _MSC_VER == 1400
 @BINPATH@/Microsoft.VC80.CRT.manifest
 @BINPATH@/msvcm80.dll
 @BINPATH@/msvcp80.dll
 @BINPATH@/msvcr80.dll
 #elif _MSC_VER == 1500
 @BINPATH@/Microsoft.VC90.CRT.manifest
@@ -195,19 +191,17 @@
 @BINPATH@/components/layout_forms.xpt
 #ifdef NS_PRINTING
 @BINPATH@/components/layout_printing.xpt
 #endif
 @BINPATH@/components/layout_xul_tree.xpt
 @BINPATH@/components/layout_xul.xpt
 @BINPATH@/components/locale.xpt
 @BINPATH@/components/lwbrk.xpt
-#ifndef WINCE
 @BINPATH@/components/migration.xpt
-#endif
 @BINPATH@/components/mimetype.xpt
 @BINPATH@/components/mozfind.xpt
 @BINPATH@/components/necko_about.xpt
 @BINPATH@/components/necko_cache.xpt
 @BINPATH@/components/necko_cookie.xpt
 @BINPATH@/components/necko_dns.xpt
 @BINPATH@/components/necko_file.xpt
 @BINPATH@/components/necko_ftp.xpt
@@ -558,33 +552,14 @@ bin/libfreebl_32int64_3.so
 #endif
 
 ; [Extensions]
 ;
 #ifdef MOZ_ENABLE_GNOMEVFS
 bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
 #endif
 
-; [ActiveX]
-#ifdef WINCE
-#ifndef MOZ_NO_ACTIVEX_SUPPORT
-@BINPATH@/components/nsAxSecurityPolicy.js
-@BINPATH@/@PREF_DIR@/activex.js
-@BINPATH@/plugins/npmozax.dll
-@BINPATH@/plugins/nsIMozAxPlugin.xpt
-#endif
-#endif
-
-; [FastStart]
-#ifdef WINCE
-#ifdef MOZ_FASTSTART
-@BINPATH@/firefoxfaststart.exe
-@BINPATH@/components/FastStartup.manifest
-@BINPATH@/components/FastStartup.js
-#endif
-#endif
-
 ; [OS/2]
 #ifdef XP_OS2
 @BINPATH@/MozSounds.cmd
 @BINPATH@/*.xqs
 @BINPATH@/components/*.xqs
 #endif