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

Unified Diff: components/sync/driver/resources/user_events.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/resources/user_events.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/resources/user_events.js
diff --git a/components/sync/driver/resources/user_events.js b/components/sync/driver/resources/user_events.js
new file mode 100644
index 0000000000000000000000000000000000000000..cd94a2876cc64f5c139ebca32b5bef7298b79652
--- /dev/null
+++ b/components/sync/driver/resources/user_events.js
@@ -0,0 +1,24 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('chrome.sync.user_events', function() {
+ function write() {
+ chrome.sync.writeUserEvent(
+ $('event-time-usec-input').value,
+ $('navigation-id-input').value);
+ }
+
+ function onLoad() {
+ $('create-event-button').addEventListener('click', write);
+ }
+
+ return {
+ onLoad: onLoad
+ };
+});
+
+document.addEventListener(
+ 'DOMContentLoaded',
+ chrome.sync.user_events.onLoad,
+ false);
« no previous file with comments | « components/sync/driver/resources/user_events.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698