OLD | NEW |
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 $('export-view-include-private-data-button').disabled = false; | 98 $('export-view-include-private-data-button').disabled = false; |
99 $('export-view-log-bytes-button').disabled = false; | 99 $('export-view-log-bytes-button').disabled = false; |
100 $('export-view-start-data').disabled = false; | 100 $('export-view-start-data').disabled = false; |
101 | 101 |
102 // If there's an existing log, allow sending it. | 102 // If there's an existing log, allow sending it. |
103 if (!!exportNetLogInfo.logExists) { | 103 if (!!exportNetLogInfo.logExists) { |
104 $('export-view-deletes-log-text').hidden = false; | 104 $('export-view-deletes-log-text').hidden = false; |
105 $('export-view-send-data').disabled = false; | 105 $('export-view-send-data').disabled = false; |
106 if (!exportNetLogInfo.logCaptureModeKnown) { | 106 if (!exportNetLogInfo.logCaptureModeKnown) { |
107 $('export-view-send-old-log-text').hidden = false; | 107 $('export-view-send-old-log-text').hidden = false; |
108 } else if (exportNetLogInfo.captureMode == 'NORMAL') { | 108 } else if (exportNetLogInfo.captureMode != 'STRIP_PRIVATE_DATA') { |
109 $('export-view-private-data-text').hidden = false; | 109 $('export-view-private-data-text').hidden = false; |
110 } | 110 } |
111 } | 111 } |
112 } else if (exportNetLogInfo.state == 'LOGGING') { | 112 } else if (exportNetLogInfo.state == 'LOGGING') { |
113 // Only possible to stop logging. Radio buttons reflects current state. | 113 // Only possible to stop logging. Radio buttons reflects current state. |
114 document | 114 document |
115 .querySelector( | 115 .querySelector( |
116 'input[name="log-mode"][value="' + | 116 'input[name="log-mode"][value="' + |
117 exportNetLogInfo.captureMode + '"]') | 117 exportNetLogInfo.captureMode + '"]') |
118 .checked = true; | 118 .checked = true; |
119 $('export-view-stop-data').disabled = false; | 119 $('export-view-stop-data').disabled = false; |
120 } else if (exportNetLogInfo.state == 'UNINITIALIZED') { | 120 } else if (exportNetLogInfo.state == 'UNINITIALIZED') { |
121 $('export-view-file-path-text').textContent = | 121 $('export-view-file-path-text').textContent = |
122 'Unable to initialize NetLog data file.'; | 122 'Unable to initialize NetLog data file.'; |
123 } | 123 } |
124 } | 124 } |
125 }; | 125 }; |
126 | 126 |
127 return NetExportView; | 127 return NetExportView; |
128 })(); | 128 })(); |
OLD | NEW |