mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 981028 - Part 1: Probes for pinning, un-pinning & editing a top sites item. r=liuche
This commit is contained in:
parent
6dc72dd029
commit
112ffd11e1
@ -17,6 +17,15 @@ public interface TelemetryContract {
|
||||
public interface Event {
|
||||
// Outcome of data policy notification: can be true or false.
|
||||
public static final String POLICY_NOTIFICATION_SUCCESS = "policynotification.success.1:";
|
||||
|
||||
// Top site pinned.
|
||||
public static final String TOP_SITES_PIN = "pin.1";
|
||||
|
||||
// Top site un-pinned.
|
||||
public static final String TOP_SITES_UNPIN = "unpin.1";
|
||||
|
||||
// Top site edited.
|
||||
public static final String TOP_SITES_EDIT = "edit.1";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.Telemetry;
|
||||
import org.mozilla.gecko.TelemetryContract;
|
||||
import org.mozilla.gecko.db.BrowserContract.Combined;
|
||||
import org.mozilla.gecko.db.BrowserContract.Thumbnails;
|
||||
import org.mozilla.gecko.db.BrowserDB;
|
||||
@ -327,6 +329,7 @@ public class TopSitesPanel extends HomeFragment {
|
||||
}
|
||||
});
|
||||
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.TOP_SITES_PIN);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -341,12 +344,15 @@ public class TopSitesPanel extends HomeFragment {
|
||||
}
|
||||
});
|
||||
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.TOP_SITES_UNPIN);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (itemId == R.id.top_sites_edit) {
|
||||
// Decode "user-entered" URLs before showing them.
|
||||
mEditPinnedSiteListener.onEditPinnedSite(info.position, decodeUserEnteredUrl(info.url));
|
||||
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.TOP_SITES_EDIT);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user