summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_job_tracker.h
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 /net/url_request/url_request_job_tracker.h
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 'net/url_request/url_request_job_tracker.h')
-rw-r--r--net/url_request/url_request_job_tracker.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/url_request/url_request_job_tracker.h b/net/url_request/url_request_job_tracker.h
index 8b554b9..4ec69d7 100644
--- a/net/url_request/url_request_job_tracker.h
+++ b/net/url_request/url_request_job_tracker.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.
@@ -44,13 +44,9 @@ class URLRequestJobTracker {
virtual void OnJobRedirect(URLRequestJob* job, const GURL& location,
int status_code) = 0;
- // Called when a new chunk of unfiltered bytes has been read for
- // the given job. |byte_count| is the number of bytes for that
- // read event only. |buf| is a pointer to the data buffer that
- // contains those bytes. The data in |buf| is only valid for the
- // duration of the OnBytesRead callback.
- virtual void OnBytesRead(URLRequestJob* job, const char* buf,
- int byte_count) = 0;
+ // Called when a new chunk of bytes has been read for the given job. The
+ // byte count is the number of bytes for that read event only.
+ virtual void OnBytesRead(URLRequestJob* job, int byte_count) = 0;
virtual ~JobObserver() {}
};
@@ -79,7 +75,7 @@ class URLRequestJobTracker {
int status_code);
// Bytes read notifications.
- void OnBytesRead(URLRequestJob* job, const char* buf, int byte_count);
+ void OnBytesRead(URLRequestJob* job, int byte_count);
// allows iteration over all active jobs
JobIterator begin() const {