Bug 1002318 - Add UI Telemetry for sanitizing private data r=liuche, bnicholson

This commit is contained in:
Mark Finkle 2014-04-29 08:04:10 -04:00
Родитель 5cbf23ebaa
Коммит 66bddf0c1b
2 изменённых файлов: 11 добавлений и 1 удалений

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

@ -29,13 +29,19 @@ public interface TelemetryContract {
// Set default panel.
public static final String PANEL_SET_DEFAULT = "setdefault.1";
// Sanitizing private data.
public static final String SANITIZE = "sanitize.1";
}
/**
* Holds event methods. Intended for use in
* Telemetry.sendUIEvent() as the "method" parameter.
*/
public interface Method {}
public interface Method {
// Action triggered from a dialog.
public static final String DIALOG = "dialog";
}
/**
* Holds session names. Intended for use with

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

@ -7,6 +7,8 @@ package org.mozilla.gecko.preferences;
import org.mozilla.gecko.GeckoAppShell;
import org.mozilla.gecko.GeckoEvent;
import org.mozilla.gecko.Telemetry;
import org.mozilla.gecko.TelemetryContract;
import org.json.JSONException;
import org.json.JSONObject;
@ -33,6 +35,8 @@ class PrivateDataPreference extends MultiChoicePreference {
if (!positiveResult)
return;
Telemetry.sendUIEvent(TelemetryContract.Event.SANITIZE, TelemetryContract.Method.DIALOG);
CharSequence keys[] = getEntryKeys();
boolean values[] = getValues();
JSONObject json = new JSONObject();