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

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

Issue 2561743003: Use associated interface on DownloadedTempFile (Closed)
Patch Set: +\n. +comment. 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 // 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 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // A TestURLLoaderClient records URLLoaderClient function calls. It also calls 22 // A TestURLLoaderClient records URLLoaderClient function calls. It also calls
23 // the closure set via set_quit_closure if set, in order to make it possible to 23 // the closure set via set_quit_closure if set, in order to make it possible to
24 // create a base::RunLoop, set its quit closure to this client and then run the 24 // create a base::RunLoop, set its quit closure to this client and then run the
25 // RunLoop. 25 // RunLoop.
26 class TestURLLoaderClient final : public mojom::URLLoaderClient { 26 class TestURLLoaderClient final : public mojom::URLLoaderClient {
27 public: 27 public:
28 TestURLLoaderClient(); 28 TestURLLoaderClient();
29 ~TestURLLoaderClient() override; 29 ~TestURLLoaderClient() override;
30 30
31 void OnReceiveResponse(const ResourceResponseHead& response_head, 31 void OnReceiveResponse(
32 mojom::DownloadedTempFilePtr downloaded_file) override; 32 const ResourceResponseHead& response_head,
33 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file) override;
33 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, 34 void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
34 const ResourceResponseHead& response_head) override; 35 const ResourceResponseHead& response_head) override;
35 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override; 36 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override;
36 void OnStartLoadingResponseBody( 37 void OnStartLoadingResponseBody(
37 mojo::ScopedDataPipeConsumerHandle body) override; 38 mojo::ScopedDataPipeConsumerHandle body) override;
38 void OnComplete(const ResourceRequestCompletionStatus& status) override; 39 void OnComplete(const ResourceRequestCompletionStatus& status) override;
39 40
40 bool has_received_response() const { return has_received_response_; } 41 bool has_received_response() const { return has_received_response_; }
41 bool has_received_redirect() const { return has_received_redirect_; } 42 bool has_received_redirect() const { return has_received_redirect_; }
42 bool has_data_downloaded() const { return has_data_downloaded_; } 43 bool has_data_downloaded() const { return has_data_downloaded_; }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 mojom::URLLoaderFactoryPtr url_loader_factory_; 86 mojom::URLLoaderFactoryPtr url_loader_factory_;
86 int64_t download_data_length_ = 0; 87 int64_t download_data_length_ = 0;
87 int64_t encoded_download_data_length_ = 0; 88 int64_t encoded_download_data_length_ = 0;
88 89
89 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); 90 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient);
90 }; 91 };
91 92
92 } // namespace content 93 } // namespace content
93 94
94 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ 95 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698