summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache.cc
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 00:25:12 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 00:25:12 +0000
commitec08bb23238e41b66daa676c3c55f23544a0de14 (patch)
treeaef939a8d5cccb67d037d8d055380a82e95bbfaa /net/http/http_cache.cc
parentdb471b330fc82a9f450807ec1f4307c29dda23c4 (diff)
downloadchromium_src-ec08bb23238e41b66daa676c3c55f23544a0de14.zip
chromium_src-ec08bb23238e41b66daa676c3c55f23544a0de14.tar.gz
chromium_src-ec08bb23238e41b66daa676c3c55f23544a0de14.tar.bz2
Add a "LoadLog" parameter to transactions, hostresolver, clientsocketpool and proyxservice.This dependency comes from the parent URLRequest, and is used as a container for per-request profiling data.This change is strictly a no-op refactor -- the parameter is unused, and LoadLog does nothing.BUG=http://crbug.com/14478TEST=none -- just needs to compile and pass existing tests.DESIGN=<http://docs.google.com/Doc?id=dfhcnb2v_21gbtrcpr3&hl=en>
Review URL: http://codereview.chromium.org/126303 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23127 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r--net/http/http_cache.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index b7707d1..5265ca7 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -194,7 +194,7 @@ class HttpCache::Transaction
virtual ~Transaction();
// HttpTransaction methods:
- virtual int Start(const HttpRequestInfo*, CompletionCallback*);
+ virtual int Start(LoadLog*, const HttpRequestInfo*, CompletionCallback*);
virtual int RestartIgnoringLastError(CompletionCallback*);
virtual int RestartWithCertificate(X509Certificate* client_cert,
CompletionCallback* callback);
@@ -256,7 +256,7 @@ class HttpCache::Transaction
int HandleResult(int rv);
// Sets request_ and fields derived from it.
- void SetRequest(const HttpRequestInfo* request);
+ void SetRequest(LoadLog* load_log, const HttpRequestInfo* request);
// Returns true if the request should be handled exclusively by the network
// layer (skipping the cache entirely).
@@ -365,6 +365,7 @@ class HttpCache::Transaction
// Called to signal completion of the cache's ReadData method:
void OnCacheReadCompleted(int result);
+ scoped_refptr<LoadLog> load_log_;
const HttpRequestInfo* request_;
scoped_ptr<HttpRequestInfo> custom_request_;
// If extra_headers specified a "if-modified-since" or "if-none-match",
@@ -409,7 +410,8 @@ HttpCache::Transaction::~Transaction() {
cache_ = NULL;
}
-int HttpCache::Transaction::Start(const HttpRequestInfo* request,
+int HttpCache::Transaction::Start(LoadLog* load_log,
+ const HttpRequestInfo* request,
CompletionCallback* callback) {
DCHECK(request);
DCHECK(callback);
@@ -420,7 +422,7 @@ int HttpCache::Transaction::Start(const HttpRequestInfo* request,
if (revoked())
return ERR_UNEXPECTED;
- SetRequest(request);
+ SetRequest(load_log, request);
int rv;
@@ -709,7 +711,9 @@ int HttpCache::Transaction::HandleResult(int rv) {
return rv;
}
-void HttpCache::Transaction::SetRequest(const HttpRequestInfo* request) {
+void HttpCache::Transaction::SetRequest(LoadLog* load_log,
+ const HttpRequestInfo* request) {
+ load_log_ = load_log;
request_ = request;
effective_load_flags_ = request_->load_flags;
@@ -978,7 +982,7 @@ int HttpCache::Transaction::BeginNetworkRequest() {
if (!network_trans_.get())
return net::ERR_CACHE_CANNOT_CREATE_NETWORK_TRANSACTION;
- int rv = network_trans_->Start(request_, &network_info_callback_);
+ int rv = network_trans_->Start(load_log_, request_, &network_info_callback_);
if (rv != ERR_IO_PENDING)
OnNetworkInfoAvailable(rv);
return rv;