Move extras/about_tracing to ui/extras.

This moves the about_tracing UI out of extras and
into ui/extras.

BUG=#999
TBR=nduca@chromium.org

Review URL: https://codereview.appspot.com/249860043.
diff --git a/examples/chrome_inspect_test_shell.html b/examples/chrome_inspect_test_shell.html
index 56790b8..3c22f36 100644
--- a/examples/chrome_inspect_test_shell.html
+++ b/examples/chrome_inspect_test_shell.html
@@ -12,7 +12,7 @@
 <script src="/components/webcomponentsjs/webcomponents.js"></script>
 
 <link rel="import" href="/components/polymer/polymer.html">
-<link rel="import" href="/extras/about_tracing/profiling_view.html">
+<link rel="import" href="/ui/extras/about_tracing/profiling_view.html">
 
 <style>
   body {
@@ -55,8 +55,8 @@
       return;
     }
 
-    var tracingControllerClient = new tr.e.about_tracing.InspectorTracingControllerClient(); // @suppress longLineCheck
-    profilingViewEl = new tr.e.about_tracing.ProfilingView(tracingControllerClient); // @suppress longLineCheck
+    var tracingControllerClient = new tr.ui.e.about_tracing.InspectorTracingControllerClient(); // @suppress longLineCheck
+    profilingViewEl = new tr.ui.e.about_tracing.ProfilingView(tracingControllerClient); // @suppress longLineCheck
     document.body.appendChild(profilingViewEl);
   }
   window.addEventListener('load', onLoad);
diff --git a/trace_viewer.gypi b/trace_viewer.gypi
index 98f7636..5a119ad 100644
--- a/trace_viewer.gypi
+++ b/trace_viewer.gypi
@@ -5,7 +5,6 @@
 {
   'variables': {
     'tracing_css_files': [
-      'trace_viewer/extras/about_tracing/common.css',
       'trace_viewer/extras/chrome/cc/display_item_view.css',
       'trace_viewer/extras/chrome/cc/layer_picker.css',
       'trace_viewer/extras/chrome/cc/layer_tree_host_impl_view.css',
@@ -30,6 +29,7 @@
       'trace_viewer/ui/base/sortable_table.css',
       'trace_viewer/ui/base/sunburst_chart.css',
       'trace_viewer/ui/base/tool_button.css',
+      'trace_viewer/ui/extras/about_tracing/common.css',
       'trace_viewer/ui/timeline_track_view.css',
       'trace_viewer/ui/timeline_view.css',
       'trace_viewer/ui/tracks/drawing_container.css',
@@ -83,14 +83,6 @@
       'trace_viewer/core/scripting_object.html',
       'trace_viewer/core/selection.html',
       'trace_viewer/core/selection_controller.html',
-      'trace_viewer/extras/about_tracing/about_tracing.html',
-      'trace_viewer/extras/about_tracing/inspector_connection.html',
-      'trace_viewer/extras/about_tracing/inspector_tracing_controller_client.html',
-      'trace_viewer/extras/about_tracing/profiling_view.html',
-      'trace_viewer/extras/about_tracing/record_and_capture_controller.html',
-      'trace_viewer/extras/about_tracing/record_selection_dialog.html',
-      'trace_viewer/extras/about_tracing/tracing_controller_client.html',
-      'trace_viewer/extras/about_tracing/xhr_based_tracing_controller_client.html',
       'trace_viewer/extras/android/android_app.html',
       'trace_viewer/extras/android/android_auditor.html',
       'trace_viewer/extras/android/android_model_helper.html',
@@ -347,6 +339,14 @@
       'trace_viewer/ui/base/ui.html',
       'trace_viewer/ui/base/ui_state.html',
       'trace_viewer/ui/base/utils.html',
+      'trace_viewer/ui/extras/about_tracing/about_tracing.html',
+      'trace_viewer/ui/extras/about_tracing/inspector_connection.html',
+      'trace_viewer/ui/extras/about_tracing/inspector_tracing_controller_client.html',
+      'trace_viewer/ui/extras/about_tracing/profiling_view.html',
+      'trace_viewer/ui/extras/about_tracing/record_and_capture_controller.html',
+      'trace_viewer/ui/extras/about_tracing/record_selection_dialog.html',
+      'trace_viewer/ui/extras/about_tracing/tracing_controller_client.html',
+      'trace_viewer/ui/extras/about_tracing/xhr_based_tracing_controller_client.html',
       'trace_viewer/ui/extras/analysis/sampling_summary.html',
       'trace_viewer/ui/extras/side_panel/alerts_side_panel.html',
       'trace_viewer/ui/extras/side_panel/input_latency_side_panel.html',
diff --git a/trace_viewer/build/check_common.py b/trace_viewer/build/check_common.py
index ecf8388..9ba746b 100644
--- a/trace_viewer/build/check_common.py
+++ b/trace_viewer/build/check_common.py
@@ -45,7 +45,7 @@
 
 def GetKnownFiles():
   p = trace_viewer_project.TraceViewerProject()
-  m = p.loader.LoadModule(module_name='extras.about_tracing.about_tracing')
+  m = p.loader.LoadModule(module_name='ui.extras.about_tracing.about_tracing')
   absolute_filenames = m.GetAllDependentFilenamesRecursive(
       include_raw_scripts=False)
 
diff --git a/trace_viewer/build/generate_about_tracing_contents.py b/trace_viewer/build/generate_about_tracing_contents.py
index 44a9fee..b07869c 100644
--- a/trace_viewer/build/generate_about_tracing_contents.py
+++ b/trace_viewer/build/generate_about_tracing_contents.py
@@ -14,9 +14,9 @@
   parser = optparse.OptionParser(usage="%prog --outdir=<directory>")
   parser.add_option("--outdir", dest="out_dir",
                     help="Where to place generated content")
-  parser.add_option('--no-min', dest='no_min', default=False, 
+  parser.add_option('--no-min', dest='no_min', default=False,
                     action='store_true',
-                    help='skip minification')                    
+                    help='skip minification')
   options, args = parser.parse_args(args)
 
   if not options.out_dir:
@@ -24,7 +24,7 @@
     parser.print_help()
     return 1
 
-  filenames = ["extras/about_tracing/about_tracing.html"]
+  filenames = ["ui/extras/about_tracing/about_tracing.html"]
   project = trace_viewer_project.TraceViewerProject()
   load_sequence = project.CalcLoadSequenceForModuleFilenames(filenames)
 
diff --git a/trace_viewer/extras/about_tracing/inspector_tracing_controller_client_test.html b/trace_viewer/extras/about_tracing/inspector_tracing_controller_client_test.html
deleted file mode 100644
index b25cce8..0000000
--- a/trace_viewer/extras/about_tracing/inspector_tracing_controller_client_test.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 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.
--->
-
-<link rel="import" href="/extras/about_tracing/inspector_tracing_controller_client.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() { // @suppress longLineCheck
-  test('beginRecording_sendCategoriesAndOptions', function() {
-    var controller = new tr.e.about_tracing.InspectorTracingControllerClient();
-    controller.conn_ = new (function() {
-      this.req = function(method, params) {
-        var msg = JSON.stringify({
-          id: 1,
-          method: method,
-          params: params
-        });
-        return new (function() {
-          this.msg = msg;
-          this.then = function(m1, m2) {
-            return this;
-          };
-        })();
-      };
-      this.setNotificationListener = function(method, listener) {
-      };
-    })();
-
-    var recordingOptions = {
-      categoryFilter: JSON.stringify(['a', 'b', 'c']),
-      useSystemTracing: false,
-      tracingRecordMode: 'test-mode',
-      useSampling: true
-    };
-
-    var result = JSON.parse(controller.beginRecording(recordingOptions).msg);
-    assert.equal(result.params.categories, JSON.stringify(['a', 'b', 'c']));
-    var options = result.params.options.split(',');
-    var tracingRecordTestMode = false;
-    var sampleFlag = false;
-    for (var s in options) {
-      if (options[s] === 'test-mode') tracingRecordTestMode = true;
-      else if (options[s] === 'enable-sampling') sampleFlag = true;
-      else assert.equal(options[s], '');
-    }
-    assert.isTrue(tracingRecordTestMode);
-    assert.isTrue(sampleFlag);
-  });
-
-  test('oldFormat', function() {
-    var chunks = [];
-    tr.e.about_tracing.appendTraceChunksTo(chunks, '"{ "method": "Tracing.dataCollected", "params": { "value": [ {"cat":"__metadata","pid":28871,"tid":0,"ts":0,"ph":"M","name":"num_cpus","args":{"number":4}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_sort_index","args":{"sort_index":-5}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_name","args":{"name":"Renderer"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_labels","args":{"labels":"JS Bin"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_sort_index","args":{"sort_index":-1}},{"cat":"__metadata","pid":28871,"tid":28917,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Compositor"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Chrome_ChildIOThread"}},{"cat":"__metadata","pid":28871,"tid":28919,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CompositorRasterWorker1/28919"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CrRendererMain"}},{"cat":"ipc,toplevel","pid":28871,"tid":28911,"ts":22000084746,"ph":"X","name":"ChannelReader::DispatchInputData","args":{"class":64,"line":25},"tdur":0,"tts":1853064},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"overhead","args":{"average_overhead":0.015}} ] } }"'); // @suppress longLineCheck
-    assert.equal(chunks.length, 1);
-    JSON.parse('[' + chunks.join('') + ']');
-  });
-
-  test('newFormat', function() {
-    var chunks = [];
-    tr.e.about_tracing.appendTraceChunksTo(chunks, '"{ "method": "Tracing.dataCollected", "params": { "value": [{"cat":"__metadata","pid":28871,"tid":0,"ts":0,"ph":"M","name":"num_cpus","args":{"number":4}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_sort_index","args":{"sort_index":-5}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_name","args":{"name":"Renderer"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_labels","args":{"labels":"JS Bin"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_sort_index","args":{"sort_index":-1}},{"cat":"__metadata","pid":28871,"tid":28917,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Compositor"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Chrome_ChildIOThread"}},{"cat":"__metadata","pid":28871,"tid":28919,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CompositorRasterWorker1/28919"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CrRendererMain"}},{"cat":"ipc,toplevel","pid":28871,"tid":28911,"ts":22000084746,"ph":"X","name":"ChannelReader::DispatchInputData","args":{"class":64,"line":25},"tdur":0,"tts":1853064},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"overhead","args":{"average_overhead":0.015}}] } }"'); // @suppress longLineCheck
-    assert.equal(chunks.length, 1);
-    JSON.parse('[' + chunks.join('') + ']');
-  });
-
-  test('stringAndObjectPayload', function() {
-    var connection = new tr.e.about_tracing.InspectorConnection();
-    connection.setNotificationListener('Tracing.dataCollected',
-        function(message) {
-          assert.typeOf(message, 'string');
-          JSON.parse(message);
-        }
-    );
-    connection.dispatchMessage_('{ "method": "Tracing.dataCollected", "params": { "value": [] } }'); // @suppress longLineCheck
-    connection.dispatchMessage_({'method': 'Tracing.dataCollected', 'params': {'value': [] } }); // @suppress longLineCheck
-  });
-});
-</script>
diff --git a/trace_viewer/extras/importer/linux_perf/parser.html b/trace_viewer/extras/importer/linux_perf/parser.html
index 451ec3f..7a0e144 100644
--- a/trace_viewer/extras/importer/linux_perf/parser.html
+++ b/trace_viewer/extras/importer/linux_perf/parser.html
@@ -63,7 +63,7 @@
  *
  * and be listed in the dependsOn of LinuxPerfImporter.  Beware that after
  * adding a new subclass you must run build/generate_about_tracing_contents.py
- * to regenerate tr.e.about_tracing.*.
+ * to regenerate tr.ui.e.about_tracing.*.
  */
 tr.exportTo('tr.e.importer.linux_perf', function() {
   /**
diff --git a/trace_viewer/extras/about_tracing/about_tracing.html b/trace_viewer/ui/extras/about_tracing/about_tracing.html
similarity index 65%
rename from trace_viewer/extras/about_tracing/about_tracing.html
rename to trace_viewer/ui/extras/about_tracing/about_tracing.html
index 9afeb23..4851313 100644
--- a/trace_viewer/extras/about_tracing/about_tracing.html
+++ b/trace_viewer/ui/extras/about_tracing/about_tracing.html
@@ -4,17 +4,17 @@
 Use of this source code is governed by a BSD-style license that can be
 found in the LICENSE file.
 -->
-<link rel="stylesheet" href="/extras/about_tracing/common.css">
-<link rel="import" href="/extras/about_tracing/profiling_view.html">
+<link rel="stylesheet" href="/ui/extras/about_tracing/common.css">
+<link rel="import" href="/ui/extras/about_tracing/profiling_view.html">
 <link rel="import" href="/extras/full_config.html">
 <script>
 'use strict';
 
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   window.profilingView = undefined;  // Made global for debugging purposes only.
 
   document.addEventListener('DOMContentLoaded', function() {
-    window.profilingView = new tr.e.about_tracing.ProfilingView();
+    window.profilingView = new tr.ui.e.about_tracing.ProfilingView();
     document.body.appendChild(profilingView);
   });
 
diff --git a/trace_viewer/extras/about_tracing/common.css b/trace_viewer/ui/extras/about_tracing/common.css
similarity index 100%
rename from trace_viewer/extras/about_tracing/common.css
rename to trace_viewer/ui/extras/about_tracing/common.css
diff --git a/trace_viewer/extras/about_tracing/inspector_connection.html b/trace_viewer/ui/extras/about_tracing/inspector_connection.html
similarity index 98%
rename from trace_viewer/extras/about_tracing/inspector_connection.html
rename to trace_viewer/ui/extras/about_tracing/inspector_connection.html
index ccd83c3..1bdb20c 100644
--- a/trace_viewer/extras/about_tracing/inspector_connection.html
+++ b/trace_viewer/ui/extras/about_tracing/inspector_connection.html
@@ -13,7 +13,7 @@
  * Contains connection code that inspector's embedding framework calls on
  * tracing, and that tracing can use to talk to inspector.
  */
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   // Interface used by inspector when it hands data to us from the backend.
   window.DevToolsAPI = {
     setToolbarColors: function() { },
diff --git a/trace_viewer/extras/about_tracing/inspector_tracing_controller_client.html b/trace_viewer/ui/extras/about_tracing/inspector_tracing_controller_client.html
similarity index 93%
rename from trace_viewer/extras/about_tracing/inspector_tracing_controller_client.html
rename to trace_viewer/ui/extras/about_tracing/inspector_tracing_controller_client.html
index f3247b6..86552b3 100644
--- a/trace_viewer/extras/about_tracing/inspector_tracing_controller_client.html
+++ b/trace_viewer/ui/extras/about_tracing/inspector_tracing_controller_client.html
@@ -5,13 +5,14 @@
 found in the LICENSE file.
 -->
 
-<link rel="import" href="/extras/about_tracing/tracing_controller_client.html">
-<link rel="import" href="/extras/about_tracing/inspector_connection.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/tracing_controller_client.html">
+<link rel="import" href="/ui/extras/about_tracing/inspector_connection.html">
 
 <script>
 'use strict';
 
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   function createResolvedPromise(data) {
     var promise = new Promise(function(resolve, reject) {
       if (data)
@@ -43,12 +44,12 @@
   function InspectorTracingControllerClient() {
     this.recording_ = false;
     this.bufferUsage_ = 0;
-    this.conn_ = tr.e.about_tracing.InspectorConnection.instance;
+    this.conn_ = tr.ui.e.about_tracing.InspectorConnection.instance;
     this.currentTraceTextChunks_ = undefined;
   }
 
   InspectorTracingControllerClient.prototype = {
-    __proto__: tr.e.about_tracing.TracingControllerClient.prototype,
+    __proto__: tr.ui.e.about_tracing.TracingControllerClient.prototype,
 
     beginMonitoring: function(monitoringOptions) {
       throw new Error('Not implemented');
diff --git a/trace_viewer/ui/extras/about_tracing/inspector_tracing_controller_client_test.html b/trace_viewer/ui/extras/about_tracing/inspector_tracing_controller_client_test.html
new file mode 100644
index 0000000..abf15cc
--- /dev/null
+++ b/trace_viewer/ui/extras/about_tracing/inspector_tracing_controller_client_test.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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.
+-->
+
+<link rel="import"
+      href="/ui/extras/about_tracing/inspector_tracing_controller_client.html">
+
+<script>
+'use strict';
+
+tr.b.unittest.testSuite(function() { // @suppress longLineCheck
+  test('beginRecording_sendCategoriesAndOptions', function() {
+    var controller =
+        new tr.ui.e.about_tracing.InspectorTracingControllerClient();
+    controller.conn_ = new (function() {
+      this.req = function(method, params) {
+        var msg = JSON.stringify({
+          id: 1,
+          method: method,
+          params: params
+        });
+        return new (function() {
+          this.msg = msg;
+          this.then = function(m1, m2) {
+            return this;
+          };
+        })();
+      };
+      this.setNotificationListener = function(method, listener) {
+      };
+    })();
+
+    var recordingOptions = {
+      categoryFilter: JSON.stringify(['a', 'b', 'c']),
+      useSystemTracing: false,
+      tracingRecordMode: 'test-mode',
+      useSampling: true
+    };
+
+    var result = JSON.parse(controller.beginRecording(recordingOptions).msg);
+    assert.equal(result.params.categories, JSON.stringify(['a', 'b', 'c']));
+    var options = result.params.options.split(',');
+    var tracingRecordTestMode = false;
+    var sampleFlag = false;
+    for (var s in options) {
+      if (options[s] === 'test-mode') tracingRecordTestMode = true;
+      else if (options[s] === 'enable-sampling') sampleFlag = true;
+      else assert.equal(options[s], '');
+    }
+    assert.isTrue(tracingRecordTestMode);
+    assert.isTrue(sampleFlag);
+  });
+
+  test('oldFormat', function() {
+    var chunks = [];
+    tr.ui.e.about_tracing.appendTraceChunksTo(chunks, '"{ "method": "Tracing.dataCollected", "params": { "value": [ {"cat":"__metadata","pid":28871,"tid":0,"ts":0,"ph":"M","name":"num_cpus","args":{"number":4}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_sort_index","args":{"sort_index":-5}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_name","args":{"name":"Renderer"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_labels","args":{"labels":"JS Bin"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_sort_index","args":{"sort_index":-1}},{"cat":"__metadata","pid":28871,"tid":28917,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Compositor"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Chrome_ChildIOThread"}},{"cat":"__metadata","pid":28871,"tid":28919,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CompositorRasterWorker1/28919"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CrRendererMain"}},{"cat":"ipc,toplevel","pid":28871,"tid":28911,"ts":22000084746,"ph":"X","name":"ChannelReader::DispatchInputData","args":{"class":64,"line":25},"tdur":0,"tts":1853064},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"overhead","args":{"average_overhead":0.015}} ] } }"'); // @suppress longLineCheck
+    assert.equal(chunks.length, 1);
+    JSON.parse('[' + chunks.join('') + ']');
+  });
+
+  test('newFormat', function() {
+    var chunks = [];
+    tr.ui.e.about_tracing.appendTraceChunksTo(chunks, '"{ "method": "Tracing.dataCollected", "params": { "value": [{"cat":"__metadata","pid":28871,"tid":0,"ts":0,"ph":"M","name":"num_cpus","args":{"number":4}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_sort_index","args":{"sort_index":-5}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_name","args":{"name":"Renderer"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_labels","args":{"labels":"JS Bin"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_sort_index","args":{"sort_index":-1}},{"cat":"__metadata","pid":28871,"tid":28917,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Compositor"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Chrome_ChildIOThread"}},{"cat":"__metadata","pid":28871,"tid":28919,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CompositorRasterWorker1/28919"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CrRendererMain"}},{"cat":"ipc,toplevel","pid":28871,"tid":28911,"ts":22000084746,"ph":"X","name":"ChannelReader::DispatchInputData","args":{"class":64,"line":25},"tdur":0,"tts":1853064},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"overhead","args":{"average_overhead":0.015}}] } }"'); // @suppress longLineCheck
+    assert.equal(chunks.length, 1);
+    JSON.parse('[' + chunks.join('') + ']');
+  });
+
+  test('stringAndObjectPayload', function() {
+    var connection = new tr.ui.e.about_tracing.InspectorConnection();
+    connection.setNotificationListener('Tracing.dataCollected',
+        function(message) {
+          assert.typeOf(message, 'string');
+          JSON.parse(message);
+        }
+    );
+    connection.dispatchMessage_('{ "method": "Tracing.dataCollected", "params": { "value": [] } }'); // @suppress longLineCheck
+    connection.dispatchMessage_({'method': 'Tracing.dataCollected', 'params': {'value': [] } }); // @suppress longLineCheck
+  });
+});
+</script>
diff --git a/trace_viewer/extras/about_tracing/mock_tracing_controller_client.html b/trace_viewer/ui/extras/about_tracing/mock_tracing_controller_client.html
similarity index 92%
rename from trace_viewer/extras/about_tracing/mock_tracing_controller_client.html
rename to trace_viewer/ui/extras/about_tracing/mock_tracing_controller_client.html
index 2354f50..8aed061 100644
--- a/trace_viewer/extras/about_tracing/mock_tracing_controller_client.html
+++ b/trace_viewer/ui/extras/about_tracing/mock_tracing_controller_client.html
@@ -5,12 +5,13 @@
 found in the LICENSE file.
 -->
 
-<link rel="import" href="/extras/about_tracing/tracing_controller_client.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/tracing_controller_client.html">
 
 <script>
 'use strict';
 
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   function MockTracingControllerClient() {
     this.requests = [];
     this.nextRequestIndex = 0;
@@ -18,7 +19,7 @@
   }
 
   MockTracingControllerClient.prototype = {
-    __proto__: tr.e.about_tracing.TracingControllerClient.prototype,
+    __proto__: tr.ui.e.about_tracing.TracingControllerClient.prototype,
 
     expectRequest: function(method, generateResponse) {
       var generateResponseCb;
diff --git a/trace_viewer/extras/about_tracing/profiling_view.html b/trace_viewer/ui/extras/about_tracing/profiling_view.html
similarity index 93%
rename from trace_viewer/extras/about_tracing/profiling_view.html
rename to trace_viewer/ui/extras/about_tracing/profiling_view.html
index 52099a1..cd70448 100644
--- a/trace_viewer/extras/about_tracing/profiling_view.html
+++ b/trace_viewer/ui/extras/about_tracing/profiling_view.html
@@ -5,9 +5,12 @@
 found in the LICENSE file.
 -->
 
-<link rel="import" href="/extras/about_tracing/record_and_capture_controller.html">
-<link rel="import" href="/extras/about_tracing/inspector_tracing_controller_client.html">
-<link rel="import" href="/extras/about_tracing/xhr_based_tracing_controller_client.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/record_and_capture_controller.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/inspector_tracing_controller_client.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/xhr_based_tracing_controller_client.html">
 <link rel="import" href="/trace_viewer.html">
 <link rel="import" href="/ui/base/info_bar_group.html">
 <link rel="import" href="/ui/base/key_event_manager.html">
@@ -69,7 +72,7 @@
  * @fileoverview ProfilingView glues the View control to
  * TracingController.
  */
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   function readFile(file) {
     return new Promise(function(resolve, reject) {
       var reader = new FileReader();
@@ -127,10 +130,10 @@
         this.tracingControllerClient_ = tracingControllerClient;
       } else if (window.DevToolsHost !== undefined) {
         this.tracingControllerClient_ =
-            new tr.e.about_tracing.InspectorTracingControllerClient();
+            new tr.ui.e.about_tracing.InspectorTracingControllerClient();
       } else {
         this.tracingControllerClient_ =
-            new tr.e.about_tracing.XhrBasedTracingControllerClient();
+            new tr.ui.e.about_tracing.XhrBasedTracingControllerClient();
       }
 
       this.isRecording_ = false;
@@ -189,7 +192,7 @@
 
     updateTracingControllerSpecificState_: function() {
       var isInspector = this.tracingControllerClient_ instanceof
-          tr.e.about_tracing.InspectorTracingControllerClient;
+          tr.ui.e.about_tracing.InspectorTracingControllerClient;
 
       if (isInspector) {
         this.infoBarGroup_.addMessage(
@@ -213,7 +216,7 @@
       var buttons = this.querySelector('x-timeline-view-buttons');
       buttons.querySelector('#monitor-checkbox').disabled = true;
       buttons.querySelector('#monitor-checkbox').checked = false;
-      var resultPromise = tr.e.about_tracing.beginRecording(
+      var resultPromise = tr.ui.e.about_tracing.beginRecording(
           this.tracingControllerClient_);
       resultPromise.then(
           function(data) {
@@ -224,7 +227,7 @@
           function(err) {
             this.isRecording_ = false;
             buttons.querySelector('#monitor-checkbox').disabled = false;
-            if (err instanceof tr.e.about_tracing.UserCancelledError)
+            if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
               return;
             tr.ui.b.Overlay.showError('Error while recording', err);
           }.bind(this));
@@ -238,12 +241,12 @@
         throw new Error('Already monitoring');
       var buttons = this.querySelector('x-timeline-view-buttons');
       var resultPromise =
-          tr.e.about_tracing.beginMonitoring(this.tracingControllerClient_);
+          tr.ui.e.about_tracing.beginMonitoring(this.tracingControllerClient_);
       resultPromise.then(
           function() {
           }.bind(this),
           function(err) {
-            if (err instanceof tr.e.about_tracing.UserCancelledError)
+            if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
               return;
             tr.ui.b.Overlay.showError('Error while monitoring', err);
           }.bind(this));
@@ -257,12 +260,12 @@
         throw new Error('Monitoring is disabled');
       var buttons = this.querySelector('x-timeline-view-buttons');
       var resultPromise =
-          tr.e.about_tracing.endMonitoring(this.tracingControllerClient_);
+          tr.ui.e.about_tracing.endMonitoring(this.tracingControllerClient_);
       resultPromise.then(
           function() {
           }.bind(this),
           function(err) {
-            if (err instanceof tr.e.about_tracing.UserCancelledError)
+            if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
               return;
             tr.ui.b.Overlay.showError('Error while monitoring', err);
           }.bind(this));
@@ -273,13 +276,14 @@
       if (!this.isMonitoring_)
         throw new Error('Monitoring is disabled');
       var resultPromise =
-          tr.e.about_tracing.captureMonitoring(this.tracingControllerClient_);
+          tr.ui.e.about_tracing.captureMonitoring(
+              this.tracingControllerClient_);
       resultPromise.then(
           function(data) {
             this.setActiveTrace('trace.json', data, true);
           }.bind(this),
           function(err) {
-            if (err instanceof tr.e.about_tracing.UserCancelledError)
+            if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
               return;
             tr.ui.b.Overlay.showError('Error while monitoring', err);
           }.bind(this));
@@ -288,13 +292,14 @@
 
     getMonitoringStatus: function() {
       var resultPromise =
-          tr.e.about_tracing.getMonitoringStatus(this.tracingControllerClient_);
+          tr.ui.e.about_tracing.getMonitoringStatus(
+              this.tracingControllerClient_);
       resultPromise.then(
           function(status) {
             this.onMonitoringStateChanged_(status.isMonitoring);
           }.bind(this),
           function(err) {
-            if (err instanceof tr.e.about_tracing.UserCancelledError)
+            if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
               return;
             tr.ui.b.Overlay.showError('Error while updating tracing states',
                                       err);
diff --git a/trace_viewer/extras/about_tracing/profiling_view_test.html b/trace_viewer/ui/extras/about_tracing/profiling_view_test.html
similarity index 92%
rename from trace_viewer/extras/about_tracing/profiling_view_test.html
rename to trace_viewer/ui/extras/about_tracing/profiling_view_test.html
index d494a96..07fa553 100644
--- a/trace_viewer/extras/about_tracing/profiling_view_test.html
+++ b/trace_viewer/ui/extras/about_tracing/profiling_view_test.html
@@ -5,9 +5,10 @@
 found in the LICENSE file.
 -->
 
-<link rel="import" href="/extras/about_tracing/mock_tracing_controller_client.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/mock_tracing_controller_client.html">
 <link rel="import" href="/extras/importer/trace_event_importer.html">
-<link rel="import" href="/extras/about_tracing/profiling_view.html">
+<link rel="import" href="/ui/extras/about_tracing/profiling_view.html">
 
 <script>
 'use strict';
@@ -28,10 +29,10 @@
     useSampling: false
   };
 
-  var ProfilingView = tr.e.about_tracing.ProfilingView;
+  var ProfilingView = tr.ui.e.about_tracing.ProfilingView;
 
   test('recording', function() {
-    var mock = new tr.e.about_tracing.MockTracingControllerClient();
+    var mock = new tr.ui.e.about_tracing.MockTracingControllerClient();
     mock.allowLooping = true;
     mock.expectRequest('getMonitoringStatus', function() {
       return btoa(JSON.stringify(monitoringOptions));
@@ -75,7 +76,7 @@
   });
 
   test('monitoring', function() {
-    var mock = new tr.e.about_tracing.MockTracingControllerClient();
+    var mock = new tr.ui.e.about_tracing.MockTracingControllerClient();
     mock.allowLooping = true;
     mock.expectRequest('getMonitoringStatus', function() {
       return btoa(JSON.stringify(monitoringOptions));
@@ -129,7 +130,7 @@
   });
 
   test('upload', function() {
-    var mock = new tr.e.about_tracing.MockTracingControllerClient();
+    var mock = new tr.ui.e.about_tracing.MockTracingControllerClient();
     mock.allowLooping = true;
     mock.expectRequest('getMonitoringStatus', function() {
       return btoa(JSON.stringify(monitoringOptions));
diff --git a/trace_viewer/extras/about_tracing/record_and_capture_controller.html b/trace_viewer/ui/extras/about_tracing/record_and_capture_controller.html
similarity index 95%
rename from trace_viewer/extras/about_tracing/record_and_capture_controller.html
rename to trace_viewer/ui/extras/about_tracing/record_and_capture_controller.html
index a960df7..d733b15 100644
--- a/trace_viewer/extras/about_tracing/record_and_capture_controller.html
+++ b/trace_viewer/ui/extras/about_tracing/record_and_capture_controller.html
@@ -5,12 +5,12 @@
 found in the LICENSE file.
 -->
 
-<link rel="import" href="/extras/about_tracing/record_selection_dialog.html">
+<link rel="import" href="/ui/extras/about_tracing/record_selection_dialog.html">
 
 <script>
 'use strict';
 
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   function beginMonitoring(tracingControllerClient) {
     var finalPromiseResolver;
     var finalPromise = new Promise(function(resolve, reject) {
@@ -101,9 +101,10 @@
     // Step 2: Show tracing dialog.
     var selectionDlg;
     function showTracingDialog(categories) {
-      selectionDlg = new tr.e.about_tracing.RecordSelectionDialog();
+      selectionDlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
       selectionDlg.categories = categories;
-      selectionDlg.settings_key = 'tr.e.about_tracing.record_selection_dialog';
+      selectionDlg.settings_key =
+          'tr.ui.e.about_tracing.record_selection_dialog';
       selectionDlg.addEventListener('recordclick', startTracing);
       selectionDlg.addEventListener('closeclick', cancelRecording);
       selectionDlg.visible = true;
diff --git a/trace_viewer/extras/about_tracing/record_and_capture_controller_test.html b/trace_viewer/ui/extras/about_tracing/record_and_capture_controller_test.html
similarity index 84%
rename from trace_viewer/extras/about_tracing/record_and_capture_controller_test.html
rename to trace_viewer/ui/extras/about_tracing/record_and_capture_controller_test.html
index e68af83..75dce05 100644
--- a/trace_viewer/extras/about_tracing/record_and_capture_controller_test.html
+++ b/trace_viewer/ui/extras/about_tracing/record_and_capture_controller_test.html
@@ -5,8 +5,10 @@
 found in the LICENSE file.
 -->
 
-<link rel="import" href="/extras/about_tracing/mock_tracing_controller_client.html">
-<link rel="import" href="/extras/about_tracing/record_and_capture_controller.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/mock_tracing_controller_client.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/record_and_capture_controller.html">
 
 <script>
 'use strict';
@@ -21,7 +23,7 @@
 
   test('fullRecording', function() {
     return new Promise(function(resolve, reject) {
-      var mock = new tr.e.about_tracing.MockTracingControllerClient();
+      var mock = new tr.ui.e.about_tracing.MockTracingControllerClient();
       mock.expectRequest('endRecording', function() {
         return '';
       });
@@ -45,7 +47,7 @@
         return JSON.stringify(testData);
       });
 
-      var recordingPromise = tr.e.about_tracing.beginRecording(mock);
+      var recordingPromise = tr.ui.e.about_tracing.beginRecording(mock);
 
       return recordingPromise.then(
           function(data) {
@@ -62,7 +64,7 @@
 
   test('monitoring', function() {
     return new Promise(function(resolve, reject) {
-      var mock = new tr.e.about_tracing.MockTracingControllerClient();
+      var mock = new tr.ui.e.about_tracing.MockTracingControllerClient();
 
       mock.expectRequest('beginMonitoring', function(monitoringOptions) {
         assert.typeOf(monitoringOptions.categoryFilter, 'string');
@@ -70,7 +72,7 @@
         assert.typeOf(monitoringOptions.useSampling, 'boolean');
         assert.typeOf(monitoringOptions.tracingRecordMode, 'string');
         setTimeout(function() {
-          var capturePromise = tr.e.about_tracing.captureMonitoring(mock);
+          var capturePromise = tr.ui.e.about_tracing.captureMonitoring(mock);
           capturePromise.then(
               function(data) {
                 var testDataString = JSON.stringify(testData);
@@ -85,7 +87,7 @@
 
       mock.expectRequest('captureMonitoring', function(data) {
         setTimeout(function() {
-          var endPromise = tr.e.about_tracing.endMonitoring(mock);
+          var endPromise = tr.ui.e.about_tracing.endMonitoring(mock);
           endPromise.then(
               function(data) {
                 mock.assertAllRequestsHandled();
@@ -101,7 +103,7 @@
       mock.expectRequest('endMonitoring', function(data) {
       });
 
-      tr.e.about_tracing.beginMonitoring(mock);
+      tr.ui.e.about_tracing.beginMonitoring(mock);
     });
   });
 });
diff --git a/trace_viewer/extras/about_tracing/record_selection_dialog.html b/trace_viewer/ui/extras/about_tracing/record_selection_dialog.html
similarity index 99%
rename from trace_viewer/extras/about_tracing/record_selection_dialog.html
rename to trace_viewer/ui/extras/about_tracing/record_selection_dialog.html
index 3bf0b71..800e5dc 100644
--- a/trace_viewer/extras/about_tracing/record_selection_dialog.html
+++ b/trace_viewer/ui/extras/about_tracing/record_selection_dialog.html
@@ -153,7 +153,7 @@
  * @fileoverview RecordSelectionDialog presents the available categories
  * to be enabled/disabled during tr.c.
  */
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   var THIS_DOC = document.currentScript.ownerDocument;
   var RecordSelectionDialog = tr.ui.b.define('div');
 
diff --git a/trace_viewer/extras/about_tracing/record_selection_dialog_test.html b/trace_viewer/ui/extras/about_tracing/record_selection_dialog_test.html
similarity index 92%
rename from trace_viewer/extras/about_tracing/record_selection_dialog_test.html
rename to trace_viewer/ui/extras/about_tracing/record_selection_dialog_test.html
index f204b3c..9ef9db6 100644
--- a/trace_viewer/extras/about_tracing/record_selection_dialog_test.html
+++ b/trace_viewer/ui/extras/about_tracing/record_selection_dialog_test.html
@@ -5,7 +5,7 @@
 found in the LICENSE file.
 -->
 
-<link rel="import" href="/extras/about_tracing/record_selection_dialog.html">
+<link rel="import" href="/ui/extras/about_tracing/record_selection_dialog.html">
 <link rel="import" href="/base/settings.html">
 <link rel="import" href="/core/test_utils.html">
 
@@ -23,7 +23,7 @@
     categories.push('first,second,third');
     categories.push('cc,disabled-by-default-cc.debug');
 
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = categories;
     dlg.settings_key = 'key';
     dlg.currentlyChosenPreset = [];
@@ -38,7 +38,7 @@
   });
 
   test('recordSelectionDialog_splitCategories', function() {
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories =
         ['cc,disabled-by-default-one,cc.debug', 'two,three', 'three'];
     dlg.settings_key = 'key';
@@ -59,7 +59,7 @@
   });
 
   test('recordSelectionDialog_UpdateForm_NoSettings', function() {
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = ['disabled-by-default-one', 'two', 'three'];
     dlg.settings_key = 'key';
     dlg.currentlyChosenPreset = [];
@@ -90,7 +90,7 @@
     tr.b.Settings.set('two', true, 'categories');
     tr.b.Settings.set('three', false, 'categories');
 
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = ['disabled-by-default-one'];
     dlg.settings_key = 'categories';
     dlg.currentlyChosenPreset = [];
@@ -118,7 +118,7 @@
   });
 
   test('recordSelectionDialog_UpdateForm_DisabledByDefault', function() {
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = ['disabled-by-default-bar', 'baz'];
     dlg.settings_key = 'categories';
     dlg.currentlyChosenPreset = [];
@@ -139,7 +139,7 @@
     tr.b.Settings.set('two', true, 'categories');
     tr.b.Settings.set('three', false, 'categories');
 
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = ['disabled-by-default-one'];
     dlg.settings_key = 'categories';
     dlg.currentlyChosenPreset = [];
@@ -150,7 +150,7 @@
     tr.b.Settings.set('two', true, 'categories');
     tr.b.Settings.set('three', false, 'categories');
 
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = ['disabled-by-default-one'];
     dlg.settings_key = 'categories';
     dlg.currentlyChosenPreset = [];
@@ -185,7 +185,7 @@
 
   test('recordSelectionDialog_noPreset', function() {
     tr.b.Settings.set('about_tracing.record_selection_dialog_preset', []);
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     assert.isFalse(dlg.usingPreset_());
   });
 
@@ -193,7 +193,7 @@
     tr.b.Settings.set('two', true, 'categories');
     tr.b.Settings.set('three', false, 'categories');
 
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = ['disabled-by-default-one'];
     dlg.settings_key = 'categories';
     // Note: currentlyChosenPreset is not set here, so the default is used.
@@ -234,7 +234,7 @@
     tr.b.Settings.set('recordSelectionDialog.useSystemTracing', true);
     tr.b.Settings.set('recordSelectionDialog.useSampling', false);
 
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = ['disabled-by-default-one'];
     dlg.settings_key = 'categories';
     // Note: currentlyChosenPreset is not set here, so the default is used.
@@ -285,10 +285,10 @@
         'record-continuously');
     tr.b.Settings.set('recordSelectionDialog.useSystemTracing', true);
     tr.b.Settings.set('recordSelectionDialog.useSampling', true);
-    tr.b.Settings.set('tr.e.about_tracing.record_selection_dialog_preset',
+    tr.b.Settings.set('tr.ui.e.about_tracing.record_selection_dialog_preset',
         ['blink', 'cc', 'renderer', 'cc.debug']);
 
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.categories = ['disabled-by-default-one'];
     dlg.settings_key = 'categories';
     dlg.updateForm_();
@@ -323,7 +323,7 @@
     tr.b.Settings.set('cc', false, 'categories');
     tr.b.Settings.set('disabled-by-default-cc.debug', true, 'categories');
 
-    var dlg = new tr.e.about_tracing.RecordSelectionDialog();
+    var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
     dlg.settings_key = 'categories';
     dlg.categories = [];
     dlg.currentlyChosenPreset = [];
diff --git a/trace_viewer/extras/about_tracing/tracing_controller_client.html b/trace_viewer/ui/extras/about_tracing/tracing_controller_client.html
similarity index 94%
rename from trace_viewer/extras/about_tracing/tracing_controller_client.html
rename to trace_viewer/ui/extras/about_tracing/tracing_controller_client.html
index a05b690..5e9dfdb 100644
--- a/trace_viewer/extras/about_tracing/tracing_controller_client.html
+++ b/trace_viewer/ui/extras/about_tracing/tracing_controller_client.html
@@ -9,7 +9,7 @@
 <script>
 'use strict';
 
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   /**
    * Communicates with content/browser/tracing_controller_impl.cc
    *
diff --git a/trace_viewer/extras/about_tracing/xhr_based_tracing_controller_client.html b/trace_viewer/ui/extras/about_tracing/xhr_based_tracing_controller_client.html
similarity index 91%
rename from trace_viewer/extras/about_tracing/xhr_based_tracing_controller_client.html
rename to trace_viewer/ui/extras/about_tracing/xhr_based_tracing_controller_client.html
index 40b3d94..95c85d7 100644
--- a/trace_viewer/extras/about_tracing/xhr_based_tracing_controller_client.html
+++ b/trace_viewer/ui/extras/about_tracing/xhr_based_tracing_controller_client.html
@@ -5,12 +5,13 @@
 found in the LICENSE file.
 -->
 
-<link rel="import" href="/extras/about_tracing/tracing_controller_client.html">
+<link rel="import"
+      href="/ui/extras/about_tracing/tracing_controller_client.html">
 
 <script>
 'use strict';
 
-tr.exportTo('tr.e.about_tracing', function() {
+tr.exportTo('tr.ui.e.about_tracing', function() {
   function beginXhr(method, path, data) {
     if (data === undefined)
       data = null;
@@ -40,7 +41,7 @@
   function XhrBasedTracingControllerClient() { }
 
   XhrBasedTracingControllerClient.prototype = {
-    __proto__: tr.e.about_tracing.TracingControllerClient.prototype,
+    __proto__: tr.ui.e.about_tracing.TracingControllerClient.prototype,
 
     beginMonitoring: function(monitoringOptions) {
       var monitoringOptionsB64 = btoa(JSON.stringify(monitoringOptions));