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

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

Issue 1609973002: DevTools: promisify ContentProvider.requestContent and all its clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 11 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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 { 1423 {
1424 /** 1424 /**
1425 * @param {?string} content 1425 * @param {?string} content
1426 */ 1426 */
1427 function callback(content) 1427 function callback(content)
1428 { 1428 {
1429 if (request.contentEncoded) 1429 if (request.contentEncoded)
1430 content = request.asDataURL(); 1430 content = request.asDataURL();
1431 InspectorFrontendHost.copyText(content || ""); 1431 InspectorFrontendHost.copyText(content || "");
1432 } 1432 }
1433 request.requestContent(callback); 1433 request.requestContent().then(callback);
1434 }, 1434 },
1435 1435
1436 /** 1436 /**
1437 * @param {!WebInspector.NetworkRequest} request 1437 * @param {!WebInspector.NetworkRequest} request
1438 */ 1438 */
1439 _copyResponseHeaders: function(request) 1439 _copyResponseHeaders: function(request)
1440 { 1440 {
1441 InspectorFrontendHost.copyText(request.responseHeadersText); 1441 InspectorFrontendHost.copyText(request.responseHeadersText);
1442 }, 1442 },
1443 1443
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 return false; 2167 return false;
2168 return true; 2168 return true;
2169 } 2169 }
2170 2170
2171 WebInspector.NetworkLogView.EventTypes = { 2171 WebInspector.NetworkLogView.EventTypes = {
2172 RequestSelected: "RequestSelected", 2172 RequestSelected: "RequestSelected",
2173 SearchCountUpdated: "SearchCountUpdated", 2173 SearchCountUpdated: "SearchCountUpdated",
2174 SearchIndexUpdated: "SearchIndexUpdated", 2174 SearchIndexUpdated: "SearchIndexUpdated",
2175 UpdateRequest: "UpdateRequest" 2175 UpdateRequest: "UpdateRequest"
2176 }; 2176 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698