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

Unified Diff: components/sync/driver/resources/chrome_sync.js

Issue 2872023002: [Sync] Add a simple UI to sync-internals to create UserEvents. (Closed)
Patch Set: Updates for Patrick. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/driver/resources/chrome_sync.js
diff --git a/components/sync/driver/resources/chrome_sync.js b/components/sync/driver/resources/chrome_sync.js
index 93121fde889e76c39f8d4a0655b192a78ced7492..4d0b8d3603ad430fa21c811f6ce81c4f03b06dbb 100644
--- a/components/sync/driver/resources/chrome_sync.js
+++ b/components/sync/driver/resources/chrome_sync.js
@@ -77,6 +77,20 @@ cr.define('chrome.sync', function() {
chrome.send('requestListOfTypes');
};
+ /**
+ * Asks the browser if we should show the User Events tab or not.
+ */
+ var requestUserEventsVisibility = function() {
+ chrome.send('requestUserEventsVisibility');
+ };
+
+ /**
+ * Sends data to construct a user event that should be committed.
+ */
+ var writeUserEvent = function(eventTimeUsec, navigationId) {
+ chrome.send('writeUserEvent', [eventTimeUsec, navigationId]);
+ };
+
/**
* Counter to uniquely identify requests while they're in progress.
* Used in the implementation of GetAllNodes.
@@ -122,5 +136,7 @@ cr.define('chrome.sync', function() {
registerForPerTypeCounters: registerForPerTypeCounters,
requestUpdatedAboutInfo: requestUpdatedAboutInfo,
requestListOfTypes: requestListOfTypes,
+ requestUserEventsVisibility: requestUserEventsVisibility,
+ writeUserEvent: writeUserEvent,
};
});

Powered by Google App Engine
This is Rietveld 408576698