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

Side by Side Diff: chrome/browser/resources/google_now/background.js

Issue 2346683004: Update chrome.metricsPrivate externs and make closure fixes (Closed)
Patch Set: fix file manager test Created 4 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/hotword/metrics.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * @fileoverview The event page for Google Now for Chrome implementation. 8 * @fileoverview The event page for Google Now for Chrome implementation.
9 * The Google Now event page gets Google Now cards from the server and shows 9 * The Google Now event page gets Google Now cards from the server and shows
10 * them as Chrome notifications. 10 * them as Chrome notifications.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // added before it. 270 // added before it.
271 }; 271 };
272 272
273 /** 273 /**
274 * Records a Google Now Event. 274 * Records a Google Now Event.
275 * @param {GoogleNowEvent} event Event identifier. 275 * @param {GoogleNowEvent} event Event identifier.
276 */ 276 */
277 function recordEvent(event) { 277 function recordEvent(event) {
278 var metricDescription = { 278 var metricDescription = {
279 metricName: 'GoogleNow.Event', 279 metricName: 'GoogleNow.Event',
280 type: 'histogram-linear', 280 type: chrome.metricsPrivate.MetricTypeType.HISTOGRAM_LINEAR,
281 min: 1, 281 min: 1,
282 max: GoogleNowEvent.EVENTS_TOTAL, 282 max: GoogleNowEvent.EVENTS_TOTAL,
283 buckets: GoogleNowEvent.EVENTS_TOTAL + 1 283 buckets: GoogleNowEvent.EVENTS_TOTAL + 1
284 }; 284 };
285 285
286 chrome.metricsPrivate.recordValue(metricDescription, event); 286 chrome.metricsPrivate.recordValue(metricDescription, event);
287 } 287 }
288 288
289 /** 289 /**
290 * Records a notification clicked event. 290 * Records a notification clicked event.
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 lastPollNowPayloads: items.lastPollNowPayloads, 1495 lastPollNowPayloads: items.lastPollNowPayloads,
1496 notificationGroups: items.notificationGroups 1496 notificationGroups: items.notificationGroups
1497 }); 1497 });
1498 1498
1499 pollOptedInWithRecheck(); 1499 pollOptedInWithRecheck();
1500 } 1500 }
1501 }); 1501 });
1502 }); 1502 });
1503 } 1503 }
1504 }); 1504 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/hotword/metrics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698