Index: net/url_request/url_fetcher.h |
diff --git a/net/url_request/url_fetcher.h b/net/url_request/url_fetcher.h |
index 49196afd97900c9df2b1ed1374daaa2e1a2e1eae..0c3d79b07d440a5943433f351b6933cb961625b6 100644 |
--- a/net/url_request/url_fetcher.h |
+++ b/net/url_request/url_fetcher.h |
@@ -139,6 +139,13 @@ class NET_EXPORT URLFetcher { |
virtual void SetUploadData(const std::string& upload_content_type, |
const std::string& upload_content) = 0; |
+ // When a service uses URLFetcher to exchange some information, after |
+ // completing the fetch procedure, it can call this function by passing its |
+ // name, so its usage will be recorded in according histograms. (It is |
+ // necessary to make proper histogram in histograms.xml file before calling |
+ // this function. |
+ void ReportYourUsage(const std::string& service) const; |
bengr
2015/08/07 18:00:01
How about this?
void ReportUsageUMA(const std::str
amohammadkhan
2015/08/11 22:04:36
Done.
|
+ |
// Sets data only needed by POSTs. All callers making POST requests should |
// call one of the SetUpload* methods before the request is started. |
// |upload_content_type| is the MIME type of the content, while |
@@ -312,6 +319,15 @@ class NET_EXPORT URLFetcher { |
// if an error prevented any response from being received. |
virtual int GetResponseCode() const = 0; |
+ // Total number of bytes received, including the headers and before |
+ // uncompressing |
bengr
2015/08/07 18:00:01
Add a period.
amohammadkhan
2015/08/11 22:04:36
Done.
|
+ virtual int64 GetBytesReceivedSize() const = 0; |
+ |
+ // Total number of bytes sent including the header size and POST body. But |
+ // this value is before compression, so it may not be a good representative of |
bengr
2015/08/07 18:00:01
Why report it then?
amohammadkhan
2015/08/11 22:04:36
Done.
|
+ // number of received bytes on the wire. |
+ virtual int64 GetBytesSentSize() const = 0; |
+ |
// Cookies received. |
virtual const ResponseCookies& GetCookies() const = 0; |