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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js

Issue 2265823002: DevTools: fix instances where asParsedURL is null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix instances with parsedURL Created 4 years, 3 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 commands.push(this._generateCurlCommand(request, platform)); 980 commands.push(this._generateCurlCommand(request, platform));
981 if (platform === "win") 981 if (platform === "win")
982 InspectorFrontendHost.copyText(commands.join(" &\r\n")); 982 InspectorFrontendHost.copyText(commands.join(" &\r\n"));
983 else 983 else
984 InspectorFrontendHost.copyText(commands.join(" ;\n")); 984 InspectorFrontendHost.copyText(commands.join(" ;\n"));
985 }, 985 },
986 986
987 _exportAll: function() 987 _exportAll: function()
988 { 988 {
989 var url = WebInspector.targetManager.mainTarget().inspectedURL(); 989 var url = WebInspector.targetManager.mainTarget().inspectedURL();
990 var filename = url.asParsedURL().host + ".har"; 990 var parsedURL = url.asParsedURL();
991 var filename = parsedURL ? parsedURL.host : "network-log";
991 var stream = new WebInspector.FileOutputStream(); 992 var stream = new WebInspector.FileOutputStream();
992 stream.open(filename, openCallback.bind(this)); 993 stream.open(filename + ".har", openCallback.bind(this));
993 994
994 /** 995 /**
995 * @param {boolean} accepted 996 * @param {boolean} accepted
996 * @this {WebInspector.NetworkLogView} 997 * @this {WebInspector.NetworkLogView}
997 */ 998 */
998 function openCallback(accepted) 999 function openCallback(accepted)
999 { 1000 {
1000 if (!accepted) 1001 if (!accepted)
1001 return; 1002 return;
1002 var progressIndicator = new WebInspector.ProgressIndicator(); 1003 var progressIndicator = new WebInspector.ProgressIndicator();
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1738 return false; 1739 return false;
1739 return true; 1740 return true;
1740 } 1741 }
1741 1742
1742 WebInspector.NetworkLogView.EventTypes = { 1743 WebInspector.NetworkLogView.EventTypes = {
1743 RequestSelected: "RequestSelected", 1744 RequestSelected: "RequestSelected",
1744 SearchCountUpdated: "SearchCountUpdated", 1745 SearchCountUpdated: "SearchCountUpdated",
1745 SearchIndexUpdated: "SearchIndexUpdated", 1746 SearchIndexUpdated: "SearchIndexUpdated",
1746 UpdateRequest: "UpdateRequest" 1747 UpdateRequest: "UpdateRequest"
1747 }; 1748 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698