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..2a5dd13682028edaad939f038f44819b1a59b986 |
--- /dev/null |
+++ b/components/sync/driver/resources/user_events.js |
@@ -0,0 +1,25 @@ |
+// 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( |
+ document.getElementById('event-time-usec-input').value, |
Patrick Noland
2017/05/09 23:46:23
What happens if either of these fields has whitesp
skym
2017/05/10 00:06:46
"" => 0
" " => 0
" 123 " => 0
"12 3" => 0
"123" =>
|
+ document.getElementById('navigation-id-input').value); |
+ } |
+ |
+ function onLoad() { |
+ $('create-event-button').addEventListener('click', write); |
+ } |
+ |
+ return { |
+ onLoad: onLoad |
+ }; |
+}); |
+ |
+document.addEventListener( |
+ 'DOMContentLoaded', |
+ chrome.sync.user_events.onLoad, |
+ false); |
+ |