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

Unified Diff: components/sync/driver/resources/sync_index.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/index.html ('k') | components/sync/driver/resources/user_events.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/resources/sync_index.js
diff --git a/components/sync/driver/resources/sync_index.js b/components/sync/driver/resources/sync_index.js
index 7cce623df43f1377c4a570c4278ab508bc8777ee..87cbab3a173575cc885fb8040d0f590bd26355cf 100644
--- a/components/sync/driver/resources/sync_index.js
+++ b/components/sync/driver/resources/sync_index.js
@@ -10,3 +10,20 @@ if (cr.isWindows)
document.documentElement.setAttribute('os', 'win');
cr.ui.decorate('tabbox', cr.ui.TabBox);
+
+cr.define('chrome.sync.index', function() {
+ function setUserEventsTabVisibility(visible) {
+ $('sync-user-events-tab').hidden = !visible;
+ }
+
+ function onLoad() {
+ chrome.sync.userEventsVisibilityCallback = setUserEventsTabVisibility;
+ chrome.sync.requestUserEventsVisibility();
+ }
+
+ return {
+ onLoad: onLoad
+ };
+});
+
+document.addEventListener('DOMContentLoaded', chrome.sync.index.onLoad, false);
« no previous file with comments | « components/sync/driver/resources/index.html ('k') | components/sync/driver/resources/user_events.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698