Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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); |
|
Ilya Sherman
2015/06/25 21:40:30
Hmm, why did you change this code?
tbarzic
2015/06/25 22:31:09
This is used by File Manager app and Webstore Widg
Ilya Sherman
2015/06/25 22:36:31
I see. I think I understand now what the code use
| |
| 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 }; |
| OLD | NEW |