Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: components/chrome_apps/webstore_widget/cws_widget/cws_widget_container.js

Issue 1204783007: Add metrics for Webstore Gallery Widget app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * CWSWidgetContainer contains a Chrome Web Store widget that displays list of 6 * CWSWidgetContainer contains a Chrome Web Store widget that displays list of
7 * apps that satisfy certain constraints (e.g. fileHandler apps that can handle 7 * apps that satisfy certain constraints (e.g. fileHandler apps that can handle
8 * files with specific file extension or MIME type) and enables the user to 8 * files with specific file extension or MIME type) and enables the user to
9 * install apps directly from it. 9 * install apps directly from it.
10 * CWSWidgetContainer implements client side of the widget, which handles 10 * CWSWidgetContainer implements client side of the widget, which handles
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 CANCELLED: 1, 916 CANCELLED: 1,
917 FAILED: 2, 917 FAILED: 2,
918 }; 918 };
919 919
920 /** 920 /**
921 * @param {number} result Result of load, which must be defined in 921 * @param {number} result Result of load, which must be defined in
922 * CWSWidgetContainer.MetricsRecorder.LOAD. 922 * CWSWidgetContainer.MetricsRecorder.LOAD.
923 */ 923 */
924 CWSWidgetContainer.MetricsRecorder.prototype.recordLoad = function(result) { 924 CWSWidgetContainer.MetricsRecorder.prototype.recordLoad = function(result) {
925 if (0 <= result && result < 3) 925 if (0 <= result && result < 3)
926 this.metricsImpl_.recordEnum('SuggestApps.Load', result, 3); 926 this.metricsImpl_.recordEnum('Load', result, 3);
927 }; 927 };
928 928
929 /** 929 /**
930 * @param {number} reason Reason of closing dialog, which must be defined in 930 * @param {number} reason Reason of closing dialog, which must be defined in
931 * CWSWidgetContainer.MetricsRecorder.CLOSE_DIALOG. 931 * CWSWidgetContainer.MetricsRecorder.CLOSE_DIALOG.
932 */ 932 */
933 CWSWidgetContainer.MetricsRecorder.prototype.recordCloseDialog = function( 933 CWSWidgetContainer.MetricsRecorder.prototype.recordCloseDialog = function(
934 reason) { 934 reason) {
935 if (0 <= reason && reason < 4) 935 if (0 <= reason && reason < 4)
936 this.metricsImpl_.recordEnum('SuggestApps.CloseDialog', reason, 4); 936 this.metricsImpl_.recordEnum('CloseDialog', reason, 4);
937 }; 937 };
938 938
939 /** 939 /**
940 * @param {number} result Result of installation, which must be defined in 940 * @param {number} result Result of installation, which must be defined in
941 * CWSWidgetContainer.MetricsRecorder.INSTALL. 941 * CWSWidgetContainer.MetricsRecorder.INSTALL.
942 */ 942 */
943 CWSWidgetContainer.MetricsRecorder.prototype.recordInstall = function(result) { 943 CWSWidgetContainer.MetricsRecorder.prototype.recordInstall = function(result) {
944 if (0 <= result && result < 3) 944 if (0 <= result && result < 3)
945 this.metricsImpl_.recordEnum('SuggestApps.Install', result, 3); 945 this.metricsImpl_.recordEnum('Install', result, 3);
946 }; 946 };
947 947
948 CWSWidgetContainer.MetricsRecorder.prototype.recordShowDialog = function() { 948 CWSWidgetContainer.MetricsRecorder.prototype.recordShowDialog = function() {
949 this.metricsImpl_.recordUserAction('SuggestApps.ShowDialog'); 949 this.metricsImpl_.recordUserAction('ShowDialog');
950 }; 950 };
951 951
952 CWSWidgetContainer.MetricsRecorder.prototype.startLoad = function() { 952 CWSWidgetContainer.MetricsRecorder.prototype.startLoad = function() {
953 this.metricsImpl_.startInterval('SuggestApps.LoadTime'); 953 this.metricsImpl_.startInterval('LoadTime');
954 }; 954 };
955 955
956 CWSWidgetContainer.MetricsRecorder.prototype.finishLoad = function() { 956 CWSWidgetContainer.MetricsRecorder.prototype.finishLoad = function() {
957 this.metricsImpl_.recordInterval('SuggestApps.LoadTime'); 957 this.metricsImpl_.recordInterval('LoadTime');
958 }; 958 };
OLDNEW
« no previous file with comments | « components/chrome_apps/webstore_widget/app/main.js ('k') | components/chrome_apps/webstore_widget/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698