mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1400870 - Keep the attribution code on environment changes. r=chutten
This patch makes sure |_updateSettings| carries over the attribution code, if present. Without this patch the whole "environment.settings" section is replaced and the attribution code disppears after the first environment change/subsession split. MozReview-Commit-ID: 8bxjVOl2mUp --HG-- extra : rebase_source : c611d9148fc734ac5cb751fee8b86bad4550f11b
This commit is contained in:
parent
da21f7fca0
commit
0ba0ff04be
@ -1363,7 +1363,13 @@ EnvironmentCache.prototype = {
|
||||
updateChannel = UpdateUtils.getUpdateChannel(false);
|
||||
} catch (e) {}
|
||||
|
||||
// Make sure to retain the attribution code across environment changes.
|
||||
const attributionCode =
|
||||
(this._currentEnvironment.settings &&
|
||||
this._currentEnvironment.settings.attribution) || {};
|
||||
|
||||
this._currentEnvironment.settings = {
|
||||
attribution: attributionCode,
|
||||
blocklistEnabled: Services.prefs.getBoolPref(PREF_BLOCKLIST_ENABLED, true),
|
||||
e10sEnabled: Services.appinfo.browserTabsRemoteAutostart,
|
||||
e10sMultiProcesses: Services.appinfo.maxWebProcessCount,
|
||||
|
@ -450,7 +450,7 @@ function checkSettingsSection(data) {
|
||||
Assert.equal(typeof data.settings.defaultSearchEngineData, "object");
|
||||
}
|
||||
|
||||
if ("attribution" in data.settings) {
|
||||
if (gIsWindows) {
|
||||
Assert.equal(typeof data.settings.attribution, "object");
|
||||
Assert.equal(data.settings.attribution.source, "google.com");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user