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

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

Issue 1410153009: DevTools: Make network events continuous on Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 4 landing Created 5 years, 1 month 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 24 matching lines...) Expand all
35 #include "core/dom/Document.h" 35 #include "core/dom/Document.h"
36 #include "core/fetch/CrossOriginAccessControl.h" 36 #include "core/fetch/CrossOriginAccessControl.h"
37 #include "core/fetch/FetchRequest.h" 37 #include "core/fetch/FetchRequest.h"
38 #include "core/fetch/FetchUtils.h" 38 #include "core/fetch/FetchUtils.h"
39 #include "core/fetch/Resource.h" 39 #include "core/fetch/Resource.h"
40 #include "core/fetch/ResourceFetcher.h" 40 #include "core/fetch/ResourceFetcher.h"
41 #include "core/frame/FrameConsole.h" 41 #include "core/frame/FrameConsole.h"
42 #include "core/frame/LocalFrame.h" 42 #include "core/frame/LocalFrame.h"
43 #include "core/frame/csp/ContentSecurityPolicy.h" 43 #include "core/frame/csp/ContentSecurityPolicy.h"
44 #include "core/inspector/InspectorInstrumentation.h" 44 #include "core/inspector/InspectorInstrumentation.h"
45 #include "core/inspector/InspectorTraceEvents.h"
46 #include "core/loader/CrossOriginPreflightResultCache.h" 45 #include "core/loader/CrossOriginPreflightResultCache.h"
47 #include "core/loader/DocumentThreadableLoaderClient.h" 46 #include "core/loader/DocumentThreadableLoaderClient.h"
48 #include "core/loader/FrameLoader.h" 47 #include "core/loader/FrameLoader.h"
49 #include "core/loader/FrameLoaderClient.h" 48 #include "core/loader/FrameLoaderClient.h"
50 #include "core/loader/ThreadableLoaderClient.h" 49 #include "core/loader/ThreadableLoaderClient.h"
51 #include "core/page/ChromeClient.h" 50 #include "core/page/ChromeClient.h"
52 #include "core/page/Page.h" 51 #include "core/page/Page.h"
53 #include "platform/SharedBuffer.h" 52 #include "platform/SharedBuffer.h"
54 #include "platform/Task.h" 53 #include "platform/Task.h"
55 #include "platform/network/ResourceRequest.h" 54 #include "platform/network/ResourceRequest.h"
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // |this| may be dead here in async mode. 554 // |this| may be dead here in async mode.
556 return; 555 return;
557 } 556 }
558 557
559 CrossOriginPreflightResultCache::shared().appendEntry(securityOrigin()->toSt ring(), m_actualRequest->url(), preflightResult.release()); 558 CrossOriginPreflightResultCache::shared().appendEntry(securityOrigin()->toSt ring(), m_actualRequest->url(), preflightResult.release());
560 } 559 }
561 560
562 void DocumentThreadableLoader::reportResponseReceived(unsigned long identifier, const ResourceResponse& response) 561 void DocumentThreadableLoader::reportResponseReceived(unsigned long identifier, const ResourceResponse& response)
563 { 562 {
564 DocumentLoader* loader = m_document.frame()->loader().documentLoader(); 563 DocumentLoader* loader = m_document.frame()->loader().documentLoader();
565 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, m_doc ument.frame(), response));
566 LocalFrame* frame = m_document.frame(); 564 LocalFrame* frame = m_document.frame();
567 InspectorInstrumentation::didReceiveResourceResponse(frame, identifier, load er, response, resource() ? resource()->loader() : 0); 565 InspectorInstrumentation::didReceiveResourceResponse(frame, identifier, load er, response, resource() ? resource()->loader() : 0);
568 frame->console().reportResourceResponseReceived(loader, identifier, response ); 566 frame->console().reportResourceResponseReceived(loader, identifier, response );
569 } 567 }
570 568
571 void DocumentThreadableLoader::handleResponse(unsigned long identifier, const Re sourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle) 569 void DocumentThreadableLoader::handleResponse(unsigned long identifier, const Re sourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle)
572 { 570 {
573 ASSERT(m_client); 571 ASSERT(m_client);
574 572
575 if (m_actualRequest) { 573 if (m_actualRequest) {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 return DoNotAllowStoredCredentials; 868 return DoNotAllowStoredCredentials;
871 return m_resourceLoaderOptions.allowCredentials; 869 return m_resourceLoaderOptions.allowCredentials;
872 } 870 }
873 871
874 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const 872 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const
875 { 873 {
876 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin (); 874 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin ();
877 } 875 }
878 876
879 } // namespace blink 877 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698