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

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

Issue 2712833002: DevTools: Show decoded body length for network requests on timeline. (Closed)
Patch Set: Created 3 years, 10 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 "devtools.timeline", "ResourceReceiveResponse", "data", 532 "devtools.timeline", "ResourceReceiveResponse", "data",
533 InspectorReceiveResponseEvent::data(identifier, resource->response())); 533 InspectorReceiveResponseEvent::data(identifier, resource->response()));
534 dispatchDidReceiveResponseInternal(identifier, resource->response(), 534 dispatchDidReceiveResponseInternal(identifier, resource->response(),
535 frameType, requestContext, resource, 535 frameType, requestContext, resource,
536 LinkLoader::DoNotLoadResources); 536 LinkLoader::DoNotLoadResources);
537 } 537 }
538 538
539 if (resource->encodedSize() > 0) 539 if (resource->encodedSize() > 0)
540 dispatchDidReceiveData(identifier, 0, resource->encodedSize()); 540 dispatchDidReceiveData(identifier, 0, resource->encodedSize());
541 541
542 TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data", 542 TRACE_EVENT1(
543 InspectorResourceFinishEvent::data(identifier, 0, false, 0)); 543 "devtools.timeline", "ResourceFinish", "data",
544 InspectorResourceFinishEvent::data(
545 identifier, 0, false, 0, resource->response().decodedBodyLength()));
544 dispatchDidFinishLoading(identifier, 0, 0); 546 dispatchDidFinishLoading(identifier, 0, 0);
545 } 547 }
546 548
547 bool FrameFetchContext::shouldLoadNewResource(Resource::Type type) const { 549 bool FrameFetchContext::shouldLoadNewResource(Resource::Type type) const {
548 if (!m_documentLoader) 550 if (!m_documentLoader)
549 return true; 551 return true;
550 552
551 FrameLoader& loader = m_documentLoader->frame()->loader(); 553 FrameLoader& loader = m_documentLoader->frame()->loader();
552 if (type == Resource::MainResource) 554 if (type == Resource::MainResource)
553 return m_documentLoader == loader.provisionalDocumentLoader(); 555 return m_documentLoader == loader.provisionalDocumentLoader();
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 response); 1108 response);
1107 } 1109 }
1108 1110
1109 DEFINE_TRACE(FrameFetchContext) { 1111 DEFINE_TRACE(FrameFetchContext) {
1110 visitor->trace(m_document); 1112 visitor->trace(m_document);
1111 visitor->trace(m_documentLoader); 1113 visitor->trace(m_documentLoader);
1112 FetchContext::trace(visitor); 1114 FetchContext::trace(visitor);
1113 } 1115 }
1114 1116
1115 } // namespace blink 1117 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698