mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
2cb30a238c
4110 changed files with 343 additions and 435849 deletions
|
|
@ -362,7 +362,7 @@
|
|||
// First, find the index of the <a> tag we care about, being
|
||||
// careful not to use an over-greedy regex.
|
||||
var re = /<a id="cert_domain_link" title="([^"]+)">/;
|
||||
var result = domainRe.exec(desc);
|
||||
var result = re.exec(desc);
|
||||
|
||||
if (!result)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -145,10 +145,6 @@ const gXPInstallObserver = {
|
|||
for (let install of installInfo.installs)
|
||||
install.install();
|
||||
installInfo = null;
|
||||
|
||||
Services.telemetry
|
||||
.getHistogramById("SECURITY_UI")
|
||||
.add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL_CLICK_THROUGH);
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
|
@ -208,10 +204,6 @@ const gXPInstallObserver = {
|
|||
options);
|
||||
|
||||
removeNotificationOnEnd(popup, installInfo.installs);
|
||||
|
||||
Services.telemetry
|
||||
.getHistogramById("SECURITY_UI")
|
||||
.add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL);
|
||||
},
|
||||
|
||||
observe: function (aSubject, aTopic, aData)
|
||||
|
|
@ -262,8 +254,6 @@ const gXPInstallObserver = {
|
|||
messageString = gNavigatorBundle.getFormattedString("xpinstallPromptMessage",
|
||||
[brandShortName]);
|
||||
|
||||
let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry).getHistogramById("SECURITY_UI");
|
||||
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED);
|
||||
let popup = PopupNotifications.show(browser, notificationID,
|
||||
messageString, anchorID,
|
||||
null, null, options);
|
||||
|
|
@ -273,17 +263,14 @@ const gXPInstallObserver = {
|
|||
messageString = gNavigatorBundle.getFormattedString("xpinstallPromptMessage",
|
||||
[brandShortName]);
|
||||
|
||||
let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry).getHistogramById("SECURITY_UI");
|
||||
action = {
|
||||
label: gNavigatorBundle.getString("xpinstallPromptAllowButton"),
|
||||
accessKey: gNavigatorBundle.getString("xpinstallPromptAllowButton.accesskey"),
|
||||
callback: function() {
|
||||
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH);
|
||||
installInfo.install();
|
||||
}
|
||||
};
|
||||
|
||||
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED);
|
||||
let popup = PopupNotifications.show(browser, notificationID,
|
||||
messageString, anchorID,
|
||||
action, null, options);
|
||||
|
|
|
|||
|
|
@ -275,7 +275,6 @@ var gSyncUI = {
|
|||
openPreferences("paneSync");
|
||||
},
|
||||
|
||||
|
||||
// Helpers
|
||||
_updateLastSyncTime: function SUI__updateLastSyncTime() {
|
||||
if (!gBrowser)
|
||||
|
|
|
|||
|
|
@ -2628,15 +2628,9 @@ var gMenuButtonUpdateBadge = {
|
|||
cancelObserverRegistered: false,
|
||||
|
||||
init: function () {
|
||||
try {
|
||||
this.enabled = Services.prefs.getBoolPref("app.update.badge");
|
||||
} catch (e) {}
|
||||
this.enabled = Services.prefs.getBoolPref("app.update.badge", false);
|
||||
if (this.enabled) {
|
||||
try {
|
||||
this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime");
|
||||
} catch (e) {
|
||||
this.badgeWaitTime = 345600; // 4 days
|
||||
}
|
||||
this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime", 345600); // 4 days
|
||||
Services.obs.addObserver(this, "update-staged", false);
|
||||
Services.obs.addObserver(this, "update-downloaded", false);
|
||||
}
|
||||
|
|
@ -2853,15 +2847,10 @@ var BrowserOnClick = {
|
|||
},
|
||||
|
||||
onCertError: function (browser, elementId, isTopFrame, location, securityInfoAsString) {
|
||||
let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
|
||||
let securityInfo;
|
||||
|
||||
switch (elementId) {
|
||||
case "exceptionDialogButton":
|
||||
if (isTopFrame) {
|
||||
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_TOP_CLICK_ADD_EXCEPTION);
|
||||
}
|
||||
|
||||
securityInfo = getSecurityInfo(securityInfoAsString);
|
||||
let sslStatus = securityInfo.QueryInterface(Ci.nsISSLStatusProvider)
|
||||
.SSLStatus;
|
||||
|
|
@ -2889,64 +2878,27 @@ var BrowserOnClick = {
|
|||
break;
|
||||
|
||||
case "returnButton":
|
||||
if (isTopFrame) {
|
||||
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_TOP_GET_ME_OUT_OF_HERE);
|
||||
}
|
||||
goBackFromErrorPage();
|
||||
break;
|
||||
|
||||
case "advancedButton":
|
||||
if (isTopFrame) {
|
||||
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_TOP_UNDERSTAND_RISKS);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
onAboutBlocked: function (elementId, reason, isTopFrame, location) {
|
||||
// Depending on what page we are displaying here (malware/phishing/unwanted)
|
||||
// use the right strings and links for each.
|
||||
let bucketName = "";
|
||||
let sendTelemetry = false;
|
||||
if (reason === 'malware') {
|
||||
sendTelemetry = true;
|
||||
bucketName = "WARNING_MALWARE_PAGE_";
|
||||
} else if (reason === 'phishing') {
|
||||
sendTelemetry = true;
|
||||
bucketName = "WARNING_PHISHING_PAGE_";
|
||||
} else if (reason === 'unwanted') {
|
||||
sendTelemetry = true;
|
||||
bucketName = "WARNING_UNWANTED_PAGE_";
|
||||
}
|
||||
let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
|
||||
let nsISecTel = Ci.nsISecurityUITelemetry;
|
||||
bucketName += isTopFrame ? "TOP_" : "FRAME_";
|
||||
switch (elementId) {
|
||||
case "getMeOutButton":
|
||||
if (sendTelemetry) {
|
||||
secHistogram.add(nsISecTel[bucketName + "GET_ME_OUT_OF_HERE"]);
|
||||
}
|
||||
getMeOutOfHere();
|
||||
break;
|
||||
|
||||
case "reportButton":
|
||||
// This is the "Why is this site blocked" button. We redirect
|
||||
// to the generic page describing phishing/malware protection.
|
||||
|
||||
// We log even if malware/phishing/unwanted info URL couldn't be found:
|
||||
// the measurement is for how many users clicked the WHY BLOCKED button
|
||||
if (sendTelemetry) {
|
||||
secHistogram.add(nsISecTel[bucketName + "WHY_BLOCKED"]);
|
||||
}
|
||||
openHelpLink("phishing-malware", false, "current");
|
||||
break;
|
||||
|
||||
case "ignoreWarningButton":
|
||||
if (gPrefService.getBoolPref("browser.safebrowsing.allowOverride")) {
|
||||
if (sendTelemetry) {
|
||||
secHistogram.add(nsISecTel[bucketName + "IGNORE_WARNING"]);
|
||||
}
|
||||
this.ignoreWarningButton(reason);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -4190,11 +4190,7 @@
|
|||
return true;
|
||||
if (this._logInit)
|
||||
return this._shouldLog;
|
||||
let result = false;
|
||||
try {
|
||||
result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming");
|
||||
} catch (ex) {
|
||||
}
|
||||
let result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming", false);
|
||||
this._shouldLog = result;
|
||||
this._logInit = true;
|
||||
return this._shouldLog;
|
||||
|
|
@ -5277,11 +5273,7 @@
|
|||
window.addEventListener("resize", this, false);
|
||||
window.addEventListener("load", this, false);
|
||||
|
||||
try {
|
||||
this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled");
|
||||
} catch (ex) {
|
||||
this._tabAnimationLoggingEnabled = false;
|
||||
}
|
||||
this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled", false);
|
||||
this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled");
|
||||
this.observe(null, "nsPref:changed", "privacy.userContext.enabled");
|
||||
Services.prefs.addObserver("privacy.userContext.enabled", this, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue