Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | Components.utils.import("resource://gre/modules/Services.jsm"); |
michael@0 | 2 | |
michael@0 | 3 | // Test steps chain from pref observers on *_reason, |
michael@0 | 4 | // so always set that last |
michael@0 | 5 | function install(data, reason) { |
michael@0 | 6 | Components.utils.import(data.resourceURI.spec + "version.jsm"); |
michael@0 | 7 | Services.prefs.setIntPref("bootstraptest.installed_version", VERSION); |
michael@0 | 8 | Services.prefs.setIntPref("bootstraptest.install_oldversion", data.oldVersion); |
michael@0 | 9 | Components.utils.unload(data.resourceURI.spec + "version.jsm"); |
michael@0 | 10 | Services.prefs.setIntPref("bootstraptest.install_reason", reason); |
michael@0 | 11 | } |
michael@0 | 12 | |
michael@0 | 13 | function startup(data, reason) { |
michael@0 | 14 | Components.utils.import(data.resourceURI.spec + "version.jsm"); |
michael@0 | 15 | Services.prefs.setIntPref("bootstraptest.active_version", VERSION); |
michael@0 | 16 | Services.prefs.setIntPref("bootstraptest.startup_oldversion", data.oldVersion); |
michael@0 | 17 | Components.utils.unload(data.resourceURI.spec + "version.jsm"); |
michael@0 | 18 | Services.prefs.setIntPref("bootstraptest.startup_reason", reason); |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | function shutdown(data, reason) { |
michael@0 | 22 | Services.prefs.setIntPref("bootstraptest.active_version", 0); |
michael@0 | 23 | Services.prefs.setIntPref("bootstraptest.shutdown_newversion", data.newVersion); |
michael@0 | 24 | Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | function uninstall(data, reason) { |
michael@0 | 28 | Services.prefs.setIntPref("bootstraptest.installed_version", 0); |
michael@0 | 29 | Services.prefs.setIntPref("bootstraptest.uninstall_newversion", data.newVersion); |
michael@0 | 30 | Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason); |
michael@0 | 31 | } |