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

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

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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) 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 }, 78 },
79 79
80 /** 80 /**
81 * Depending on the value of the checkbox, enables or disables logging of 81 * Depending on the value of the checkbox, enables or disables logging of
82 * actual bytes transferred. 82 * actual bytes transferred.
83 */ 83 */
84 onSetByteLogging_: function() { 84 onSetByteLogging_: function() {
85 var byteLoggingCheckbox = $(CaptureView.BYTE_LOGGING_CHECKBOX_ID); 85 var byteLoggingCheckbox = $(CaptureView.BYTE_LOGGING_CHECKBOX_ID);
86 86
87 if (byteLoggingCheckbox.checked) { 87 if (byteLoggingCheckbox.checked) {
88 g_browser.setLogLevel(LogLevelType.LOG_ALL); 88 g_browser.setCaptureMode('IncludeSocketBytes');
89 89
90 // Once we enable byte logging, all bets are off on what gets captured. 90 // Once we enable byte logging, all bets are off on what gets captured.
91 // Have the export view warn that the "strip cookies" option is 91 // Have the export view warn that the "strip cookies" option is
92 // ineffective from this point on. 92 // ineffective from this point on.
93 // 93 //
94 // In theory we could clear this warning after unchecking the box and 94 // In theory we could clear this warning after unchecking the box and
95 // then deleting all the events which had been captured. We don't 95 // then deleting all the events which had been captured. We don't
96 // currently do that; if you want the warning to go away, will need to 96 // currently do that; if you want the warning to go away, will need to
97 // reload. 97 // reload.
98 ExportView.getInstance().showPrivacyWarning(); 98 ExportView.getInstance().showPrivacyWarning();
99 } else { 99 } else {
100 g_browser.setLogLevel(LogLevelType.LOG_ALL_BUT_BYTES); 100 g_browser.setCaptureMode('IncludeCookiesAndCredentials');
101 } 101 }
102 }, 102 },
103 103
104 onChangeLimit_: function() { 104 onChangeLimit_: function() {
105 var limitCheckbox = $(CaptureView.LIMIT_CHECKBOX_ID); 105 var limitCheckbox = $(CaptureView.LIMIT_CHECKBOX_ID);
106 106
107 // Default to unlimited. 107 // Default to unlimited.
108 var softLimit = Infinity; 108 var softLimit = Infinity;
109 var hardLimit = Infinity; 109 var hardLimit = Infinity;
110 110
(...skipping 20 matching lines...) Expand all
131 MainView.getInstance().switchToViewOnlyMode(); 131 MainView.getInstance().switchToViewOnlyMode();
132 }, 132 },
133 133
134 onResetButtonClicked_: function() { 134 onResetButtonClicked_: function() {
135 EventsTracker.getInstance().deleteAllLogEntries(); 135 EventsTracker.getInstance().deleteAllLogEntries();
136 }, 136 },
137 }; 137 };
138 138
139 return CaptureView; 139 return CaptureView;
140 })(); 140 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/browser_bridge.js ('k') | chrome/browser/resources/net_internals/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698