mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 14:25:49 +00:00
Backing out bug 1518799 since it was a feature only required for a short period and there is no need for it to exist anymore. r=backout
This commit is contained in:
parent
97cb21c541
commit
462bfe5e5b
@ -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.20190116", "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,15 +76,6 @@ const OVERRIDE_NIGHTLY = 4;
|
||||
* OVERRIDE_NONE otherwise.
|
||||
*/
|
||||
function needHomepageOverride(prefb) {
|
||||
let isInTests = Cu.isInAutomation || Services.prefs.getBoolPref("marionette.enabled", false);
|
||||
if (AppConstants.NIGHTLY_BUILD && !isInTests) {
|
||||
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")
|
||||
@ -561,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) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user