Commit 4d4d6e14 authored by vadimt@chromium.org's avatar vadimt@chromium.org

Adding location events to the histogram.

BUG=164227
TEST=Check that LOCATION_REQUEST and LOCATION_EVENT buckets appeared in the dashboard.

Review URL: https://chromiumcodereview.appspot.com/15306005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201988 0039d316-1c4b-4281-b951-d872f2087c98
parent 7eae29de
...@@ -132,7 +132,9 @@ var DiagnosticEvent = { ...@@ -132,7 +132,9 @@ var DiagnosticEvent = {
CARDS_PARSE_SUCCESS: 2, CARDS_PARSE_SUCCESS: 2,
DISMISS_REQUEST_TOTAL: 3, DISMISS_REQUEST_TOTAL: 3,
DISMISS_REQUEST_SUCCESS: 4, DISMISS_REQUEST_SUCCESS: 4,
EVENTS_TOTAL: 5 // EVENTS_TOTAL is not an event; all new events need to be LOCATION_REQUEST: 5,
LOCATION_UPDATE: 6,
EVENTS_TOTAL: 7 // EVENTS_TOTAL is not an event; all new events need to be
// added before it. // added before it.
}; };
...@@ -350,6 +352,7 @@ function requestNotificationCards(position, callback) { ...@@ -350,6 +352,7 @@ function requestNotificationCards(position, callback) {
*/ */
function requestLocation() { function requestLocation() {
console.log('requestLocation'); console.log('requestLocation');
recordEvent(DiagnosticEvent.LOCATION_REQUEST);
// TODO(vadimt): Figure out location request options. // TODO(vadimt): Figure out location request options.
chrome.location.watchLocation(LOCATION_WATCH_NAME, {}); chrome.location.watchLocation(LOCATION_WATCH_NAME, {});
} }
...@@ -589,4 +592,7 @@ chrome.notifications.onButtonClicked.addListener( ...@@ -589,4 +592,7 @@ chrome.notifications.onButtonClicked.addListener(
chrome.notifications.onClosed.addListener(onNotificationClosed); chrome.notifications.onClosed.addListener(onNotificationClosed);
chrome.location.onLocationUpdate.addListener(updateNotificationsCards); chrome.location.onLocationUpdate.addListener(function(position) {
recordEvent(DiagnosticEvent.LOCATION_UPDATE);
updateNotificationsCards(position);
});
...@@ -11271,6 +11271,8 @@ other types of suffix sets. ...@@ -11271,6 +11271,8 @@ other types of suffix sets.
<int value="2" label="CARDS_PARSE_SUCCESS"/> <int value="2" label="CARDS_PARSE_SUCCESS"/>
<int value="3" label="DISMISS_REQUEST_TOTAL"/> <int value="3" label="DISMISS_REQUEST_TOTAL"/>
<int value="4" label="DISMISS_REQUEST_SUCCESS"/> <int value="4" label="DISMISS_REQUEST_SUCCESS"/>
<int value="5" label="LOCATION_REQUEST"/>
<int value="6" label="LOCATION_UPDATE"/>
</enum> </enum>
<enum name="HttpAuthCount" type="int"> <enum name="HttpAuthCount" type="int">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment