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

Side by Side Diff: components/net_log/resources/net_export.js

Issue 2603523002: Move net-export thread-hopping code into NetLogFileWriter and add IO polled data. (Closed)
Patch Set: Various refactors to make code cleaner Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Main entry point called once the page has loaded. 6 * Main entry point called once the page has loaded.
7 */ 7 */
8 function onLoad() { 8 function onLoad() {
9 NetExportView.getInstance(); 9 NetExportView.getInstance();
10 } 10 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 $('export-view-private-data-text').hidden = true; 99 $('export-view-private-data-text').hidden = true;
100 $('export-view-send-old-log-text').hidden = true; 100 $('export-view-send-old-log-text').hidden = true;
101 if (exportNetLogInfo.state == 'NOT_LOGGING') { 101 if (exportNetLogInfo.state == 'NOT_LOGGING') {
102 // Allow making a new log. 102 // Allow making a new log.
103 $('export-view-strip-private-data-button').disabled = false; 103 $('export-view-strip-private-data-button').disabled = false;
104 $('export-view-include-private-data-button').disabled = false; 104 $('export-view-include-private-data-button').disabled = false;
105 $('export-view-log-bytes-button').disabled = false; 105 $('export-view-log-bytes-button').disabled = false;
106 $('export-view-start-data').disabled = false; 106 $('export-view-start-data').disabled = false;
107 107
108 // If there's an existing log, allow sending it. 108 // If there's an existing log, allow sending it.
109 if (exportNetLogInfo.logType != 'NONE') { 109 if (!!exportNetLogInfo.logExists) {
eroman 2017/01/06 21:46:23 Agreed these names are clearer!
110 $('export-view-deletes-log-text').hidden = false; 110 $('export-view-deletes-log-text').hidden = false;
111 $('export-view-send-data').disabled = false; 111 $('export-view-send-data').disabled = false;
112 if (exportNetLogInfo.logType == 'UNKNOWN') { 112 if (!exportNetLogInfo.logCaptureModeKnown) {
113 $('export-view-send-old-log-text').hidden = false; 113 $('export-view-send-old-log-text').hidden = false;
114 } else if (exportNetLogInfo.logType == 'NORMAL') { 114 } else if (exportNetLogInfo.captureMode == 'NORMAL') {
115 $('export-view-private-data-text').hidden = false; 115 $('export-view-private-data-text').hidden = false;
116 } 116 }
117 } 117 }
118 } else if (exportNetLogInfo.state == 'LOGGING') { 118 } else if (exportNetLogInfo.state == 'LOGGING') {
119 // Only possible to stop logging. Radio buttons reflects current state. 119 // Only possible to stop logging. Radio buttons reflects current state.
120 document.querySelector('input[name="log-mode"][value="' + 120 document.querySelector('input[name="log-mode"][value="' +
121 exportNetLogInfo.logType + '"]').checked = true; 121 exportNetLogInfo.captureMode + '"]').checked = true;
122 $('export-view-stop-data').disabled = false; 122 $('export-view-stop-data').disabled = false;
123 } else if (exportNetLogInfo.state == 'UNINITIALIZED') { 123 } else if (exportNetLogInfo.state == 'UNINITIALIZED') {
124 $('export-view-file-path-text').textContent = 124 $('export-view-file-path-text').textContent =
125 'Unable to initialize NetLog data file.'; 125 'Unable to initialize NetLog data file.';
126 } 126 }
127 } 127 }
128 }; 128 };
129 129
130 return NetExportView; 130 return NetExportView;
131 })(); 131 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698