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

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

Issue 2454983002: Cache-aware Resource loading (Closed)
Patch Set: Created 4 years, 1 month 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) 2005, 2006, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2011 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void restart(const ResourceRequest&, 60 void restart(const ResourceRequest&,
61 WebTaskRunner* loadingTaskRunner, 61 WebTaskRunner* loadingTaskRunner,
62 bool defersLoading); 62 bool defersLoading);
63 63
64 void cancel(); 64 void cancel();
65 65
66 void setDefersLoading(bool); 66 void setDefersLoading(bool);
67 67
68 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); 68 void didChangePriority(ResourceLoadPriority, int intraPriorityValue);
69 69
70 bool willActivateCacheAwareLoading(const ResourceRequest&);
yhirano 2016/10/27 07:33:00 activateCacheAwareLoading might be a better name.
Shao-Chuan Lee 2016/10/27 07:42:55 Done.
71
72 void deactivateCacheAwareLoading();
73
74 bool isCacheAwareLoadingActivated() const {
75 return m_isCacheAwareLoadingActivated;
76 }
77
70 // WebURLLoaderClient 78 // WebURLLoaderClient
71 // 79 //
72 // A succesful load will consist of: 80 // A succesful load will consist of:
73 // 0+ willFollowRedirect() 81 // 0+ willFollowRedirect()
74 // 0+ didSendData() 82 // 0+ didSendData()
75 // 1 didReceiveResponse() 83 // 1 didReceiveResponse()
76 // 0-1 didReceiveCachedMetadata() 84 // 0-1 didReceiveCachedMetadata()
77 // 0+ didReceiveData() or didDownloadData(), but never both 85 // 0+ didReceiveData() or didDownloadData(), but never both
78 // 1 didFinishLoading() 86 // 1 didFinishLoading()
79 // A failed load is indicated by 1 didFail(), which can occur at any time 87 // A failed load is indicated by 1 didFail(), which can occur at any time
(...skipping 29 matching lines...) Expand all
109 private: 117 private:
110 // Assumes ResourceFetcher and Resource are non-null. 118 // Assumes ResourceFetcher and Resource are non-null.
111 ResourceLoader(ResourceFetcher*, Resource*); 119 ResourceLoader(ResourceFetcher*, Resource*);
112 120
113 void cancelForRedirectAccessCheckError(const KURL&); 121 void cancelForRedirectAccessCheckError(const KURL&);
114 void requestSynchronously(const ResourceRequest&); 122 void requestSynchronously(const ResourceRequest&);
115 123
116 std::unique_ptr<WebURLLoader> m_loader; 124 std::unique_ptr<WebURLLoader> m_loader;
117 Member<ResourceFetcher> m_fetcher; 125 Member<ResourceFetcher> m_fetcher;
118 Member<Resource> m_resource; 126 Member<Resource> m_resource;
127 bool m_isCacheAwareLoadingActivated;
119 }; 128 };
120 129
121 } // namespace blink 130 } // namespace blink
122 131
123 #endif 132 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698