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

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

Issue 1983753002: Remove OwnPtr::release() calls in core/ (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 if (!m_resource->isCacheValidator() || resourceResponse.httpStatusCo de() != 304) 240 if (!m_resource->isCacheValidator() || resourceResponse.httpStatusCo de() != 304)
241 m_resource->setResponse(resourceResponse); 241 m_resource->setResponse(resourceResponse);
242 if (!m_fetcher->canAccessResource(m_resource.get(), m_resource->opti ons().securityOrigin.get(), response.url(), ResourceFetcher::ShouldLogAccessCont rolErrors)) { 242 if (!m_fetcher->canAccessResource(m_resource.get(), m_resource->opti ons().securityOrigin.get(), response.url(), ResourceFetcher::ShouldLogAccessCont rolErrors)) {
243 m_fetcher->didReceiveResponse(m_resource.get(), resourceResponse ); 243 m_fetcher->didReceiveResponse(m_resource.get(), resourceResponse );
244 cancel(ResourceError::cancelledDueToAccessCheckError(KURL(respon se.url()))); 244 cancel(ResourceError::cancelledDueToAccessCheckError(KURL(respon se.url())));
245 return; 245 return;
246 } 246 }
247 } 247 }
248 } 248 }
249 249
250 m_resource->responseReceived(resourceResponse, handle.release()); 250 m_resource->responseReceived(resourceResponse, std::move(handle));
251 if (m_state == ConnectionStateReleased) 251 if (m_state == ConnectionStateReleased)
252 return; 252 return;
253 253
254 m_fetcher->didReceiveResponse(m_resource.get(), resourceResponse); 254 m_fetcher->didReceiveResponse(m_resource.get(), resourceResponse);
255 if (m_state == ConnectionStateReleased) 255 if (m_state == ConnectionStateReleased)
256 return; 256 return;
257 257
258 if (m_resource->response().httpStatusCode() < 400 || m_resource->shouldIgnor eHTTPStatusCodeErrors()) 258 if (m_resource->response().httpStatusCode() < 400 || m_resource->shouldIgnor eHTTPStatusCodeErrors())
259 return; 259 return;
260 cancel(ResourceError::cancelledError(resourceResponse.url())); 260 cancel(ResourceError::cancelledError(resourceResponse.url()));
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // empty buffer is a noop in most cases, but is destructive in the case of 348 // empty buffer is a noop in most cases, but is destructive in the case of
349 // a 304, where it will overwrite the cached data we should be reusing. 349 // a 304, where it will overwrite the cached data we should be reusing.
350 if (dataOut.size()) { 350 if (dataOut.size()) {
351 m_fetcher->didReceiveData(m_resource.get(), dataOut.data(), dataOut.size (), encodedDataLength); 351 m_fetcher->didReceiveData(m_resource.get(), dataOut.data(), dataOut.size (), encodedDataLength);
352 m_resource->setResourceBuffer(dataOut); 352 m_resource->setResourceBuffer(dataOut);
353 } 353 }
354 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); 354 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength);
355 } 355 }
356 356
357 } // namespace blink 357 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | third_party/WebKit/Source/core/fileapi/Blob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698