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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 2729613008: [instrumentation] Introduce InspectorTraceEvents agent (Closed)
Patch Set: all done Created 3 years, 9 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, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 getSecurityOrigin()->toString(), m_actualRequest.url(), 765 getSecurityOrigin()->toString(), m_actualRequest.url(),
766 std::move(preflightResult)); 766 std::move(preflightResult));
767 } 767 }
768 768
769 void DocumentThreadableLoader::reportResponseReceived( 769 void DocumentThreadableLoader::reportResponseReceived(
770 unsigned long identifier, 770 unsigned long identifier,
771 const ResourceResponse& response) { 771 const ResourceResponse& response) {
772 LocalFrame* frame = document() ? document()->frame() : nullptr; 772 LocalFrame* frame = document() ? document()->frame() : nullptr;
773 if (!frame) 773 if (!frame)
774 return; 774 return;
775 TRACE_EVENT1(
776 "devtools.timeline", "ResourceReceiveResponse", "data",
777 InspectorReceiveResponseEvent::data(identifier, frame, response));
778 DocumentLoader* loader = frame->loader().documentLoader(); 775 DocumentLoader* loader = frame->loader().documentLoader();
779 probe::didReceiveResourceResponse(frame, identifier, loader, response, 776 probe::didReceiveResourceResponse(frame, identifier, loader, response,
780 resource()); 777 resource());
781 frame->console().reportResourceResponseReceived(loader, identifier, response); 778 frame->console().reportResourceResponseReceived(loader, identifier, response);
782 } 779 }
783 780
784 void DocumentThreadableLoader::handleResponse( 781 void DocumentThreadableLoader::handleResponse(
785 unsigned long identifier, 782 unsigned long identifier,
786 const ResourceResponse& response, 783 const ResourceResponse& response,
787 std::unique_ptr<WebDataConsumerHandle> handle) { 784 std::unique_ptr<WebDataConsumerHandle> handle) {
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 } 1145 }
1149 1146
1150 DEFINE_TRACE(DocumentThreadableLoader) { 1147 DEFINE_TRACE(DocumentThreadableLoader) {
1151 visitor->trace(m_resource); 1148 visitor->trace(m_resource);
1152 visitor->trace(m_loadingContext); 1149 visitor->trace(m_loadingContext);
1153 ThreadableLoader::trace(visitor); 1150 ThreadableLoader::trace(visitor);
1154 RawResourceClient::trace(visitor); 1151 RawResourceClient::trace(visitor);
1155 } 1152 }
1156 1153
1157 } // namespace blink 1154 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698