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

Side by Side Diff: Source/core/fetch/ResourceLoader.cpp

Issue 101293002: Merge 160817 "Use monotonic finish time for sync request complet..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1650/
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 26 matching lines...) Expand all
37 #include "core/platform/SharedBuffer.h" 37 #include "core/platform/SharedBuffer.h"
38 #include "core/platform/chromium/support/WrappedResourceRequest.h" 38 #include "core/platform/chromium/support/WrappedResourceRequest.h"
39 #include "core/platform/chromium/support/WrappedResourceResponse.h" 39 #include "core/platform/chromium/support/WrappedResourceResponse.h"
40 #include "core/platform/network/ResourceError.h" 40 #include "core/platform/network/ResourceError.h"
41 #include "public/platform/Platform.h" 41 #include "public/platform/Platform.h"
42 #include "public/platform/WebData.h" 42 #include "public/platform/WebData.h"
43 #include "public/platform/WebURLError.h" 43 #include "public/platform/WebURLError.h"
44 #include "public/platform/WebURLRequest.h" 44 #include "public/platform/WebURLRequest.h"
45 #include "public/platform/WebURLResponse.h" 45 #include "public/platform/WebURLResponse.h"
46 #include "wtf/Assertions.h" 46 #include "wtf/Assertions.h"
47 #include "wtf/CurrentTime.h"
47 48
48 namespace WebCore { 49 namespace WebCore {
49 50
50 ResourceLoader::RequestCountTracker::RequestCountTracker(ResourceLoaderHost* hos t, Resource* resource) 51 ResourceLoader::RequestCountTracker::RequestCountTracker(ResourceLoaderHost* hos t, Resource* resource)
51 : m_host(host) 52 : m_host(host)
52 , m_resource(resource) 53 , m_resource(resource)
53 { 54 {
54 m_host->incrementRequestCount(m_resource); 55 m_host->incrementRequestCount(m_resource);
55 } 56 }
56 57
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 WebKit::WebData dataOut; 409 WebKit::WebData dataOut;
409 loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut); 410 loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut);
410 if (errorOut.reason) { 411 if (errorOut.reason) {
411 didFail(0, errorOut); 412 didFail(0, errorOut);
412 return; 413 return;
413 } 414 }
414 didReceiveResponse(0, responseOut); 415 didReceiveResponse(0, responseOut);
415 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse() .resourceLoadInfo(); 416 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse() .resourceLoadInfo();
416 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL oadInfo ? resourceLoadInfo->encodedDataLength : -1, m_options); 417 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL oadInfo ? resourceLoadInfo->encodedDataLength : -1, m_options);
417 m_resource->setResourceBuffer(dataOut); 418 m_resource->setResourceBuffer(dataOut);
418 didFinishLoading(0, responseOut.responseTime()); 419 didFinishLoading(0, monotonicallyIncreasingTime());
419 } 420 }
420 421
421 } 422 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698