2010-04-29 13:11:23 -07:00
|
|
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
|
|
|
|
2010-04-28 09:23:36 -07:00
|
|
|
function install(data, reason) {
|
2011-06-15 11:12:53 -07:00
|
|
|
Components.utils.import(data.resourceURI.spec + "version.jsm");
|
|
|
|
Services.prefs.setIntPref("bootstraptest.installed_version", VERSION);
|
2010-11-05 09:20:14 -07:00
|
|
|
Services.prefs.setIntPref("bootstraptest.install_reason", reason);
|
2011-06-15 11:12:53 -07:00
|
|
|
Components.utils.unload(data.resourceURI.spec + "version.jsm");
|
2010-04-29 13:11:23 -07:00
|
|
|
}
|
|
|
|
|
2010-04-28 09:23:36 -07:00
|
|
|
function startup(data, reason) {
|
2011-06-15 11:12:53 -07:00
|
|
|
Components.utils.import(data.resourceURI.spec + "version.jsm");
|
|
|
|
Services.prefs.setIntPref("bootstraptest.active_version", VERSION);
|
2010-04-28 09:23:36 -07:00
|
|
|
Services.prefs.setIntPref("bootstraptest.startup_reason", reason);
|
2011-06-15 11:12:53 -07:00
|
|
|
Components.utils.unload(data.resourceURI.spec + "version.jsm");
|
2010-04-28 09:23:36 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function shutdown(data, reason) {
|
|
|
|
Services.prefs.setIntPref("bootstraptest.active_version", 0);
|
|
|
|
Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason);
|
|
|
|
}
|
|
|
|
|
|
|
|
function uninstall(data, reason) {
|
|
|
|
Services.prefs.setIntPref("bootstraptest.installed_version", 0);
|
2010-11-05 09:20:14 -07:00
|
|
|
Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason);
|
2010-04-29 13:11:23 -07:00
|
|
|
}
|