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

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: Rebase 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
« no previous file with comments | « components/sync/driver/about_sync_util.cc ('k') | components/sync/driver/resources/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9dde454e2ee651f4c75efff9732b39d8e31f0bc2 100644
--- a/components/sync/driver/resources/chrome_sync.js
+++ b/components/sync/driver/resources/chrome_sync.js
@@ -78,6 +78,23 @@ cr.define('chrome.sync', function() {
};
/**
+ * 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.
+ *
+ * @param {string} eventTimeUsec Timestamp for the new event.
+ * @param {string} navigationId Timestamp of linked sessions navigation.
+ */
+ 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.
*/
@@ -104,6 +121,7 @@ cr.define('chrome.sync', function() {
/**
* Called from C++ with the response to a getAllNodes request.
+ *
* @param {number} id The requestId passed in with the request.
* @param {Object} response The response to the request.
*/
@@ -122,5 +140,7 @@ cr.define('chrome.sync', function() {
registerForPerTypeCounters: registerForPerTypeCounters,
requestUpdatedAboutInfo: requestUpdatedAboutInfo,
requestListOfTypes: requestListOfTypes,
+ requestUserEventsVisibility: requestUserEventsVisibility,
+ writeUserEvent: writeUserEvent,
};
});
« no previous file with comments | « components/sync/driver/about_sync_util.cc ('k') | components/sync/driver/resources/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698