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

Side by Side Diff: Source/core/loader/ResourceLoadNotifier.cpp

Issue 16950017: Reland [Resource Timing] Expose redirect timing information (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline Created 7 years, 5 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/loader/ResourceLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ResourceLoadNotifier::ResourceLoadNotifier(Frame* frame) 44 ResourceLoadNotifier::ResourceLoadNotifier(Frame* frame)
45 : m_frame(frame) 45 : m_frame(frame)
46 { 46 {
47 } 47 }
48 48
49 void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsig ned long identifier, ResourceRequest& request, const ResourceResponse& redirectR esponse, const CachedResourceInitiatorInfo& initiatorInfo) 49 void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsig ned long identifier, ResourceRequest& request, const ResourceResponse& redirectR esponse, const CachedResourceInitiatorInfo& initiatorInfo)
50 { 50 {
51 m_frame->loader()->applyUserAgent(request); 51 m_frame->loader()->applyUserAgent(request);
52 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req uest, redirectResponse); 52 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req uest, redirectResponse);
53 InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, reque st, redirectResponse, initiatorInfo); 53 InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, reque st, redirectResponse, initiatorInfo);
54 request.setReportLoadTiming(true);
Nate Chapin 2013/07/18 16:03:41 Why is this moving?
55 } 54 }
56 55
57 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un signed long identifier, const ResourceResponse& r, ResourceLoader* resourceLoade r) 56 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un signed long identifier, const ResourceResponse& r, ResourceLoader* resourceLoade r)
58 { 57 {
59 if (Page* page = m_frame->page()) 58 if (Page* page = m_frame->page())
60 page->progress()->incrementProgress(identifier, r); 59 page->progress()->incrementProgress(identifier, r);
61 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv eResourceResponse(m_frame, identifier, r); 60 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv eResourceResponse(m_frame, identifier, r);
62 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier, r); 61 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier, r);
63 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa der, r, resourceLoader); 62 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa der, r, resourceLoader);
64 } 63 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (dataLength > 0) 97 if (dataLength > 0)
99 dispatchDidReceiveData(loader, identifier, data, dataLength, encodedData Length); 98 dispatchDidReceiveData(loader, identifier, data, dataLength, encodedData Length);
100 99
101 if (error.isNull()) 100 if (error.isNull())
102 dispatchDidFinishLoading(loader, identifier, 0); 101 dispatchDidFinishLoading(loader, identifier, 0);
103 else 102 else
104 dispatchDidFail(loader, identifier, error); 103 dispatchDidFail(loader, identifier, error);
105 } 104 }
106 105
107 } // namespace WebCore 106 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/loader/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698