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

Unified Diff: third_party/WebKit/Source/web/tests/sim/SimRequest.cpp

Issue 2537753002: Remove WebURLLoader* argument from WebURLLoaderClient methods (Closed)
Patch Set: a 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/sim/SimRequest.cpp
diff --git a/third_party/WebKit/Source/web/tests/sim/SimRequest.cpp b/third_party/WebKit/Source/web/tests/sim/SimRequest.cpp
index 9d18ee86f8885c27300d50723998fa24285b558e..28af44df4cc348fce4f518b5b8c84b81f7815f8a 100644
--- a/third_party/WebKit/Source/web/tests/sim/SimRequest.cpp
+++ b/third_party/WebKit/Source/web/tests/sim/SimRequest.cpp
@@ -14,7 +14,6 @@ namespace blink {
SimRequest::SimRequest(String url, String mimeType)
: m_url(url),
- m_loader(nullptr),
m_client(nullptr),
m_totalEncodedDataLength(0),
m_isReady(false) {
@@ -32,10 +31,8 @@ SimRequest::~SimRequest() {
}
void SimRequest::didReceiveResponse(WebURLLoaderClient* client,
- WebURLLoader* loader,
const WebURLResponse& response) {
m_client = client;
- m_loader = loader;
m_response = response;
m_isReady = true;
}
@@ -47,25 +44,24 @@ void SimRequest::didFail(const WebURLError& error) {
void SimRequest::start() {
SimNetwork::current().servePendingRequests();
DCHECK(m_isReady);
- m_client->didReceiveResponse(m_loader, m_response);
+ m_client->didReceiveResponse(m_response);
}
void SimRequest::write(const String& data) {
DCHECK(m_isReady);
DCHECK(!m_error.reason);
m_totalEncodedDataLength += data.length();
- m_client->didReceiveData(m_loader, data.utf8().data(), data.length(),
- data.length());
+ m_client->didReceiveData(data.utf8().data(), data.length(), data.length());
}
void SimRequest::finish() {
DCHECK(m_isReady);
if (m_error.reason) {
- m_client->didFail(m_loader, m_error, m_totalEncodedDataLength,
+ m_client->didFail(m_error, m_totalEncodedDataLength,
m_totalEncodedDataLength);
} else {
// TODO(esprehn): Is claiming a request time of 0 okay for tests?
- m_client->didFinishLoading(m_loader, 0, m_totalEncodedDataLength,
+ m_client->didFinishLoading(0, m_totalEncodedDataLength,
m_totalEncodedDataLength);
}
reset();
@@ -81,7 +77,6 @@ void SimRequest::complete(const String& data) {
void SimRequest::reset() {
m_isReady = false;
m_client = nullptr;
- m_loader = nullptr;
SimNetwork::current().removeRequest(*this);
}
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimRequest.h ('k') | third_party/WebKit/public/platform/WebURLLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698