Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | * http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | function testSameVersion() { |
michael@0 | 5 | let mozSettings = window.navigator.mozSettings; |
michael@0 | 6 | let forceSent = false; |
michael@0 | 7 | |
michael@0 | 8 | mozSettings.addObserver("gecko.updateStatus", function statusObserver(setting) { |
michael@0 | 9 | if (!forceSent) { |
michael@0 | 10 | return; |
michael@0 | 11 | } |
michael@0 | 12 | |
michael@0 | 13 | mozSettings.removeObserver("gecko.updateStatus", statusObserver); |
michael@0 | 14 | is(setting.settingValue, "already-latest-version"); |
michael@0 | 15 | cleanUp(); |
michael@0 | 16 | }); |
michael@0 | 17 | |
michael@0 | 18 | sendContentEvent("force-update-check"); |
michael@0 | 19 | forceSent = true; |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | // Update lifecycle callbacks |
michael@0 | 23 | function preUpdate() { |
michael@0 | 24 | testSameVersion(); |
michael@0 | 25 | } |