Skip to content

Commit eede229

Browse files
committed
Bug 752982 - Part 1: Implement captive portal detection service. r=thinker
1 parent 3194bb6 commit eede229

File tree

12 files changed

+558
-0
lines changed

12 files changed

+558
-0
lines changed

b2g/installer/package-manifest.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@
287287
@BINPATH@/components/services-crypto.xpt
288288
#endif
289289
@BINPATH@/components/services-crypto-component.xpt
290+
#ifdef MOZ_SERVICES_CAPTIVEDETECT
291+
@BINPATH@/components/services-captivedetect.xpt
292+
#endif
290293
@BINPATH@/components/shellservice.xpt
291294
@BINPATH@/components/shistory.xpt
292295
@BINPATH@/components/spellchecker.xpt
@@ -493,6 +496,10 @@
493496
@BINPATH@/components/HealthReportComponents.manifest
494497
@BINPATH@/components/HealthReportService.js
495498
#endif
499+
#ifdef MOZ_SERVICES_CAPTIVEDETECT
500+
@BINPATH@/components/CaptivePortalDetectComponents.manifest
501+
@BINPATH@/components/captivedetect.js
502+
#endif
496503
@BINPATH@/components/TelemetryPing.js
497504
@BINPATH@/components/TelemetryPing.manifest
498505
@BINPATH@/components/Webapps.js
@@ -590,6 +597,9 @@
590597
#ifdef MOZ_SERVICES_SYNC
591598
@BINPATH@/defaults/pref/services-sync.js
592599
#endif
600+
#ifdef MOZ_SERVICES_CAPTIVEDETECT
601+
@BINPATH@/defaults/pref/services-captivedetect.js
602+
#endif
593603

594604
; [Layout Engine Resources]
595605
; Style Sheets, Graphics and other Resources used by the layout engine.

browser/installer/package-manifest.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@
284284
@BINPATH@/components/saxparser.xpt
285285
@BINPATH@/components/sessionstore.xpt
286286
@BINPATH@/components/services-crypto-component.xpt
287+
#ifdef MOZ_SERVICES_CAPTIVEDETECT
288+
@BINPATH@/components/services-captivedetect.xpt
289+
#endif
287290
@BINPATH@/components/shellservice.xpt
288291
@BINPATH@/components/shistory.xpt
289292
@BINPATH@/components/spellchecker.xpt
@@ -473,6 +476,10 @@
473476
@BINPATH@/components/SyncComponents.manifest
474477
@BINPATH@/components/Weave.js
475478
#endif
479+
#ifdef MOZ_SERVICES_CAPTIVEDETECT
480+
@BINPATH@/components/CaptivePortalDetectComponents.manifest
481+
@BINPATH@/components/captivedetect.js
482+
#endif
476483
@BINPATH@/components/servicesComponents.manifest
477484
@BINPATH@/components/cryptoComponents.manifest
478485
@BINPATH@/components/TelemetryPing.js

browser/installer/removed-files.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ xpicleanup@BIN_SUFFIX@
976976
defaults/pref/firefox.js
977977
defaults/pref/firefox-l10n.js
978978
defaults/pref/services-sync.js
979+
defaults/pref/services-captivedetect.js
979980
defaults/profile/bookmarks.html
980981
defaults/profile/chrome/userChrome-example.css
981982
defaults/profile/chrome/userContent-example.css

configure.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8374,6 +8374,12 @@ if test -n "$MOZ_SERVICES_SYNC"; then
83748374
AC_DEFINE(MOZ_SERVICES_SYNC)
83758375
fi
83768376

8377+
dnl Build Captive Portal Detector if required
8378+
AC_SUBST(MOZ_SERVICES_CAPTIVEDETECT)
8379+
if test -n "$MOZ_SERVICES_CAPTIVEDETECT"; then
8380+
AC_DEFINE(MOZ_SERVICES_CAPTIVEDETECT)
8381+
fi
8382+
83778383
dnl ========================================================
83788384
if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC" -o "$MOZ_DMD"; then
83798385
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=

mobile/android/installer/package-manifest.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@
210210
@BINPATH@/components/saxparser.xpt
211211
@BINPATH@/components/sessionstore.xpt
212212
@BINPATH@/components/services-crypto-component.xpt
213+
#ifdef MOZ_SERVICES_CAPTIVEDETECT
214+
@BINPATH@/components/services-captivedetect.xpt
215+
#endif
213216
@BINPATH@/components/shellservice.xpt
214217
@BINPATH@/components/shistory.xpt
215218
@BINPATH@/components/spellchecker.xpt
@@ -377,6 +380,11 @@
377380
@BINPATH@/components/HealthReportService.js
378381
#endif
379382

383+
#ifdef MOZ_SERVICES_CAPTIVEDETECT
384+
@BINPATH@/components/CaptivePortalDetectComponents.manifest
385+
@BINPATH@/components/captivedetect.js
386+
#endif
387+
380388
; Modules
381389
@BINPATH@/modules/*
382390

@@ -428,6 +436,10 @@
428436
@BINPATH@/defaults/autoconfig/prefcalls.js
429437
@BINPATH@/defaults/profile/prefs.js
430438

439+
#ifdef MOZ_SERVICES_CAPTIVEDETECT
440+
@BINPATH@/defaults/pref/services-captivedetect.js
441+
#endif
442+
431443
; [Layout Engine Resources]
432444
; Style Sheets, Graphics and other Resources used by the layout engine.
433445
@BINPATH@/res/EditorOverride.css

services/Makefile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@ ifdef MOZ_SERVICES_SYNC
3030
PARALLEL_DIRS += sync
3131
endif
3232

33+
ifdef MOZ_SERVICES_CAPTIVEDETECT
34+
PARALLEL_DIRS += captivedetect
35+
endif
36+
3337
include $(topsrcdir)/config/rules.mk
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
component {d9cd00ba-aa4d-47b1-8792-b1fe0cd35060} captivedetect.js
2+
contract @mozilla.org/services/captive-detector;1 {d9cd00ba-aa4d-47b1-8792-b1fe0cd35060}

services/captivedetect/Makefile.in

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
3+
# You can obtain one at http://mozilla.org/MPL/2.0/.
4+
5+
DEPTH = @DEPTH@
6+
topsrcdir = @top_srcdir@
7+
srcdir = @srcdir@
8+
VPATH = @srcdir@
9+
relativesrcdir = @relativesrcdir@
10+
11+
include $(DEPTH)/config/autoconf.mk
12+
13+
MODULE = services-captivedetect
14+
XPIDL_MODULE = services-captivedetect
15+
16+
XPIDLSRCS = \
17+
nsICaptivePortalDetector.idl \
18+
$(NULL)
19+
20+
EXTRA_COMPONENTS = \
21+
CaptivePortalDetectComponents.manifest \
22+
captivedetect.js \
23+
$(NULL)
24+
25+
PREF_JS_EXPORTS := $(srcdir)/services-captivedetect.js
26+
27+
include $(topsrcdir)/config/rules.mk

0 commit comments

Comments
 (0)