<commit_before><!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="/about_tracing/record_and_capture_controller.html">
<link rel="import" href="/about_tracing/inspector_tracing_controller_client.html">
<link rel="import" href="/about_tracing/xhr_based_tracing_controller_client.html">
<link rel="import" href="/about_tracing/features.html">
<link rel="import" href="/tracing/timeline_view.html">
<link rel="import" href="/tvcm/key_event_manager.html">
<link rel="import" href="/tvcm/promise.html">
<link rel="import" href="/tvcm/ui.html">
<link rel="import" href="/tvcm/ui/info_bar.html">
<link rel="import" href="/tvcm/ui/overlay.html">

<template id="profiling-view-template">
  <style>
  x-profiling-view-container {
    -webkit-flex-direction: column;
    display: -webkit-flex;
    padding: 0;
  }

  x-profiling-view-container .controls #save-button {
    margin-left: 64px !important;
  }

  x-profiling-view-container .controls #upload-button {
    display: none;
  }

  x-profiling-view-container > x-timeline-view {
    -webkit-flex: 1 1 auto;
  }
  </style>

  <x-profiling-view-container>
    <x-info-bar-group></x-info-bar-group>
    <x-timeline-view>
      <x-timeline-view-buttons>
        <button id="record-button">Record</button>
        <span id="monitoring-elements">
          <input id="monitor-checkbox" type="checkbox">
          <label for="monitor-checkbox">Monitoring</label></input>
          <button id="capture-button">Capture Monitoring Snapshot</button>
        </span>
        <button id="save-button">Save</button>
        <button id="upload-button">Upload</button>
        <button id="load-button">Load</button>
      </x-timeline-view-buttons>
    </x-timeline-view>
  </x-profiling-view-container>
</template>

<script>
'use strict';

/**
 * @fileoverview ProfilingView glues the View control to
 * TracingController.
 */
tvcm.exportTo('about_tracing', function() {
  function readFile(file) {
    return new Promise(function(resolver) {
      var reader = new FileReader();
      var filename = file.name;
      reader.onload = function(data) {
        resolver.resolve(data.target.result);
      };
      reader.onerror = function(err) {
        resolver.reject(err);
      }

      var is_binary = /[.]gz$/.test(filename) || /[.]zip$/.test(filename);
      if (is_binary)
        reader.readAsArrayBuffer(file);
      else
        reader.readAsText(file);
    });
  }
<commit_msg>Remove -container parts of profiling_view<commit_after><!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="/about_tracing/record_and_capture_controller.html">
<link rel="import" href="/about_tracing/inspector_tracing_controller_client.html">
<link rel="import" href="/about_tracing/xhr_based_tracing_controller_client.html">
<link rel="import" href="/about_tracing/features.html">
<link rel="import" href="/tracing/timeline_view.html">
<link rel="import" href="/tvcm/key_event_manager.html">
<link rel="import" href="/tvcm/promise.html">
<link rel="import" href="/tvcm/ui.html">
<link rel="import" href="/tvcm/ui/info_bar.html">
<link rel="import" href="/tvcm/ui/overlay.html">

<style>
x-profiling-view {
  -webkit-flex-direction: column;
  display: -webkit-flex;
  padding: 0;
}

x-profiling-view .controls #save-button {
  margin-left: 64px !important;
}

x-profiling-view .controls #upload-button {
  display: none;
}

x-profiling-view > x-timeline-view {
  -webkit-flex: 1 1 auto;
}
</style>

<template id="profiling-view-template">
  <x-info-bar-group></x-info-bar-group>
  <x-timeline-view>
    <x-timeline-view-buttons>
      <button id="record-button">Record</button>
      <span id="monitoring-elements">
        <input id="monitor-checkbox" type="checkbox">
        <label for="monitor-checkbox">Monitoring</label></input>
        <button id="capture-button">Capture Monitoring Snapshot</button>
      </span>
      <button id="save-button">Save</button>
      <button id="upload-button">Upload</button>
      <button id="load-button">Load</button>
    </x-timeline-view-buttons>
  </x-timeline-view>
</template>

<script>
'use strict';

/**
 * @fileoverview ProfilingView glues the View control to
 * TracingController.
 */
tvcm.exportTo('about_tracing', function() {
  function readFile(file) {
    return new Promise(function(resolver) {
      var reader = new FileReader();
      var filename = file.name;
      reader.onload = function(data) {
        resolver.resolve(data.target.result);
      };
      reader.onerror = function(err) {
        resolver.reject(err);
      }

      var is_binary = /[.]gz$/.test(filename) || /[.]zip$/.test(filename);
      if (is_binary)
        reader.readAsArrayBuffer(file);
      else
        reader.readAsText(file);
    });
  }

{'fraction_non_alphanumeric': 0.15966553852279514, 'fraction_numerical': 0.0035835158271949035, 'mean_word_length': 3.6218951241950323, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5208906', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1635, 'n_words': 314}