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

Side by Side Diff: content/browser/loader/mojo_async_resource_handler_test_util.cc

Issue 1970693002: Use mojo for Chrome Loading, Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 5 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/loader/mojo_async_resource_handler_test_util.h"
6
7 namespace content {
8
9 FakeURLLoaderClient::FakeURLLoaderClient() : binding_(this) {}
10 FakeURLLoaderClient::~FakeURLLoaderClient() {}
11
12 void FakeURLLoaderClient::OnReceiveResponse(
13 const ResourceResponseHead& response_head) {
14 has_received_response_ = true;
15 response_head_ = response_head;
16 if (quit_closure_)
17 quit_closure_.Run();
18 }
19
20 void FakeURLLoaderClient::OnStartLoadingResponseBody(
21 mojo::ScopedDataPipeConsumerHandle body) {
22 response_body_ = std::move(body);
23 if (quit_closure_)
24 quit_closure_.Run();
25 }
26
27 void FakeURLLoaderClient::OnComplete(
28 const ResourceRequestCompletionStatus& status) {
29 has_received_completion_ = true;
30 completion_status_ = status;
31 if (quit_closure_)
32 quit_closure_.Run();
33 }
34
35 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698