Bug 477908 - Set a smaller value for DOWNLOAD_BACKGROUND_INTERVAL for non official builds. r=mconnor

This commit is contained in:
Robert Strong 2009-02-15 23:34:56 -08:00
Родитель 8568e7fb79
Коммит 8c67fd5f6a
4 изменённых файлов: 13 добавлений и 3 удалений

Просмотреть файл

@ -3,6 +3,9 @@ pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERS
// The time interval between checks for a new version (in seconds) // The time interval between checks for a new version (in seconds)
// nightly=8 hours, official=24 hours // nightly=8 hours, official=24 hours
pref("app.update.interval", 28800); pref("app.update.interval", 28800);
// The time interval between the downloading of mar file chunks in the
// background (in seconds)
pref("app.update.download.backgroundInterval", 60);
// URL user can browse to manually if for some reason all update installation // URL user can browse to manually if for some reason all update installation
// attempts fail. // attempts fail.
pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/"); pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/");

Просмотреть файл

@ -3,6 +3,9 @@ pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERS
// The time interval between checks for a new version (in seconds) // The time interval between checks for a new version (in seconds)
// nightly=8 hours, official=24 hours // nightly=8 hours, official=24 hours
pref("app.update.interval", 28800); pref("app.update.interval", 28800);
// The time interval between the downloading of mar file chunks in the
// background (in seconds)
pref("app.update.download.backgroundInterval", 60);
// URL user can browse to manually if for some reason all update installation // URL user can browse to manually if for some reason all update installation
// attempts fail. // attempts fail.
pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/"); pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/");

Просмотреть файл

@ -3,6 +3,9 @@ pref("startup.homepage_welcome_url","http://%LOCALE%.www.mozilla.com/%LOCALE%/%A
// Interval: Time between checks for a new version (in seconds) // Interval: Time between checks for a new version (in seconds)
// nightly=6 hours, official=24 hours // nightly=6 hours, official=24 hours
pref("app.update.interval", 86400); pref("app.update.interval", 86400);
// The time interval between the downloading of mar file chunks in the
// background (in seconds)
pref("app.update.download.backgroundInterval", 600);
// URL user can browse to manually if for some reason all update installation // URL user can browse to manually if for some reason all update installation
// attempts fail. // attempts fail.
pref("app.update.url.manual", "http://%LOCALE%.www.mozilla.com/%LOCALE%/%APP%/"); pref("app.update.url.manual", "http://%LOCALE%.www.mozilla.com/%LOCALE%/%APP%/");

Просмотреть файл

@ -62,6 +62,7 @@ const PREF_APP_UPDATE_URL = "app.update.url";
const PREF_APP_UPDATE_URL_OVERRIDE = "app.update.url.override"; const PREF_APP_UPDATE_URL_OVERRIDE = "app.update.url.override";
const PREF_APP_UPDATE_URL_DETAILS = "app.update.url.details"; const PREF_APP_UPDATE_URL_DETAILS = "app.update.url.details";
const PREF_APP_UPDATE_CHANNEL = "app.update.channel"; const PREF_APP_UPDATE_CHANNEL = "app.update.channel";
const PREF_APP_UPDATE_BACKGROUND_INTERVAL = "app.update.download.backgroundInterval";
const PREF_APP_UPDATE_SHOW_INSTALLED_UI = "app.update.showInstalledUI"; const PREF_APP_UPDATE_SHOW_INSTALLED_UI = "app.update.showInstalledUI";
const PREF_APP_UPDATE_LASTUPDATETIME_FMT = "app.update.lastUpdateTime.%ID%"; const PREF_APP_UPDATE_LASTUPDATETIME_FMT = "app.update.lastUpdateTime.%ID%";
const PREF_APP_UPDATE_INCOMPATIBLE_MODE = "app.update.incompatible.mode"; const PREF_APP_UPDATE_INCOMPATIBLE_MODE = "app.update.incompatible.mode";
@ -118,7 +119,6 @@ const DOWNLOAD_BACKGROUND_INTERVAL = 600; // seconds
const DOWNLOAD_FOREGROUND_INTERVAL = 0; const DOWNLOAD_FOREGROUND_INTERVAL = 0;
const UPDATE_WINDOW_NAME = "Update:Wizard"; const UPDATE_WINDOW_NAME = "Update:Wizard";
const TOOLKIT_ID = "toolkit@mozilla.org";
var gApp = null; var gApp = null;
var gPref = null; var gPref = null;
@ -2506,8 +2506,9 @@ Downloader.prototype = {
LOG("Downloader", "downloadUpdate - downloading from " + uri.spec + " to " + LOG("Downloader", "downloadUpdate - downloading from " + uri.spec + " to " +
patchFile.path); patchFile.path);
var interval = this.background ? getPref("getIntPref",
var interval = this.background ? DOWNLOAD_BACKGROUND_INTERVAL PREF_APP_UPDATE_BACKGROUND_INTERVAL,
DOWNLOAD_BACKGROUND_INTERVAL)
: DOWNLOAD_FOREGROUND_INTERVAL; : DOWNLOAD_FOREGROUND_INTERVAL;
this._request.init(uri, patchFile, DOWNLOAD_CHUNK_SIZE, interval); this._request.init(uri, patchFile, DOWNLOAD_CHUNK_SIZE, interval);
this._request.start(this, null); this._request.start(this, null);