Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Commit

Permalink
Remove metrics subsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyrat committed May 1, 2018
1 parent e691de9 commit 703e918
Show file tree
Hide file tree
Showing 21 changed files with 10 additions and 1,010 deletions.
2 changes: 0 additions & 2 deletions Firefox addon/Firefox addon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<Content Include="KeeFox\chrome\content\framescript\formsTab.js" />
<Content Include="KeeFox\chrome\content\framescript\keefoxTab.js" />
<Content Include="KeeFox\chrome\content\framescript\proxies\config.js" />
<Content Include="KeeFox\chrome\content\framescript\proxies\metrics.js" />
<Content Include="KeeFox\chrome\content\framescript\proxies\logger.js" />
<Content Include="KeeFox\chrome\content\install.js" />
<Content Include="KeeFox\chrome\content\install_mono.js" />
Expand Down Expand Up @@ -129,7 +128,6 @@
<Content Include="KeeFox\modules\KFLogger.js" />
<Content Include="KeeFox\modules\kprpcClient.js" />
<Content Include="KeeFox\modules\locales.js" />
<Content Include="KeeFox\modules\metrics.js" />
<Content Include="KeeFox\modules\search.js" />
<Content Include="KeeFox\modules\session.js" />
<Content Include="KeeFox\modules\sjcl.js" />
Expand Down
4 changes: 0 additions & 4 deletions Firefox addon/KeeFox/chrome/content/KFUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ keefox_win.UI = {
} finally
{
browser.messageManager.sendAsyncMessage("keefox:cancelFormRecording");
keefox_org.metricsManager.pushEvent("feature", "SaveNever");
browser.passwordSaver = null;
}
}
Expand Down Expand Up @@ -201,14 +200,11 @@ keefox_win.UI = {

saveData.getLogin(function (login, urlMergeMode) {
if (saveData.update) {
keefox_org.metricsManager.pushEvent("feature", "updateLogin",
{ "urlMergeMode": urlMergeMode, "filterState": filterState });
var result = keefox_org.updateLogin(login, saveData.oldLoginUUID, urlMergeMode, saveData.db);
keefox_win.notificationManager.remove("password-save");
browser.passwordSaver.showUpdateSuccessNotification();
}
else {
keefox_org.metricsManager.pushEvent("feature", "addLogin");
var result = keefox_org.addLogin(login, saveData.group, saveData.db);
if (keefox_org._keeFoxExtension.prefs.getValue("rememberMRUGroup", false))
keefox_org._keeFoxExtension.prefs.setValue("MRUGroup-" + saveData.db, saveData.group);
Expand Down
1 change: 0 additions & 1 deletion Firefox addon/KeeFox/chrome/content/PasswordSaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ keefox_win.PasswordSaver.prototype =

abortAndLaunchManualEdit: function ()
{
keefox_org.metricsManager.pushEvent("feature", "abortAndLaunchManualEdit");
keefox_org.launchLoginEditor(this.saveData.oldLoginUUID, this.saveData.db);
keefox_win.notificationManager.remove("password-save");
},
Expand Down
11 changes: 0 additions & 11 deletions Firefox addon/KeeFox/chrome/content/UninstallHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,6 @@ keefox_win.UninstallHelper.prototype =
if (extraText.value.length > 0)
extra = extraText.value.substr(0,15000);

keefox_org.metricsManager.pushEvent("uninstall", "feedback",
{
"connectState": this.connectState,
"setupState": this.setupState,
"tutorialProgress": this.tutorialProgress,
"varients": this.varients,
"reason": reason,
"extra": extra,
"disable": this.disabling
}, true);

let responseContainer = this.createResponseContainer(reason, this.connectState, this.setupState, this.tutorialProgress);
responseContainer.classList.add("disabled");

Expand Down
3 changes: 0 additions & 3 deletions Firefox addon/KeeFox/chrome/content/commonDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,13 +794,11 @@ var keeFoxDialogManager = {
if (autoFill)
{
// fill in the best matching login
keefox_org.metricsManager.pushEvent ("feature", "AutoFillDialog");
dialogFindLoginStorage.document.getElementById("loginTextbox").value = matchedLogins[bestMatch].username;
dialogFindLoginStorage.document.getElementById("password1Textbox").value = matchedLogins[bestMatch].password;
}
if (autoSubmit || dialogFindLoginStorage.mustAutoSubmit)
{
keefox_org.metricsManager.pushEvent ("feature", "AutoSubmitDialog");
Dialog.onButton0();
close();
}
Expand Down Expand Up @@ -828,7 +826,6 @@ var keeFoxDialogManager = {

fill : function (username, password)
{
keefox_org.metricsManager.pushEvent ("feature", "MatchedSubmitDialog");
document.getElementById("loginTextbox").value = username;
document.getElementById("password1Textbox").value = password;
Dialog.onButton0();
Expand Down
4 changes: 1 addition & 3 deletions Firefox addon/KeeFox/chrome/content/formsWin.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ keefox_win.loadAndAutoSubmit = function (button, ctrlClick, URL, uniqueID, dbFil
keefox_win.Logger.debug("loading and auto submitting button " + button + ctrlClick + ":" + URL);
else
keefox_win.Logger.debug("loading and auto submitting button " + button + ctrlClick + "...");

keefox_org.metricsManager.pushEvent ("feature", "loadAndAutoSubmit");


var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var newWindow = wm.getMostRecentWindow("navigator:browser") ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,6 @@ var scanForOrphanedFields = function (doc)
querySelectorAll: function() { return []; }, // Only use is for listing button elements
submit: function() { return; } // Not possible to submit a pseudo form unless a button with custom JS has already been found
};
metricsManager.adjustAggregate("pseudoFormCreated", 1);
}

var tn = (new Date()).getTime();
Expand Down Expand Up @@ -1357,10 +1356,6 @@ var fillAndSubmit = function (automated, frameKey, formIndex, loginIndex)
&& matchResult.formReadyForSubmit)
{
Logger.info("Auto-submitting form...");
if (automated)
metricsManager.pushEvent ("feature", "AutoSubmit");
else
metricsManager.pushEvent ("feature", "ManualSubmit"); // Called "MatchedFill" previously (yes, I'm an idiot)
submitForm(form);
} else if (isMatchedLoginRequest)
{
Expand Down Expand Up @@ -1403,10 +1398,6 @@ var fillAndSubmit = function (automated, frameKey, formIndex, loginIndex)
"logins": matchingLoginsFromAllFrames,
"notifyUserOnSuccess": matchResult.notifyUserOnSuccess
});
metricsManager.pushEvent ("feature", "AutoFill");
} else
{
metricsManager.pushEvent ("feature", "ManualFill"); // Called "MatchedSubmit" previously (yes, I'm an idiot)
}
} else
{
Expand Down
3 changes: 1 addition & 2 deletions Firefox addon/KeeFox/chrome/content/framescript/keefoxTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ part of the global scope of this script from within a subscript so we work aroun
this by passing in our main keefox_tab object for direct manipulation within the
subscript. */

// Load our logging, config and metrics subsystem proxies
// Load our logging and config subsystem proxies
keefox_tab.scriptLoader.loadSubScript("chrome://keefox/content/framescript/proxies/logger.js", keefox_tab);
keefox_tab.scriptLoader.loadSubScript("chrome://keefox/content/framescript/proxies/config.js", keefox_tab);
keefox_tab.scriptLoader.loadSubScript("chrome://keefox/content/framescript/proxies/metrics.js", keefox_tab);

// Load our other javascript
keefox_tab.scriptLoader.loadSubScript("chrome://keefox/content/shared/uriUtils.js", keefox_tab);
Expand Down
40 changes: 0 additions & 40 deletions Firefox addon/KeeFox/chrome/content/framescript/proxies/metrics.js

This file was deleted.

17 changes: 1 addition & 16 deletions Firefox addon/KeeFox/chrome/content/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,6 @@ function prepareInstallPage()
break;
default: document.getElementById('ERRORInstallButtonMain').setAttribute('hidden', false); break;
}

// Record key parts of above info to help find problems and plan future KeeFox priorities
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "displayed",
{ "installCase": installCase,
"downgrade": (args.downWarning == "1" && args.currentKPRPCv && args.newKPRPCv) });
}

function installationError(error)
Expand All @@ -282,7 +277,6 @@ function installationError(error)
}
showSection('restartInstallationOption');
resetInstallation();
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "error", { "reason": error });
}

function resetInstallation()
Expand All @@ -296,8 +290,7 @@ function cancelCurrentDownload()
persist.cancelSave();
showSection("ERRORInstallDownloadCanceled");
showSection('restartInstallationOption');
resetInstallation();
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "error", { "reason": "ERRORInstallDownloadCanceled" });
resetInstallation();
}

function hideInstallView() {
Expand All @@ -324,7 +317,6 @@ function checksumFailed() {
mainWindow.keefox_win.Logger.error("File checksum failed. Download corrupted?");
showSection("ERRORInstallDownloadChecksumFailed");
showSection('restartInstallationOption');
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "error", { "reason": "ERRORInstallDownloadChecksumFailed" });
}

/********************
Expand Down Expand Up @@ -776,7 +768,6 @@ functions initiated by user choice in UI
*/
function setupExeInstall()
{
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "installing", { "type": "dotNet.exe" });
hideInstallView();
showProgressView();

Expand All @@ -796,7 +787,6 @@ function setupExeInstall()
*/
function KPsetupExeSilentInstall()
{
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "installing", { "type": "KeePass.exe-silent" });
hideInstallView();
showProgressView();

Expand All @@ -818,7 +808,6 @@ function KPsetupExeSilentInstall()
*/
function copyKRPCToKnownKPLocationInstall()
{
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "installing", { "type": "copyKRPCToKnownKPLocation" });
hideInstallView();

let keePassLocation = mainWindow.keefox_org._keeFoxExtension.prefs
Expand Down Expand Up @@ -856,7 +845,6 @@ function copyKRPCToKnownKPLocationInstall()
*/
function copyKPToSpecificLocationInstall()
{
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "installing", { "type": "copyKPToSpecificLocation" });
// Cancel any automatically started downloads
try {
persist.cancelSave();
Expand Down Expand Up @@ -896,7 +884,6 @@ function copyKPToSpecificLocationInstall()
*/
function KPsetupExeInstall()
{
mainWindow.keefox_org.metricsManager.pushEvent ("setup", "installing", { "type": "KeePass.exe" });
hideInstallView();
showProgressView();

Expand Down Expand Up @@ -933,8 +920,6 @@ function launchAndConnectToKeePass()
mainWindow.keefox_org.KeePassRPC.reconnectTimer.cancel();

mainWindow.keefox_org.KeePassRPC.reconnectVerySoon();

mainWindow.keefox_org.metricsManager.pushEvent ("setup", "success");

// launch KeePass and then try to connect to KeePassRPC
mainWindow.keefox_org.launchKeePass();
Expand Down
2 changes: 1 addition & 1 deletion Firefox addon/KeeFox/chrome/content/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function onLoad(){
'lab-keePassRPCPort','lab-keePassRPCPortWarning','saveFavicons','lab-keePassDBToOpen','keePassDBToOpenBrowseButton',
'rememberMRUDB', 'rememberMRUGroup', 'lab-keePassRPCInstalledLocation', 'keePassRPCInstalledLocationBrowseButton', 'lab-keePassInstalledLocation', 'keePassInstalledLocationBrowseButton',
'lab-monoLocation','monoLocationBrowseButton','keePassRememberInstalledLocation','lab-keePassLocation',
'desc-site-specific','desc-site-specific-savepass','desc-site-specific-link','desc-site-specific-savepass-link','desc-ConnSL','desc-ConnSL-ManualLink-link','desc-conn-sl-client','slc-Low','slc-Medium','slc-High','sls-Low','sls-Medium','sls-High','desc-conn-sl-client-detail','desc-conn-sl-server','desc-conn-sl-server-detail','desc-conn-sl-low','desc-conn-sl-high','desc-commands-intro','desc-metrics','desc-metrics-link','lab-sendUsageMetrics','lab-maxMatchedLoginsInMainPanel','notifyWhenEntryUpdated'
'desc-site-specific','desc-site-specific-savepass','desc-site-specific-link','desc-site-specific-savepass-link','desc-ConnSL','desc-ConnSL-ManualLink-link','desc-conn-sl-client','slc-Low','slc-Medium','slc-High','sls-Low','sls-Medium','sls-High','desc-conn-sl-client-detail','desc-conn-sl-server','desc-conn-sl-server-detail','desc-conn-sl-low','desc-conn-sl-high','desc-commands-intro','lab-maxMatchedLoginsInMainPanel','notifyWhenEntryUpdated'
],
['title','label','tooltiptext','accesskey','value']);

Expand Down
10 changes: 0 additions & 10 deletions Firefox addon/KeeFox/chrome/content/options.xul
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
<preference id="KeeFox-pref-keePassDBToOpen" name="[email protected]" type="string"/>
<preference id="KeeFox-pref-rememberMRUDB" name="[email protected]" type="bool"/>
<preference id="KeeFox-pref-rememberMRUGroup" name="[email protected]" type="bool"/>
<preference id="KeeFox-pref-sendUsageMetrics" name="[email protected]" type="bool" inverted="true"/>

<preference id="KeeFox-pref-keePassRPCInstalledLocation" name="[email protected]" type="string"/>
<preference id="KeeFox-pref-keePassInstalledLocation" name="[email protected]" type="string"/>
Expand Down Expand Up @@ -234,15 +233,6 @@
<checkbox id="rememberMRUDB" preference="KeeFox-pref-rememberMRUDB"
label="%-KeeFox-pref-rememberMRUDB.label-%" class="itemEnd"/>

<description id="desc-metrics" width="650">%-KeeFox-pref-metrics-desc-% <html:a id="desc-metrics-link" class="text-link" onclick='javascript:openDialog(
"https://github.com/luckyrat/KeeFox/wiki/en-%7C-Metrics-collection",
"",
"centerscreen,width=770,height=560,dialog=no,chrome,resizable,dependent,modal"
);'>%-KeeFox-pref-metrics-link-%</html:a>
</description>

<checkbox id="lab-sendUsageMetrics" preference="KeeFox-pref-sendUsageMetrics"
label="%-KeeFox-pref-metrics-label-%" class="itemEnd" />
</vbox>
</tabpanel>

Expand Down
Loading

0 comments on commit 703e918

Please sign in to comment.