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

Side by Side Diff: chrome/browser/resources/print_preview/metrics.js

Issue 601573002: Add UMA stats for new Print Preview UI elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Object used to measure usage statistics. 9 * Object used to measure usage statistics.
10 * @constructor 10 * @constructor
(...skipping 25 matching lines...) Expand all
36 // Privet and cloud printers. 36 // Privet and cloud printers.
37 CLOUD_DUPLICATE_SELECTED: 6, 37 CLOUD_DUPLICATE_SELECTED: 6,
38 // Used when a user sees a register promo for a cloud print printer. 38 // Used when a user sees a register promo for a cloud print printer.
39 REGISTER_PROMO_SHOWN: 7, 39 REGISTER_PROMO_SHOWN: 7,
40 // Used when a user selects a register promo for a cloud print printer. 40 // Used when a user selects a register promo for a cloud print printer.
41 REGISTER_PROMO_SELECTED: 8, 41 REGISTER_PROMO_SELECTED: 8,
42 // User changed active account. 42 // User changed active account.
43 ACCOUNT_CHANGED: 9, 43 ACCOUNT_CHANGED: 9,
44 // User tried to log into another account. 44 // User tried to log into another account.
45 ADD_ACCOUNT_SELECTED: 10, 45 ADD_ACCOUNT_SELECTED: 10,
46 // User accepted printer sharing invitation.
47 INVITATION_ACCEPTED: 11,
Vitaly Buka (NO REVIEWS) 2014/09/23 23:46:36 probably you also need INVITATION_AVAILIBLE counte
Aleksey Shlyapnikov 2014/09/24 00:43:14 Done.
48 // User rejected printer sharing invitation.
49 INVITATION_REJECTED: 12,
46 // Max value. 50 // Max value.
47 DESTINATION_SEARCH_MAX_BUCKET: 11 51 DESTINATION_SEARCH_MAX_BUCKET: 13
48 }; 52 };
49 53
50 /** 54 /**
51 * Enumeration of buckets that a user can enter while using the Google Cloud 55 * Enumeration of buckets that a user can enter while using the Google Cloud
52 * Print promotion. 56 * Print promotion.
53 * @enum {number} 57 * @enum {number}
54 */ 58 */
55 Metrics.GcpPromoBucket = { 59 Metrics.GcpPromoBucket = {
56 // Used when the Google Cloud Print promotion (shown above the PDF preview 60 // Used when the Google Cloud Print promotion (shown above the PDF preview
57 // plugin) is shown to the user. 61 // plugin) is shown to the user.
(...skipping 10 matching lines...) Expand all
68 72
69 /** 73 /**
70 * Print settings UI usage metrics buckets. 74 * Print settings UI usage metrics buckets.
71 * @enum {number} 75 * @enum {number}
72 */ 76 */
73 Metrics.PrintSettingsUiBucket = { 77 Metrics.PrintSettingsUiBucket = {
74 // Advanced settings dialog is shown. 78 // Advanced settings dialog is shown.
75 ADVANCED_SETTINGS_DIALOG_SHOWN: 0, 79 ADVANCED_SETTINGS_DIALOG_SHOWN: 0,
76 // Advanced settings dialog is closed without saving a selection. 80 // Advanced settings dialog is closed without saving a selection.
77 ADVANCED_SETTINGS_DIALOG_CANCELED: 1, 81 ADVANCED_SETTINGS_DIALOG_CANCELED: 1,
82 // 'More/less settings' expanded.
83 MORE_SETTINGS_CLICKED: 2,
84 // 'More/less settings' collapsed.
85 LESS_SETTINGS_CLICKED: 3,
86 // User printed with extra settings expanded.
87 PRINT_WITH_SETTINGS_EXPANDED: 4,
88 // User printed with extra settings collapsed.
89 PRINT_WITH_SETTINGS_COLLAPSED: 5,
78 // Max value. 90 // Max value.
79 PRINT_SETTINGS_UI_MAX_BUCKET: 2 91 PRINT_SETTINGS_UI_MAX_BUCKET: 6
80 }; 92 };
81 93
82 /** 94 /**
83 * A context for recording a value in a specific UMA histogram. 95 * A context for recording a value in a specific UMA histogram.
84 * @param {string} histogram The name of the histogram to be recorded in. 96 * @param {string} histogram The name of the histogram to be recorded in.
85 * @param {number} maxBucket The max value for the last histogram bucket. 97 * @param {number} maxBucket The max value for the last histogram bucket.
86 * @constructor 98 * @constructor
87 */ 99 */
88 function MetricsContext(histogram, maxBucket) { 100 function MetricsContext(histogram, maxBucket) {
89 /** @private {string} */ 101 /** @private {string} */
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 168
157 // Export 169 // Export
158 return { 170 return {
159 Metrics: Metrics, 171 Metrics: Metrics,
160 MetricsContext: MetricsContext, 172 MetricsContext: MetricsContext,
161 DestinationSearchMetricsContext: DestinationSearchMetricsContext, 173 DestinationSearchMetricsContext: DestinationSearchMetricsContext,
162 GcpPromoMetricsContext: GcpPromoMetricsContext, 174 GcpPromoMetricsContext: GcpPromoMetricsContext,
163 PrintSettingsUiMetricsContext: PrintSettingsUiMetricsContext 175 PrintSettingsUiMetricsContext: PrintSettingsUiMetricsContext
164 }; 176 };
165 }); 177 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698