summaryrefslogtreecommitdiffstats
path: root/net/url_request
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/url_request
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/url_request')
-rw-r--r--net/url_request/url_request.cc4
-rw-r--r--net/url_request/url_request.h10
-rw-r--r--net/url_request/url_request_http_job.cc3
-rw-r--r--net/url_request/url_request_new_ftp_job.cc3
4 files changed, 16 insertions, 4 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 7dfad41..aa76b00 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -10,6 +10,7 @@
#include "base/stats_counters.h"
#include "base/string_util.h"
#include "net/base/load_flags.h"
+#include "net/base/load_log.h"
#include "net/base/net_errors.h"
#include "net/base/ssl_cert_request_info.h"
#include "net/base/upload_data.h"
@@ -39,7 +40,8 @@ static URLRequestJobManager* GetJobManager() {
// URLRequest
URLRequest::URLRequest(const GURL& url, Delegate* delegate)
- : url_(url),
+ : load_log_(new net::LoadLog),
+ url_(url),
original_url_(url),
method_("GET"),
load_flags_(net::LOAD_NORMAL),
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 5a97fc6..00ff344 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -15,6 +15,7 @@
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "googleurl/src/gurl.h"
+#include "net/base/load_log.h"
#include "net/base/load_states.h"
#include "net/http/http_response_info.h"
#include "net/url_request/url_request_status.h"
@@ -485,6 +486,8 @@ class URLRequest {
URLRequestContext* context();
void set_context(URLRequestContext* context);
+ net::LoadLog* load_log() { return load_log_; }
+
// Returns the expected content size if available
int64 GetExpectedContentSize() const;
@@ -541,9 +544,14 @@ class URLRequest {
// Origin).
static std::string StripPostSpecificHeaders(const std::string& headers);
- // Contextual information used for this request (can be NULL).
+ // Contextual information used for this request (can be NULL). This contains
+ // most of the dependencies which are shared between requests (disk cache,
+ // cookie store, socket poool, etc.)
scoped_refptr<URLRequestContext> context_;
+ // Tracks the time spent in various load states throughout this request.
+ scoped_refptr<net::LoadLog> load_log_;
+
scoped_refptr<URLRequestJob> job_;
scoped_refptr<net::UploadData> upload_;
GURL url_;
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index ec3301b..bf554e8 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -581,7 +581,8 @@ void URLRequestHttpJob::StartTransaction() {
int rv;
if (transaction_.get()) {
- rv = transaction_->Start(&request_info_, &start_callback_);
+ rv = transaction_->Start(
+ request_->load_log(), &request_info_, &start_callback_);
if (rv == net::ERR_IO_PENDING)
return;
} else {
diff --git a/net/url_request/url_request_new_ftp_job.cc b/net/url_request/url_request_new_ftp_job.cc
index 72aee4d..5b16e7a 100644
--- a/net/url_request/url_request_new_ftp_job.cc
+++ b/net/url_request/url_request_new_ftp_job.cc
@@ -282,7 +282,8 @@ void URLRequestNewFtpJob::StartTransaction() {
SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
int rv;
if (transaction_.get()) {
- rv = transaction_->Start(&request_info_, &start_callback_);
+ rv = transaction_->Start(
+ request_->load_log(), &request_info_, &start_callback_);
if (rv == net::ERR_IO_PENDING)
return;
} else {