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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 1284993005: Notify NetworkDelegate when bytes have been received over the network. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed empty cronet OnRawBytesRead implementation Created 5 years, 4 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 | « chrome/browser/net/chrome_network_delegate.h ('k') | chrome/browser/task_management/providers/task.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index e06f789888b1ea20d838ff33007946c56c0f2ccc..58254a8d86b35e822f101a3126344b19e5f2b1f4 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -478,14 +478,14 @@ void ChromeNetworkDelegate::OnResponseStarted(net::URLRequest* request) {
extensions_delegate_->OnResponseStarted(request);
}
-void ChromeNetworkDelegate::OnRawBytesRead(const net::URLRequest& request,
- int bytes_read) {
+void ChromeNetworkDelegate::OnNetworkBytesReceived(
+ const net::URLRequest& request,
+ int64_t bytes_received) {
#if defined(ENABLE_TASK_MANAGER)
- // This is not completely accurate, but as a first approximation ignore
- // requests that are served from the cache. See bug 330931 for more info.
- if (!request.was_cached()) {
- task_management::TaskManagerInterface::OnRawBytesRead(request, bytes_read);
- }
+ // Note: Currently, OnNetworkBytesReceived is only implemented for HTTP jobs,
+ // not FTP or other types, so those kinds of bytes will not be reported here.
+ task_management::TaskManagerInterface::OnRawBytesRead(request,
+ bytes_received);
#endif // defined(ENABLE_TASK_MANAGER)
}
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.h ('k') | chrome/browser/task_management/providers/task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698