OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 // Supplied |upload_data_stream| must outlive this object. | 22 // Supplied |upload_data_stream| must outlive this object. |
23 explicit DevToolsNetworkUploadDataStream( | 23 explicit DevToolsNetworkUploadDataStream( |
24 net::UploadDataStream* upload_data_stream); | 24 net::UploadDataStream* upload_data_stream); |
25 ~DevToolsNetworkUploadDataStream() override; | 25 ~DevToolsNetworkUploadDataStream() override; |
26 | 26 |
27 void SetInterceptor(DevToolsNetworkInterceptor* interceptor); | 27 void SetInterceptor(DevToolsNetworkInterceptor* interceptor); |
28 | 28 |
29 private: | 29 private: |
30 // net::UploadDataStream implementation. | 30 // net::UploadDataStream implementation. |
31 bool IsInMemory() const override; | 31 bool IsInMemory() const override; |
32 int InitInternal(const net::BoundNetLog& net_log) override; | 32 int InitInternal(const net::NetLogWithSource& net_log) override; |
33 int ReadInternal(net::IOBuffer* buf, int buf_len) override; | 33 int ReadInternal(net::IOBuffer* buf, int buf_len) override; |
34 void ResetInternal() override; | 34 void ResetInternal() override; |
35 | 35 |
36 void StreamInitCallback(int result); | 36 void StreamInitCallback(int result); |
37 void StreamReadCallback(int result); | 37 void StreamReadCallback(int result); |
38 | 38 |
39 int ThrottleRead(int result); | 39 int ThrottleRead(int result); |
40 void ThrottleCallback(int result, int64_t bytes); | 40 void ThrottleCallback(int result, int64_t bytes); |
41 | 41 |
42 DevToolsNetworkInterceptor::ThrottleCallback throttle_callback_; | 42 DevToolsNetworkInterceptor::ThrottleCallback throttle_callback_; |
43 int64_t throttled_byte_count_; | 43 int64_t throttled_byte_count_; |
44 | 44 |
45 net::UploadDataStream* upload_data_stream_; | 45 net::UploadDataStream* upload_data_stream_; |
46 base::WeakPtr<DevToolsNetworkInterceptor> interceptor_; | 46 base::WeakPtr<DevToolsNetworkInterceptor> interceptor_; |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkUploadDataStream); | 48 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkUploadDataStream); |
49 }; | 49 }; |
50 | 50 |
51 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_ | 51 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_ |
OLD | NEW |