uriloader/exthandler/moz.build

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
     2 # vim: set filetype=python:
     3 # This Source Code Form is subject to the terms of the Mozilla Public
     4 # License, v. 2.0. If a copy of the MPL was not distributed with this
     5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     7 TEST_DIRS += ['tests']
     9 XPIDL_SOURCES += [
    10     'nsCExternalHandlerService.idl',
    11     'nsIContentDispatchChooser.idl',
    12     'nsIExternalHelperAppService.idl',
    13     'nsIExternalProtocolService.idl',
    14     'nsIExternalSharingAppService.idl',
    15     'nsIExternalURLHandlerService.idl',
    16     'nsIHandlerService.idl',
    17     'nsIHelperAppLauncherDialog.idl',
    18 ]
    20 XPIDL_MODULE = 'exthandler'
    22 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    23     osdir = 'win'
    24     LOCAL_INCLUDES += ['win']
    25 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    26     osdir = 'win'
    27 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
    28     osdir = 'android'
    29 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    30     osdir = 'gonk'
    31 else:
    32     osdir = 'unix'
    34 EXPORTS += [
    35     osdir + '/nsOSHelperAppService.h'
    36 ]
    38 EXPORTS += [
    39     'nsExternalHelperAppService.h',
    40 ]
    42 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
    43     EXPORTS += [ '%s/%s' % (osdir, f) for f in [
    44         'nsExternalSharingAppService.h',
    45         'nsExternalURLHandlerService.h',
    46     ]]
    48 if CONFIG['MOZ_ENABLE_MEEGOTOUCHSHARE']:
    49     EXPORTS += [
    50         osdir + '/nsExternalSharingAppService.h',
    51     ]
    53 EXPORTS.mozilla.dom += [
    54     'ExternalHelperAppChild.h',
    55     'ExternalHelperAppParent.h',
    56 ]
    58 UNIFIED_SOURCES += [
    59     'ExternalHelperAppParent.cpp',
    60     'nsLocalHandlerApp.cpp',
    61     'nsMIMEInfoImpl.cpp',
    62 ]
    64 # These files can't be built in unified mode because they force NSPR logging.
    65 SOURCES += [
    66     'ExternalHelperAppChild.cpp',
    67     'nsExternalHelperAppService.cpp',
    68     'nsExternalProtocolHandler.cpp',
    69 ]
    71 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    72     UNIFIED_SOURCES += [
    73         'mac/nsLocalHandlerAppMac.mm',
    74         'mac/nsMIMEInfoMac.mm',
    75     ]
    76     # These files can't be built in unified mode because they force NSPR logging.
    77     SOURCES += [
    78         'mac/nsOSHelperAppService.mm',
    79     ]
    80 else:
    81     # These files can't be built in unified mode because they force NSPR logging.
    82     SOURCES += [
    83         osdir + '/nsOSHelperAppService.cpp',
    84     ]
    86 if CONFIG['MOZ_ENABLE_GTK']:
    87     UNIFIED_SOURCES += [
    88         'unix/nsGNOMERegistry.cpp',
    89         'unix/nsMIMEInfoUnix.cpp',
    90     ]
    91 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
    92     UNIFIED_SOURCES += [
    93         'android/nsAndroidHandlerApp.cpp',
    94         'android/nsExternalSharingAppService.cpp',
    95         'android/nsExternalURLHandlerService.cpp',
    96         'android/nsMIMEInfoAndroid.cpp',
    97     ]
    98 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
    99     UNIFIED_SOURCES += [
   100         'unix/nsGNOMERegistry.cpp',
   101         'unix/nsMIMEInfoUnix.cpp',
   102     ]
   103 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
   104     # These files can't be built in unified mode because they force NSPR logging.
   105     SOURCES += [
   106         'win/nsMIMEInfoWin.cpp',
   107     ]
   109 if CONFIG['MOZ_ENABLE_DBUS']:
   110     UNIFIED_SOURCES += [
   111         'nsDBusHandlerApp.cpp',
   112     ]
   114 if CONFIG['MOZ_ENABLE_MEEGOTOUCHSHARE']:
   115     UNIFIED_SOURCES += [
   116         'unix/nsMeegoExternalSharingAppService.cpp',
   117     ]
   119 if CONFIG['MOZ_ENABLE_CONTENTACTION']:
   120     UNIFIED_SOURCES += [
   121         'nsContentHandlerApp.cpp',
   122     ]
   124 EXTRA_COMPONENTS += [
   125     'nsHandlerService.js',
   126     'nsHandlerService.manifest',
   127     'nsWebHandlerApp.js',
   128     'nsWebHandlerApp.manifest',
   129 ]
   131 IPDL_SOURCES += [
   132     'PExternalHelperApp.ipdl',
   133 ]
   135 FAIL_ON_WARNINGS = True
   137 include('/ipc/chromium/chromium-config.mozbuild')
   139 FINAL_LIBRARY = 'xul'
   141 LOCAL_INCLUDES += [
   142     '/content/base/src',
   143     '/dom/base',
   144     '/dom/ipc',
   145     '/netwerk/base/src',
   146     '/netwerk/protocol/http',
   147 ]

mercurial