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

Side by Side Diff: third_party/WebKit/Source/core/fetch/FetchContext.h

Issue 1858533002: Introduce WebCachePolicy to merge cache policy enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hiroshige review Created 4 years, 8 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) 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 namespace blink { 43 namespace blink {
44 44
45 class KURL; 45 class KURL;
46 class MHTMLArchive; 46 class MHTMLArchive;
47 class ResourceError; 47 class ResourceError;
48 class ResourceLoader; 48 class ResourceLoader;
49 class ResourceResponse; 49 class ResourceResponse;
50 class ResourceRequest; 50 class ResourceRequest;
51 class ResourceTimingInfo; 51 class ResourceTimingInfo;
52 class WebTaskRunner; 52 class WebTaskRunner;
53 enum class WebCachePolicy;
53 54
54 enum FetchResourceType { 55 enum FetchResourceType {
55 FetchMainResource, 56 FetchMainResource,
56 FetchSubresource 57 FetchSubresource
57 }; 58 };
58 59
59 class CORE_EXPORT FetchContext : public GarbageCollectedFinalized<FetchContext> { 60 class CORE_EXPORT FetchContext : public GarbageCollectedFinalized<FetchContext> {
60 WTF_MAKE_NONCOPYABLE(FetchContext); 61 WTF_MAKE_NONCOPYABLE(FetchContext);
61 public: 62 public:
62 static FetchContext& nullInstance(); 63 static FetchContext& nullInstance();
63 64
64 virtual ~FetchContext() { } 65 virtual ~FetchContext() { }
65 DEFINE_INLINE_VIRTUAL_TRACE() { } 66 DEFINE_INLINE_VIRTUAL_TRACE() { }
66 67
67 virtual bool isLiveContext() { return false; } 68 virtual bool isLiveContext() { return false; }
68 virtual void countClientHintsDPR() { } 69 virtual void countClientHintsDPR() { }
69 virtual void countClientHintsResourceWidth() { } 70 virtual void countClientHintsResourceWidth() { }
70 virtual void countClientHintsViewportWidth() { } 71 virtual void countClientHintsViewportWidth() { }
71 72
72 virtual void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType ); 73 virtual void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType );
73 virtual void setFirstPartyForCookies(ResourceRequest&); 74 virtual void setFirstPartyForCookies(ResourceRequest&);
74 virtual CachePolicy getCachePolicy() const; 75 virtual CachePolicy getCachePolicy() const;
75 virtual ResourceRequestCachePolicy resourceRequestCachePolicy(const Resource Request&, Resource::Type) const; 76 virtual WebCachePolicy resourceRequestCachePolicy(const ResourceRequest&, Re source::Type) const;
76 77
77 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, Res ourceLoadPriority, int intraPriorityValue); 78 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, Res ourceLoadPriority, int intraPriorityValue);
78 virtual void dispatchWillSendRequest(unsigned long identifier, ResourceReque st&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& = Fetch InitiatorInfo()); 79 virtual void dispatchWillSendRequest(unsigned long identifier, ResourceReque st&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& = Fetch InitiatorInfo());
79 virtual void dispatchDidLoadResourceFromMemoryCache(const Resource*, WebURLR equest::FrameType, WebURLRequest::RequestContext); 80 virtual void dispatchDidLoadResourceFromMemoryCache(const Resource*, WebURLR equest::FrameType, WebURLRequest::RequestContext);
80 virtual void dispatchDidReceiveResponse(unsigned long identifier, const Reso urceResponse&, WebURLRequest::FrameType, WebURLRequest::RequestContext, Resource Loader* = 0); 81 virtual void dispatchDidReceiveResponse(unsigned long identifier, const Reso urceResponse&, WebURLRequest::FrameType, WebURLRequest::RequestContext, Resource Loader* = 0);
81 virtual void dispatchDidReceiveData(unsigned long identifier, const char* da ta, int dataLength, int encodedDataLength); 82 virtual void dispatchDidReceiveData(unsigned long identifier, const char* da ta, int dataLength, int encodedDataLength);
82 virtual void dispatchDidDownloadData(unsigned long identifier, int dataLengt h, int encodedDataLength); 83 virtual void dispatchDidDownloadData(unsigned long identifier, int dataLengt h, int encodedDataLength);
83 virtual void dispatchDidFinishLoading(unsigned long identifier, double finis hTime, int64_t encodedDataLength); 84 virtual void dispatchDidFinishLoading(unsigned long identifier, double finis hTime, int64_t encodedDataLength);
84 virtual void dispatchDidFail(unsigned long identifier, const ResourceError&, bool isInternalRequest); 85 virtual void dispatchDidFail(unsigned long identifier, const ResourceError&, bool isInternalRequest);
85 86
(...skipping 27 matching lines...) Expand all
113 114
114 virtual WebTaskRunner* loadingTaskRunner() const { return nullptr; } 115 virtual WebTaskRunner* loadingTaskRunner() const { return nullptr; }
115 116
116 protected: 117 protected:
117 FetchContext() { } 118 FetchContext() { }
118 }; 119 };
119 120
120 } // namespace blink 121 } // namespace blink
121 122
122 #endif 123 #endif
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/fetch/FetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698