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

Unified Diff: components/cronet/android/cronet_url_request_adapter.h

Issue 2844803002: [Cronet] Make metrics reporting happen after terminal callbacks. (Closed)
Patch Set: address comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/cronet/android/cronet_url_request_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a57a305b5b1bca79378d54f307652c0474036970..9a5cf7bdc08874e91975c8afc6b012dd3cee2790 100644
--- a/components/cronet/android/cronet_url_request_adapter.h
+++ b/components/cronet/android/cronet_url_request_adapter.h
@@ -132,12 +132,12 @@ class CronetURLRequestAdapter : public net::URLRequest::Delegate {
void ReadDataOnNetworkThread(
scoped_refptr<IOBufferWithByteBuffer> read_buffer,
int buffer_size);
- void DestroyOnNetworkThread(bool send_on_canceled);
+ void DestroyOnNetworkThread(bool jsend_on_canceled);
// Report error and cancel request_adapter.
void ReportError(net::URLRequest* request, int net_error);
// Reports metrics collected to the Java layer
- void MaybeReportMetrics(JNIEnv* env) const;
+ void MaybeReportMetrics(JNIEnv* env);
CronetURLRequestContextAdapter* context_;
@@ -154,9 +154,10 @@ class CronetURLRequestAdapter : public net::URLRequest::Delegate {
scoped_refptr<IOBufferWithByteBuffer> read_buffer_;
std::unique_ptr<net::URLRequest> url_request_;
- // Whether detailed metrics should be collected and reported to Java for this
- // request.
+ // Whether detailed metrics should be collected and reported to Java.
const bool enable_metrics_;
+ // Whether metrics have been reported to Java.
+ bool metrics_reported_;
DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter);
};
« no previous file with comments | « no previous file | components/cronet/android/cronet_url_request_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698