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

Side by Side Diff: Source/devtools/front_end/NetworkManager.js

Issue 222143003: DevTools: Make ConsoleMessage TargetAware (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@console-cpp-exec-context
Patch Set: Rebase Created 6 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 networkRequest.connectionId = response.connectionId; 186 networkRequest.connectionId = response.connectionId;
187 if (response.remoteIPAddress) 187 if (response.remoteIPAddress)
188 networkRequest.setRemoteAddress(response.remoteIPAddress, response.r emotePort || -1); 188 networkRequest.setRemoteAddress(response.remoteIPAddress, response.r emotePort || -1);
189 189
190 if (response.fromDiskCache) 190 if (response.fromDiskCache)
191 networkRequest.cached = true; 191 networkRequest.cached = true;
192 else 192 else
193 networkRequest.timing = response.timing; 193 networkRequest.timing = response.timing;
194 194
195 if (!this._mimeTypeIsConsistentWithType(networkRequest)) { 195 if (!this._mimeTypeIsConsistentWithType(networkRequest)) {
196 this._manager._target.consoleModel.addMessage(new WebInspector.Conso leMessage(WebInspector.ConsoleMessage.MessageSource.Network, 196 var consoleModel = this._manager._target.consoleModel;
197 consoleModel.addMessage(new WebInspector.ConsoleMessage(consoleModel .target(), WebInspector.ConsoleMessage.MessageSource.Network,
197 WebInspector.ConsoleMessage.MessageLevel.Log, 198 WebInspector.ConsoleMessage.MessageLevel.Log,
198 WebInspector.UIString("Resource interpreted as %s but transferre d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT ype, networkRequest.url), 199 WebInspector.UIString("Resource interpreted as %s but transferre d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT ype, networkRequest.url),
199 WebInspector.ConsoleMessage.MessageType.Log, 200 WebInspector.ConsoleMessage.MessageType.Log,
200 "", 201 "",
201 0, 202 0,
202 0, 203 0,
203 networkRequest.requestId)); 204 networkRequest.requestId));
204 } 205 }
205 }, 206 },
206 207
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 var networkRequest = new WebInspector.NetworkRequest(requestId, url, doc umentURL, frameId, loaderId); 565 var networkRequest = new WebInspector.NetworkRequest(requestId, url, doc umentURL, frameId, loaderId);
565 networkRequest.initiator = initiator; 566 networkRequest.initiator = initiator;
566 return networkRequest; 567 return networkRequest;
567 } 568 }
568 } 569 }
569 570
570 /** 571 /**
571 * @type {!WebInspector.NetworkManager} 572 * @type {!WebInspector.NetworkManager}
572 */ 573 */
573 WebInspector.networkManager; 574 WebInspector.networkManager;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ExtensionServer.js ('k') | Source/devtools/front_end/ScriptSnippetModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698