Chromium Code Reviews| Index: components/cronet/android/cronet_url_request_adapter.h |
| diff --git a/components/cronet/android/cronet_url_request_adapter.h b/components/cronet/android/cronet_url_request_adapter.h |
| index 66a7620a5124caddc5da3bf583f9f11300deb839..edd3633fed88a02a699512e2d0d79b181517336e 100644 |
| --- a/components/cronet/android/cronet_url_request_adapter.h |
| +++ b/components/cronet/android/cronet_url_request_adapter.h |
| @@ -60,7 +60,8 @@ class CronetURLRequestAdapter : public net::URLRequest::Delegate { |
| const GURL& url, |
| net::RequestPriority priority, |
| jboolean jdisable_cache, |
| - jboolean jdisable_connection_migration); |
| + jboolean jdisable_connection_migration, |
| + jboolean jenable_metrics); |
| ~CronetURLRequestAdapter() override; |
| // Methods called prior to Start are never called on network thread. |
| @@ -139,6 +140,11 @@ class CronetURLRequestAdapter : public net::URLRequest::Delegate { |
| // Checks status of the request_adapter, return false if |is_success()| is |
| // true, otherwise report error and cancel request_adapter. |
| bool MaybeReportError(net::URLRequest* request) const; |
| + // Reports metrics collected to the Java layer |
| + void MaybeReportMetrics(net::URLRequest* request) const; |
| + int64_t ConvertTime(base::TimeTicks ticks, |
|
xunjieli
2016/09/20 14:32:46
#include base/time/time.h
mgersh
2016/09/20 20:48:25
Done.
|
| + base::Time start_time, |
| + base::TimeTicks start_ticks) const; |
| CronetURLRequestContextAdapter* context_; |
| @@ -155,6 +161,8 @@ class CronetURLRequestAdapter : public net::URLRequest::Delegate { |
| scoped_refptr<IOBufferWithByteBuffer> read_buffer_; |
| std::unique_ptr<net::URLRequest> url_request_; |
| + bool enable_metrics_; |
|
xunjieli
2016/09/20 14:32:46
nit: Add a documentation. It's clear what this mea
mgersh
2016/09/20 20:48:24
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); |
| }; |