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

Side by Side Diff: chrome/browser/resources/net_internals/capture_view.js

Issue 2856223006: Delete chrome://net-internals/#export (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/net_internals/export_view.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * This view displays controls for capturing network events. 6 * This view displays controls for capturing network events.
7 */ 7 */
8 var CaptureView = (function() { 8 var CaptureView = (function() {
9 'use strict'; 9 'use strict';
10 10
(...skipping 12 matching lines...) Expand all
23 var byteLoggingCheckbox = $(CaptureView.BYTE_LOGGING_CHECKBOX_ID); 23 var byteLoggingCheckbox = $(CaptureView.BYTE_LOGGING_CHECKBOX_ID);
24 byteLoggingCheckbox.onclick = this.onSetByteLogging_.bind(this); 24 byteLoggingCheckbox.onclick = this.onSetByteLogging_.bind(this);
25 25
26 $(CaptureView.LIMIT_CHECKBOX_ID).onclick = this.onChangeLimit_.bind(this); 26 $(CaptureView.LIMIT_CHECKBOX_ID).onclick = this.onChangeLimit_.bind(this);
27 27
28 $(CaptureView.STOP_BUTTON_ID).onclick = 28 $(CaptureView.STOP_BUTTON_ID).onclick =
29 this.onStopButtonClicked_.bind(this); 29 this.onStopButtonClicked_.bind(this);
30 $(CaptureView.RESET_BUTTON_ID).onclick = 30 $(CaptureView.RESET_BUTTON_ID).onclick =
31 this.onResetButtonClicked_.bind(this); 31 this.onResetButtonClicked_.bind(this);
32 32
33 if (byteLoggingCheckbox.checked) {
34 // The code to display a warning on ExportView relies on bytelogging
35 // being off by default. If this ever changes, the code will need to
36 // be updated.
37 throw 'Not expecting byte logging to be enabled!';
38 }
39
40 new MouseOverHelp( 33 new MouseOverHelp(
41 CaptureView.LIMIT_HELP_ID, CaptureView.LIMIT_HELP_HOVER_ID); 34 CaptureView.LIMIT_HELP_ID, CaptureView.LIMIT_HELP_HOVER_ID);
42 35
43 new MouseOverHelp( 36 new MouseOverHelp(
44 CaptureView.BYTE_LOGGING_HELP_ID, 37 CaptureView.BYTE_LOGGING_HELP_ID,
45 CaptureView.BYTE_LOGGING_HELP_HOVER_ID); 38 CaptureView.BYTE_LOGGING_HELP_HOVER_ID);
46 39
47 this.onChangeLimit_(); 40 this.onChangeLimit_();
48 } 41 }
49 42
(...skipping 30 matching lines...) Expand all
80 73
81 /** 74 /**
82 * Depending on the value of the checkbox, enables or disables logging of 75 * Depending on the value of the checkbox, enables or disables logging of
83 * actual bytes transferred. 76 * actual bytes transferred.
84 */ 77 */
85 onSetByteLogging_: function() { 78 onSetByteLogging_: function() {
86 var byteLoggingCheckbox = $(CaptureView.BYTE_LOGGING_CHECKBOX_ID); 79 var byteLoggingCheckbox = $(CaptureView.BYTE_LOGGING_CHECKBOX_ID);
87 80
88 if (byteLoggingCheckbox.checked) { 81 if (byteLoggingCheckbox.checked) {
89 g_browser.setCaptureMode('IncludeSocketBytes'); 82 g_browser.setCaptureMode('IncludeSocketBytes');
90
91 // Once we enable byte logging, all bets are off on what gets captured.
92 // Have the export view warn that the "strip cookies" option is
93 // ineffective from this point on.
94 //
95 // In theory we could clear this warning after unchecking the box and
96 // then deleting all the events which had been captured. We don't
97 // currently do that; if you want the warning to go away, will need to
98 // reload.
99 ExportView.getInstance().showPrivacyWarning();
100 } else { 83 } else {
101 g_browser.setCaptureMode('IncludeCookiesAndCredentials'); 84 g_browser.setCaptureMode('IncludeCookiesAndCredentials');
102 } 85 }
103 }, 86 },
104 87
105 onChangeLimit_: function() { 88 onChangeLimit_: function() {
106 var limitCheckbox = $(CaptureView.LIMIT_CHECKBOX_ID); 89 var limitCheckbox = $(CaptureView.LIMIT_CHECKBOX_ID);
107 90
108 // Default to unlimited. 91 // Default to unlimited.
109 var softLimit = Infinity; 92 var softLimit = Infinity;
(...skipping 22 matching lines...) Expand all
132 MainView.getInstance().switchToViewOnlyMode(); 115 MainView.getInstance().switchToViewOnlyMode();
133 }, 116 },
134 117
135 onResetButtonClicked_: function() { 118 onResetButtonClicked_: function() {
136 EventsTracker.getInstance().deleteAllLogEntries(); 119 EventsTracker.getInstance().deleteAllLogEntries();
137 }, 120 },
138 }; 121 };
139 122
140 return CaptureView; 123 return CaptureView;
141 })(); 124 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/net_internals/export_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698