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

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

Issue 47603003: Use monotonic finish time for sync request completion. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | 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 "platform/SharedBuffer.h" 37 #include "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 "platform/network/ResourceError.h" 40 #include "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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (errorOut.reason) { 425 if (errorOut.reason) {
425 didFail(0, errorOut); 426 didFail(0, errorOut);
426 return; 427 return;
427 } 428 }
428 didReceiveResponse(0, responseOut); 429 didReceiveResponse(0, responseOut);
429 if (m_state == Terminated) 430 if (m_state == Terminated)
430 return; 431 return;
431 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse() .resourceLoadInfo(); 432 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse() .resourceLoadInfo();
432 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL oadInfo ? resourceLoadInfo->encodedDataLength : -1, m_options); 433 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL oadInfo ? resourceLoadInfo->encodedDataLength : -1, m_options);
433 m_resource->setResourceBuffer(dataOut); 434 m_resource->setResourceBuffer(dataOut);
434 didFinishLoading(0, responseOut.responseTime()); 435 didFinishLoading(0, monotonicallyIncreasingTime());
435 } 436 }
436 437
437 } 438 }
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