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

Side by Side Diff: content/browser/loader/test_url_loader_client.h

Issue 2658583002: Revert of Use associated interface on DownloadedTempFile (Closed)
Patch Set: Rebased. Created 3 years, 10 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ 5 #ifndef CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_
6 #define CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ 6 #define CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 // A TestURLLoaderClient records URLLoaderClient function calls. It also calls 23 // A TestURLLoaderClient records URLLoaderClient function calls. It also calls
24 // the closure set via set_quit_closure if set, in order to make it possible to 24 // the closure set via set_quit_closure if set, in order to make it possible to
25 // create a base::RunLoop, set its quit closure to this client and then run the 25 // create a base::RunLoop, set its quit closure to this client and then run the
26 // RunLoop. 26 // RunLoop.
27 class TestURLLoaderClient final : public mojom::URLLoaderClient { 27 class TestURLLoaderClient final : public mojom::URLLoaderClient {
28 public: 28 public:
29 TestURLLoaderClient(); 29 TestURLLoaderClient();
30 ~TestURLLoaderClient() override; 30 ~TestURLLoaderClient() override;
31 31
32 void OnReceiveResponse( 32 void OnReceiveResponse(const ResourceResponseHead& response_head,
33 const ResourceResponseHead& response_head, 33 mojom::DownloadedTempFilePtr downloaded_file) override;
34 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file) override;
35 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, 34 void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
36 const ResourceResponseHead& response_head) override; 35 const ResourceResponseHead& response_head) override;
37 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override; 36 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override;
38 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; 37 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override;
39 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; 38 void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
40 void OnUploadProgress(int64_t current_position, 39 void OnUploadProgress(int64_t current_position,
41 int64_t total_size, 40 int64_t total_size,
42 const base::Closure& ack_callback) override; 41 const base::Closure& ack_callback) override;
43 void OnStartLoadingResponseBody( 42 void OnStartLoadingResponseBody(
44 mojo::ScopedDataPipeConsumerHandle body) override; 43 mojo::ScopedDataPipeConsumerHandle body) override;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 int64_t body_transfer_size_ = 0; 115 int64_t body_transfer_size_ = 0;
117 int64_t current_upload_position_ = 0; 116 int64_t current_upload_position_ = 0;
118 int64_t total_upload_size_ = 0; 117 int64_t total_upload_size_ = 0;
119 118
120 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); 119 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient);
121 }; 120 };
122 121
123 } // namespace content 122 } // namespace content
124 123
125 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ 124 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/browser/loader/test_url_loader_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698