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

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

Issue 2537753002: Remove WebURLLoader* argument from WebURLLoaderClient methods (Closed)
Patch Set: a Created 4 years 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // A succesful load will consist of: 81 // A succesful load will consist of:
82 // 0+ willFollowRedirect() 82 // 0+ willFollowRedirect()
83 // 0+ didSendData() 83 // 0+ didSendData()
84 // 1 didReceiveResponse() 84 // 1 didReceiveResponse()
85 // 0-1 didReceiveCachedMetadata() 85 // 0-1 didReceiveCachedMetadata()
86 // 0+ didReceiveData() or didDownloadData(), but never both 86 // 0+ didReceiveData() or didDownloadData(), but never both
87 // 1 didFinishLoading() 87 // 1 didFinishLoading()
88 // A failed load is indicated by 1 didFail(), which can occur at any time 88 // A failed load is indicated by 1 didFail(), which can occur at any time
89 // before didFinishLoading(), including synchronous inside one of the other 89 // before didFinishLoading(), including synchronous inside one of the other
90 // callbacks via ResourceLoader::cancel() 90 // callbacks via ResourceLoader::cancel()
91 bool willFollowRedirect(WebURLLoader*, 91 bool willFollowRedirect(WebURLRequest&,
92 WebURLRequest&,
93 const WebURLResponse& redirectResponse) override; 92 const WebURLResponse& redirectResponse) override;
94 void didSendData(WebURLLoader*, 93 void didSendData(unsigned long long bytesSent,
95 unsigned long long bytesSent,
96 unsigned long long totalBytesToBeSent) override; 94 unsigned long long totalBytesToBeSent) override;
97 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) override; 95 void didReceiveResponse(const WebURLResponse&) override;
98 void didReceiveResponse(WebURLLoader*, 96 void didReceiveResponse(const WebURLResponse&,
99 const WebURLResponse&,
100 std::unique_ptr<WebDataConsumerHandle>) override; 97 std::unique_ptr<WebDataConsumerHandle>) override;
101 void didReceiveCachedMetadata(WebURLLoader*, 98 void didReceiveCachedMetadata(const char* data, int length) override;
102 const char* data, 99 void didReceiveData(const char*, int, int encodedDataLength) override;
103 int length) override; 100 void didDownloadData(int, int) override;
104 void didReceiveData(WebURLLoader*, 101 void didFinishLoading(double finishTime,
105 const char*,
106 int,
107 int encodedDataLength) override;
108 void didDownloadData(WebURLLoader*, int, int) override;
109 void didFinishLoading(WebURLLoader*,
110 double finishTime,
111 int64_t encodedDataLength, 102 int64_t encodedDataLength,
112 int64_t encodedBodyLength) override; 103 int64_t encodedBodyLength) override;
113 void didFail(WebURLLoader*, 104 void didFail(const WebURLError&,
114 const WebURLError&,
115 int64_t encodedDataLength, 105 int64_t encodedDataLength,
116 int64_t encodedBodyLength) override; 106 int64_t encodedBodyLength) override;
117 107
118 void didFinishLoadingFirstPartInMultipart(); 108 void didFinishLoadingFirstPartInMultipart();
119 void didFail(const ResourceError&); 109 void didFail(const ResourceError&);
120 110
121 private: 111 private:
122 // Assumes ResourceFetcher and Resource are non-null. 112 // Assumes ResourceFetcher and Resource are non-null.
123 ResourceLoader(ResourceFetcher*, Resource*); 113 ResourceLoader(ResourceFetcher*, Resource*);
124 114
125 void cancelForRedirectAccessCheckError(const KURL&); 115 void cancelForRedirectAccessCheckError(const KURL&);
126 void requestSynchronously(const ResourceRequest&); 116 void requestSynchronously(const ResourceRequest&);
127 117
128 std::unique_ptr<WebURLLoader> m_loader; 118 std::unique_ptr<WebURLLoader> m_loader;
129 Member<ResourceFetcher> m_fetcher; 119 Member<ResourceFetcher> m_fetcher;
130 Member<Resource> m_resource; 120 Member<Resource> m_resource;
131 bool m_isCacheAwareLoadingActivated; 121 bool m_isCacheAwareLoadingActivated;
132 }; 122 };
133 123
134 } // namespace blink 124 } // namespace blink
135 125
136 #endif 126 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResourceTest.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