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

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

Issue 1124153003: [Oilpan] [Reland] Migrate classes under core/fetch to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Check m_fetcher in DocumentLoader Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 resource->responseReceived(response, nullptr); 51 resource->responseReceived(response, nullptr);
52 if (substituteData.content()->size()) 52 if (substituteData.content()->size())
53 resource->setResourceBuffer(substituteData.content()); 53 resource->setResourceBuffer(substituteData.content());
54 resource->setCacheIdentifier(cacheIdentifier); 54 resource->setCacheIdentifier(cacheIdentifier);
55 resource->finish(); 55 resource->finish();
56 memoryCache()->add(resource.get()); 56 memoryCache()->add(resource.get());
57 } 57 }
58 58
59 ResourcePtr<Resource> RawResource::fetchSynchronously(FetchRequest& request, Res ourceFetcher* fetcher) 59 ResourcePtr<Resource> RawResource::fetchSynchronously(FetchRequest& request, Res ourceFetcher* fetcher)
60 { 60 {
61 if (!fetcher)
sof 2015/06/29 13:29:29 Why is this needed here now?
peria 2015/06/30 07:14:39 it seems not needed here. removed.
62 return nullptr;
63
61 request.mutableResourceRequest().setTimeoutInterval(10); 64 request.mutableResourceRequest().setTimeoutInterval(10);
62 ResourceLoaderOptions options(request.options()); 65 ResourceLoaderOptions options(request.options());
63 options.synchronousPolicy = RequestSynchronously; 66 options.synchronousPolicy = RequestSynchronously;
64 request.setOptions(options); 67 request.setOptions(options);
65 return fetcher->requestResource(request, RawResourceFactory(Resource::Raw)); 68 return fetcher->requestResource(request, RawResourceFactory(Resource::Raw));
66 } 69 }
67 70
68 ResourcePtr<RawResource> RawResource::fetchImport(FetchRequest& request, Resourc eFetcher* fetcher) 71 ResourcePtr<RawResource> RawResource::fetchImport(FetchRequest& request, Resourc eFetcher* fetcher)
69 { 72 {
70 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone ); 73 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone );
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 for (const auto& header : oldHeaders) { 274 for (const auto& header : oldHeaders) {
272 AtomicString headerName = header.key; 275 AtomicString headerName = header.key;
273 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH eaders.get(headerName)) 276 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH eaders.get(headerName))
274 return false; 277 return false;
275 } 278 }
276 279
277 return true; 280 return true;
278 } 281 }
279 282
280 } // namespace blink 283 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698