Bug 1002318 - Add UI Telemetry for sanitizing private data r=liuche, bnicholson
This commit is contained in:
@@ -29,13 +29,19 @@ public interface TelemetryContract {
|
|||||||
|
|
||||||
// Set default panel.
|
// Set default panel.
|
||||||
public static final String PANEL_SET_DEFAULT = "setdefault.1";
|
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
|
* Holds event methods. Intended for use in
|
||||||
* Telemetry.sendUIEvent() as the "method" parameter.
|
* 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
|
* 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.GeckoAppShell;
|
||||||
import org.mozilla.gecko.GeckoEvent;
|
import org.mozilla.gecko.GeckoEvent;
|
||||||
|
import org.mozilla.gecko.Telemetry;
|
||||||
|
import org.mozilla.gecko.TelemetryContract;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@@ -33,6 +35,8 @@ class PrivateDataPreference extends MultiChoicePreference {
|
|||||||
if (!positiveResult)
|
if (!positiveResult)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Telemetry.sendUIEvent(TelemetryContract.Event.SANITIZE, TelemetryContract.Method.DIALOG);
|
||||||
|
|
||||||
CharSequence keys[] = getEntryKeys();
|
CharSequence keys[] = getEntryKeys();
|
||||||
boolean values[] = getValues();
|
boolean values[] = getValues();
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user