Backed out changeset ebff3389b3e4 (bug 1518799) incorrect commit message

This commit is contained in:
Andreea Pavel 2019-01-11 19:15:02 +02:00
Родитель e8f46404e7
Коммит 6b77f9e5ee
2 изменённых файлов: 0 добавлений и 23 удалений

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

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
pref("startup.homepage_override_nightly.20190114", "https://www.mozilla.org/firefox/dedicated-profiles/");
pref("startup.homepage_override_url", "https://www.mozilla.org/projects/firefox/%VERSION%/whatsnew/?oldversion=%OLD_VERSION%");
pref("startup.homepage_welcome_url", "https://www.mozilla.org/projects/firefox/%VERSION%/firstrun/");
pref("startup.homepage_welcome_url.additional", "");

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

@ -61,18 +61,10 @@ function resolveURIInternal(aCmdLine, aArgument) {
var gFirstWindow = false;
function getNormalizedDate() {
let pad = num => ("" + num).padStart(2, "0");
let date = new Date();
return `${date.getFullYear()}${pad(date.getMonth() + 1)}${pad(date.getDate())}`;
}
const OVERRIDE_NONE = 0;
const OVERRIDE_NEW_PROFILE = 1;
const OVERRIDE_NEW_MSTONE = 2;
const OVERRIDE_NEW_BUILD_ID = 3;
const OVERRIDE_NIGHTLY = 4;
/**
* Determines whether a home page override is needed.
* Returns:
@ -84,14 +76,6 @@ const OVERRIDE_NIGHTLY = 4;
* OVERRIDE_NONE otherwise.
*/
function needHomepageOverride(prefb) {
if (AppConstants.NIGHTLY_BUILD && !Cu.isInAutomation) {
let pref = `startup.homepage_override_nightly.${getNormalizedDate()}`;
let url = Services.prefs.getCharPref(pref, "");
if (url) {
return OVERRIDE_NIGHTLY;
}
}
var savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone", "");
if (savedmstone == "ignore")
@ -560,12 +544,6 @@ nsBrowserContentHandler.prototype = {
UpdatePing.handleUpdateSuccess(old_mstone, old_buildId);
}
break;
case OVERRIDE_NIGHTLY:
// Opens a page on the first startup on a particular day.
let pref = `startup.homepage_override_nightly.${getNormalizedDate()}`;
overridePage = Services.prefs.getCharPref(pref);
Services.prefs.setCharPref(pref, "");
break;
}
}
} catch (ex) {}