| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 class CORE_EXPORT FrameFetchContext final : public FetchContext { | 51 class CORE_EXPORT FrameFetchContext final : public FetchContext { |
| 52 public: | 52 public: |
| 53 static ResourceFetcher* createContextAndFetcher(DocumentLoader* loader, Docu
ment* document) | 53 static ResourceFetcher* createContextAndFetcher(DocumentLoader* loader, Docu
ment* document) |
| 54 { | 54 { |
| 55 return ResourceFetcher::create(new FrameFetchContext(loader, document)); | 55 return ResourceFetcher::create(new FrameFetchContext(loader, document)); |
| 56 } | 56 } |
| 57 | 57 |
| 58 static void provideDocumentToContext(FetchContext& context, Document* docume
nt) | 58 static void provideDocumentToContext(FetchContext& context, Document* docume
nt) |
| 59 { | 59 { |
| 60 ASSERT(document); | 60 DCHECK(document); |
| 61 RELEASE_ASSERT(context.isLiveContext()); | 61 CHECK(context.isLiveContext()); |
| 62 static_cast<FrameFetchContext&>(context).m_document = document; | 62 static_cast<FrameFetchContext&>(context).m_document = document; |
| 63 } | 63 } |
| 64 | 64 |
| 65 ~FrameFetchContext(); | 65 ~FrameFetchContext(); |
| 66 | 66 |
| 67 bool isLiveContext() { return true; } | 67 bool isLiveContext() { return true; } |
| 68 | 68 |
| 69 void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType) overri
de; | 69 void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType) overri
de; |
| 70 CachePolicy getCachePolicy() const override; | 70 CachePolicy getCachePolicy() const override; |
| 71 WebCachePolicy resourceRequestCachePolicy(const ResourceRequest&, Resource::
Type, FetchRequest::DeferOption) const override; | 71 WebCachePolicy resourceRequestCachePolicy(const ResourceRequest&, Resource::
Type, FetchRequest::DeferOption) const override; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // FIXME: Oilpan: Ideally this should just be a traced Member but that will | 130 // FIXME: Oilpan: Ideally this should just be a traced Member but that will |
| 131 // currently leak because ComputedStyle and its data are not on the heap. | 131 // currently leak because ComputedStyle and its data are not on the heap. |
| 132 // See crbug.com/383860 for details. | 132 // See crbug.com/383860 for details. |
| 133 WeakMember<Document> m_document; | 133 WeakMember<Document> m_document; |
| 134 Member<DocumentLoader> m_documentLoader; | 134 Member<DocumentLoader> m_documentLoader; |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace blink | 137 } // namespace blink |
| 138 | 138 |
| 139 #endif | 139 #endif |
| OLD | NEW |