Bug 977196 - Part 5: Track opening URLs in RemoteTabsList r=liuche
authorMark Finkle <mfinkle@mozilla.com>
Thu, 01 May 2014 22:36:36 -0400
changeset 181749 46c989bae26cb208ecddec07bd4a98808e0af26c
parent 181748 8b8bf88029a78ae8b96baa080107a9725c5b85f6
child 181750 f3f46af11f38b8391396f4bb6887f4dfbc23746a
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersliuche
bugs977196
milestone32.0a1
Bug 977196 - Part 5: Track opening URLs in RemoteTabsList r=liuche
mobile/android/base/tabspanel/RemoteTabsList.java
--- a/mobile/android/base/tabspanel/RemoteTabsList.java
+++ b/mobile/android/base/tabspanel/RemoteTabsList.java
@@ -14,16 +14,18 @@ import android.widget.SimpleExpandableLi
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Tabs;
 import org.mozilla.gecko.TabsAccessor;
+import org.mozilla.gecko.Telemetry;
+import org.mozilla.gecko.TelemetryContract;
 
 /**
  * The actual list of synced tabs. This serves as the only child view of {@link RemoteTabsContainer}
  * so it can be refreshed using a swipe-to-refresh gesture.
  */
 class RemoteTabsList extends ExpandableListView
                      implements ExpandableListView.OnGroupClickListener,
                                 ExpandableListView.OnChildClickListener,
@@ -63,16 +65,18 @@ class RemoteTabsList extends ExpandableL
     @Override
     public boolean onChildClick(ExpandableListView parent, View view, int groupPosition, int childPosition, long id) {
         HashMap <String, String> tab = tabsList.get(groupPosition).get(childPosition);
         if (tab == null) {
             autoHidePanel();
             return true;
         }
 
+        Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, "", "remote");
+
         Tabs.getInstance().loadUrl(tab.get("url"), Tabs.LOADURL_NEW_TAB);
         autoHidePanel();
         return true;
     }
 
     @Override
     public void onQueryTabsComplete(List<TabsAccessor.RemoteTab> remoteTabsList) {
         ArrayList<TabsAccessor.RemoteTab> remoteTabs = new ArrayList<TabsAccessor.RemoteTab> (remoteTabsList);