summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-31 15:24:14 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-31 15:24:14 +0000
commite0bc50007b8233b5b77b63cc6066b45f89edd1d9 (patch)
treef7de668a705f466cff8d6c6bb70594c448e002a2 /chrome/browser
parent446b1856d31c70cac44552dd1536a8e3a90ea850 (diff)
downloadchromium_src-e0bc50007b8233b5b77b63cc6066b45f89edd1d9.zip
chromium_src-e0bc50007b8233b5b77b63cc6066b45f89edd1d9.tar.gz
chromium_src-e0bc50007b8233b5b77b63cc6066b45f89edd1d9.tar.bz2
Revert 54448 - Add the actual data being read to the OnBytesRead callback, take two.
I'm not convinced that this actually introduced any problems (as compared to being bitten by flakiness), but I'll spend more time investigating on a weekday. This change was originally committed as http://src.chromium.org/viewvc/chrome?view=rev&revision=53178 then rolled back as http://src.chromium.org/viewvc/chrome?view=rev&revision=53416 due to a breakage in FLAKY_UnknownSize download test. FLAKY_UnknownSize depended on code with a bug that was exposed by this change. That bug has since been fixed and committed as http://src.chromium.org/viewvc/chrome?view=rev&revision=53876 So this change is ready for another round of review. It has not changed at all since being committed. Contributed by: bmcquade@google.com BUG=48192 TEST=Added new unit tests, ran net_unittests. Review URL: http://codereview.chromium.org/3010037 TBR=cbentzel@chromium.org Review URL: http://codereview.chromium.org/3047037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54449 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/chromeos/cros/network_library.cc5
-rw-r--r--chrome/browser/chromeos/cros/network_library.h2
-rw-r--r--chrome/browser/task_manager.cc3
-rw-r--r--chrome/browser/task_manager.h4
4 files changed, 6 insertions, 8 deletions
diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc
index e653a24..ba16587 100644
--- a/chrome/browser/chromeos/cros/network_library.cc
+++ b/chrome/browser/chromeos/cros/network_library.cc
@@ -250,12 +250,11 @@ void NetworkLibraryImpl::OnJobDone(URLRequestJob* job,
}
void NetworkLibraryImpl::OnJobRedirect(URLRequestJob* job, const GURL& location,
- int status_code) {
+ int status_code) {
CheckNetworkTraffic(false);
}
-void NetworkLibraryImpl::OnBytesRead(URLRequestJob* job, const char* buf,
- int byte_count) {
+void NetworkLibraryImpl::OnBytesRead(URLRequestJob* job, int byte_count) {
CheckNetworkTraffic(true);
}
diff --git a/chrome/browser/chromeos/cros/network_library.h b/chrome/browser/chromeos/cros/network_library.h
index c8d3f2c..0a7e5a2 100644
--- a/chrome/browser/chromeos/cros/network_library.h
+++ b/chrome/browser/chromeos/cros/network_library.h
@@ -390,7 +390,7 @@ class NetworkLibraryImpl : public NetworkLibrary,
virtual void OnJobDone(URLRequestJob* job, const URLRequestStatus& status);
virtual void OnJobRedirect(URLRequestJob* job, const GURL& location,
int status_code);
- virtual void OnBytesRead(URLRequestJob* job, const char* buf, int byte_count);
+ virtual void OnBytesRead(URLRequestJob* job, int byte_count);
// NetworkLibrary overrides.
virtual void AddObserver(Observer* observer);
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index 1ac1410..1d2907a 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -835,8 +835,7 @@ void TaskManagerModel::OnJobRedirect(URLRequestJob* job,
int status_code) {
}
-void TaskManagerModel::OnBytesRead(URLRequestJob* job, const char* buf,
- int byte_count) {
+void TaskManagerModel::OnBytesRead(URLRequestJob* job, int byte_count) {
int render_process_host_child_id = -1, routing_id = -1;
ResourceDispatcherHost::RenderViewForRequest(job->request(),
&render_process_host_child_id,
diff --git a/chrome/browser/task_manager.h b/chrome/browser/task_manager.h
index 6ffd09b..2865a46 100644
--- a/chrome/browser/task_manager.h
+++ b/chrome/browser/task_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -241,7 +241,7 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver,
void OnJobRemoved(URLRequestJob* job);
void OnJobDone(URLRequestJob* job, const URLRequestStatus& status);
void OnJobRedirect(URLRequestJob* job, const GURL& location, int status_code);
- void OnBytesRead(URLRequestJob* job, const char* buf, int byte_count);
+ void OnBytesRead(URLRequestJob* job, int byte_count);
void AddResourceProvider(TaskManager::ResourceProvider* provider);
void RemoveResourceProvider(TaskManager::ResourceProvider* provider);