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

Side by Side Diff: webkit/support/weburl_loader_mock.cc

Issue 3573006: Replace last remaining usage of WebURLLoaderClient::didFinishLoading(WebURLLoader*) (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Replace last remaining usage of WebURLLoaderClient::didFinishLoading(WebURLLo... Created 10 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/support/weburl_loader_mock.h" 5 #include "webkit/support/weburl_loader_mock.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" 8 #include "third_party/WebKit/WebKit/chromium/public/WebData.h"
9 #include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h"
10 #include "webkit/support/weburl_loader_mock_factory.h" 10 #include "webkit/support/weburl_loader_mock_factory.h"
(...skipping 12 matching lines...) Expand all
23 void WebURLLoaderMock::ServeAsynchronousRequest( 23 void WebURLLoaderMock::ServeAsynchronousRequest(
24 const WebKit::WebURLResponse& response, 24 const WebKit::WebURLResponse& response,
25 const WebKit::WebData& data, 25 const WebKit::WebData& data,
26 const WebKit::WebURLError& error) { 26 const WebKit::WebURLError& error) {
27 DCHECK(!using_default_loader_); 27 DCHECK(!using_default_loader_);
28 if (!client_) 28 if (!client_)
29 return; 29 return;
30 30
31 client_->didReceiveResponse(this, response); 31 client_->didReceiveResponse(this, response);
32 client_->didReceiveData(this, data.data(), data.size()); 32 client_->didReceiveData(this, data.data(), data.size());
33 client_->didFinishLoading(this); 33 client_->didFinishLoading(this, 0);
34 } 34 }
35 35
36 void WebURLLoaderMock::loadSynchronously(const WebKit::WebURLRequest& request, 36 void WebURLLoaderMock::loadSynchronously(const WebKit::WebURLRequest& request,
37 WebKit::WebURLResponse& response, 37 WebKit::WebURLResponse& response,
38 WebKit::WebURLError& error, 38 WebKit::WebURLError& error,
39 WebKit::WebData& data) { 39 WebKit::WebData& data) {
40 if (factory_->IsMockedURL(request.url())) { 40 if (factory_->IsMockedURL(request.url())) {
41 factory_->LoadSynchronously(request, &response, &error, &data); 41 factory_->LoadSynchronously(request, &response, &error, &data);
42 return; 42 return;
43 } 43 }
(...skipping 21 matching lines...) Expand all
65 factory_->CancelLoad(this); 65 factory_->CancelLoad(this);
66 } 66 }
67 67
68 void WebURLLoaderMock::setDefersLoading(bool deferred) { 68 void WebURLLoaderMock::setDefersLoading(bool deferred) {
69 if (using_default_loader_) { 69 if (using_default_loader_) {
70 default_loader_->setDefersLoading(deferred); 70 default_loader_->setDefersLoading(deferred);
71 return; 71 return;
72 } 72 }
73 NOTIMPLEMENTED(); 73 NOTIMPLEMENTED();
74 } 74 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698