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

Unified Diff: net/url_request/url_request_file_job.h

Issue 227943003: Add experiment to measure time to hash extension content as we read it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged latest trunk, fixed compile problem Created 6 years, 8 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 | « net/net.gypi ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_file_job.h
diff --git a/net/url_request/url_request_file_job.h b/net/url_request/url_request_file_job.h
index a94596bd1fcd2c67c9b13d64646f07dcd36128c4..3af83f58e314a713b2ed4b37b96bccde8003049a 100644
--- a/net/url_request/url_request_file_job.h
+++ b/net/url_request/url_request_file_job.h
@@ -16,7 +16,7 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_job.h"
-namespace base{
+namespace base {
class TaskRunner;
}
namespace file_util {
@@ -48,6 +48,10 @@ class NET_EXPORT URLRequestFileJob : public URLRequestJob {
virtual void SetExtraRequestHeaders(
const HttpRequestHeaders& headers) OVERRIDE;
+ // An interface for subclasses who wish to monitor read operations.
+ virtual void OnSeekComplete(int64 result);
+ virtual void OnReadComplete(net::IOBuffer* buf, int result);
+
protected:
virtual ~URLRequestFileJob();
@@ -88,8 +92,8 @@ class NET_EXPORT URLRequestFileJob : public URLRequestJob {
// on a background thread.
void DidSeek(int64 result);
- // Callback after data is asynchronously read from the file.
- void DidRead(int result);
+ // Callback after data is asynchronously read from the file into |buf|.
+ void DidRead(scoped_refptr<net::IOBuffer> buf, int result);
scoped_ptr<FileStream> stream_;
FileMetaInfo meta_info_;
« no previous file with comments | « net/net.gypi ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698