Skip to content

Commit

Permalink
Bug 1420802 - Remove NetworkLinkService from offline check. r=tcsc
Browse files Browse the repository at this point in the history
Summary: Remove NetworkLinkService from offline check.

Reviewers: tcsc

Reviewed By: tcsc

Bug #: 1420802

Differential Revision: https://phabricator.services.mozilla.com/D300

UltraBlame original commit: 6fe2f6075e2280eb3872242a6aa509a8849fad87
  • Loading branch information
marco-c committed Oct 2, 2019
1 parent 59092f1 commit 20cfae6
Showing 1 changed file with 23 additions and 259 deletions.
282 changes: 23 additions & 259 deletions services/sync/modules/policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,34 +315,6 @@ defineLazyServiceGetter
(
this
"
NetworkLinkService
"
"
mozilla
.
org
/
network
/
network
-
link
-
service
;
1
"
"
nsINetworkLinkService
"
)
;
XPCOMUtils
.
defineLazyServiceGetter
(
this
"
CaptivePortalService
"
"
Expand Down Expand Up @@ -613,33 +585,6 @@ idle
=
false
;
/
/
That
flag
will
be
flipped
if
we
resume
from
sleep
and
the
network
link
/
/
is
down
.
this
.
shouldSyncWhenLinkComesUp
=
false
;
this
.
hasIncomingItems
Expand Down Expand Up @@ -1049,121 +994,8 @@ online
/
/
/
There
is
We
also
a
network
link
service
that
tracks
if
there
is
any
network
/
/
adaptor
connected
.
Sadly
this
too
is
unreliable
-
eg
an
adaptor
on
a
/
/
local
private
network
(
eg
a
VMWare
local
network
)
may
be
technically
/
/
connected
but
still
unable
to
hit
the
public
network
-
but
it
should
/
/
only
be
unreliable
in
terms
of
indicating
we
online
when
we
aren
'
t
but
/
/
not
indicate
we
are
offline
when
we
are
online
.
/
/
/
/
Finally
if
both
of
these
services
don
'
t
tell
us
we
'
re
offline
for
sure
/
/
we
'
ll
ask
the
captive
Expand All @@ -1184,37 +1016,30 @@ portal
/
/
/
With
these
3
services
combined
we
believe
we
can
avoid
all
false
positives
We
don
'
t
check
on
the
NetworkLinkService
however
because
it
gave
us
/
/
and
make
a
good
guess
on
whether
an
user
is
online
or
not
false
positives
in
most
cases
the
past
in
a
vm
environment
.
try
{
Expand All @@ -1227,12 +1052,6 @@ io
offline
|
|
!
NetworkLinkService
.
isLinkUp
|
|
CaptivePortalService
.
state
Expand Down Expand Up @@ -1782,11 +1601,6 @@ changed
:
if
(
this
.
shouldSyncWhenLinkComesUp
&
&
!
this
.
Expand All @@ -1802,16 +1616,7 @@ debug
"
Network
link
is
up
for
the
first
time
since
we
woke
-
looks
up
.
Syncing
Expand All @@ -1821,12 +1626,6 @@ Syncing
;
this
.
shouldSyncWhenLinkComesUp
=
false
;
this
.
scheduleNextSync
(
0
Expand All @@ -1837,8 +1636,6 @@ topic
}
)
;
break
;
}
/
/
Expand Down Expand Up @@ -3373,33 +3170,6 @@ topic
)
;
}
else
{
this
.
_log
.
debug
(
"
Offline
will
sync
when
link
comes
up
.
"
)
;
this
.
shouldSyncWhenLinkComesUp
=
true
;
}
}
}
)
Expand All @@ -3419,12 +3189,6 @@ success
:
this
.
shouldSyncWhenLinkComesUp
=
false
;
this
.
_log
.
debug
Expand Down

0 comments on commit 20cfae6

Please sign in to comment.