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

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

Issue 10480002: Implements metrics for destination search. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 cr.define('print_preview', function() {
6 'use strict';
7
8 /**
9 * Object used to measure usage statistics.
10 * @constructor
11 */
12 function Metrics() {};
13
14 /**
15 * Enumeration of metrics buckets to record.
16 * @enum {number}
17 */
18 Metrics.Bucket = {
19 // Used when the print destination search widget is shown.
20 DESTINATION_SEARCH_SHOWN: 0,
21 // Used when the user selects a print destination.
22 DESTINATION_SELECTED: 1,
23 // Used when the print destination search widget is closed without selecting
24 // a print destination.
25 DESTINATION_SELECTION_CANCELED: 2,
26 // Used when the Google Cloud Print promotions is shown to the user.
27 CLOUDPRINT_PROMO_SHOWN: 3,
28 // Used when the user chooses to sign-in to their Google account.
29 SIGNIN_TRIGGERED: 4
30 };
31
32 Metrics.prototype = {
33 /**
34 * Increments the counter for a given bucket.
35 * @param {!print_preview.Metrics.Bucket} bucket Bucket to increment.
36 */
37 increment: function(bucket) {
38 chrome.send('reportDestinationEvent', bucket);
39 }
40 };
41
42 // Export
43 return {
44 Metrics: Metrics
45 };
46 });
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