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

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

Issue 10829342: Add BytesRead metric to CPM (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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 c9f69cc5f68ba611223563a6609831582d0aff68..ca8434730b3d01a480f059656b918a5a51dd6c8d 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/extensions/extension_info_map.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/net/cache_stats.h"
+#include "chrome/browser/performance_monitor/performance_monitor.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/task_manager/task_manager.h"
@@ -233,6 +234,10 @@ void ChromeNetworkDelegate::OnResponseStarted(net::URLRequest* request) {
void ChromeNetworkDelegate::OnRawBytesRead(const net::URLRequest& request,
int bytes_read) {
+ if (performance_monitor::PerformanceMonitor::enabled()) {
+ performance_monitor::PerformanceMonitor::GetInstance()->BytesRead(
+ bytes_read);
battre 2012/08/21 16:16:04 OnRawBytesRead is called on the IO thread. In Perf
Devlin 2012/08/21 19:46:46 See comment in performance_monitor.cc
+ }
#if defined(ENABLE_TASK_MANAGER)
TaskManager::GetInstance()->model()->NotifyBytesRead(request, bytes_read);
#endif // defined(ENABLE_TASK_MANAGER)

Powered by Google App Engine
This is Rietveld 408576698