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

Side by Side Diff: Source/WebCore/loader/SubresourceLoader.cpp

Issue 9243015: Merge 104887 - Web Inspector: [Chomium] Resources loaded with 304 status code have receiving time... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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 | « 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, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 RefPtr<SubresourceLoader> protect(this); 153 RefPtr<SubresourceLoader> protect(this);
154 154
155 if (m_resource->resourceToRevalidate()) { 155 if (m_resource->resourceToRevalidate()) {
156 if (response.httpStatusCode() == 304) { 156 if (response.httpStatusCode() == 304) {
157 // 304 Not modified / Use local copy 157 // 304 Not modified / Use local copy
158 // Existing resource is ok, just use it updating the expiration time . 158 // Existing resource is ok, just use it updating the expiration time .
159 m_state = Revalidating; 159 m_state = Revalidating;
160 memoryCache()->revalidationSucceeded(m_resource, response); 160 memoryCache()->revalidationSucceeded(m_resource, response);
161 if (!reachedTerminalState()) { 161 if (!reachedTerminalState()) {
162 ResourceLoader::didReceiveResponse(response); 162 ResourceLoader::didReceiveResponse(response);
163 didFinishLoading(currentTime()); 163 didFinishLoading(monotonicallyIncreasingTime());
164 } 164 }
165 return; 165 return;
166 } 166 }
167 // Did not get 304 response, continue as a regular resource load. 167 // Did not get 304 response, continue as a regular resource load.
168 memoryCache()->revalidationFailed(m_resource); 168 memoryCache()->revalidationFailed(m_resource);
169 } 169 }
170 170
171 m_resource->setResponse(response); 171 m_resource->setResponse(response);
172 if (reachedTerminalState()) 172 if (reachedTerminalState())
173 return; 173 return;
174 ResourceLoader::didReceiveResponse(response); 174 ResourceLoader::didReceiveResponse(response);
175 175
176 if (m_loadingMultipartContent) { 176 if (m_loadingMultipartContent) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (reachedTerminalState()) 302 if (reachedTerminalState())
303 return; 303 return;
304 m_resource->stopLoading(); 304 m_resource->stopLoading();
305 m_documentLoader->removeSubresourceLoader(this); 305 m_documentLoader->removeSubresourceLoader(this);
306 } 306 }
307 m_document = 0; 307 m_document = 0;
308 ResourceLoader::releaseResources(); 308 ResourceLoader::releaseResources();
309 } 309 }
310 310
311 } 311 }
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