summaryrefslogtreecommitdiffstats
path: root/net/base/host_resolver_impl.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-16 07:03:53 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-16 07:03:53 +0000
commit9e743cddfd631038fe6f1cdde050e18d61319ec6 (patch)
tree7ef974e43b23f570433fe819bcd07966165c517f /net/base/host_resolver_impl.h
parent2e7aff66fe443c29b2fc14a776dca5512b0b4729 (diff)
downloadchromium_src-9e743cddfd631038fe6f1cdde050e18d61319ec6.zip
chromium_src-9e743cddfd631038fe6f1cdde050e18d61319ec6.tar.gz
chromium_src-9e743cddfd631038fe6f1cdde050e18d61319ec6.tar.bz2
Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog).
This makes it possible to associate a single NetLog with a URLRequestContext, and then attach observers to that log to watch the stream of events. This changelist attempts to do the most direct translation, so there will be subsequent iterations to clean up. The user-visible behavior should remain unchanged. BUG=37421 Review URL: http://codereview.chromium.org/848006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_resolver_impl.h')
-rw-r--r--net/base/host_resolver_impl.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/base/host_resolver_impl.h b/net/base/host_resolver_impl.h
index 3e273cd..de2cc14 100644
--- a/net/base/host_resolver_impl.h
+++ b/net/base/host_resolver_impl.h
@@ -12,6 +12,7 @@
#include "net/base/host_cache.h"
#include "net/base/host_resolver.h"
#include "net/base/host_resolver_proc.h"
+#include "net/base/net_log.h"
#include "net/base/network_change_notifier.h"
namespace net {
@@ -83,7 +84,7 @@ class HostResolverImpl : public HostResolver,
AddressList* addresses,
CompletionCallback* callback,
RequestHandle* out_req,
- LoadLog* load_log);
+ const BoundNetLog& net_log);
virtual void CancelRequest(RequestHandle req);
virtual void AddObserver(HostResolver::Observer* observer);
virtual void RemoveObserver(HostResolver::Observer* observer);
@@ -108,8 +109,8 @@ class HostResolverImpl : public HostResolver,
bool IsRequestsTracingEnabled() const;
- // Returns a copy of the requests trace log, or NULL if there is none.
- scoped_refptr<LoadLog> GetRequestsTrace();
+ // Gets a copy of the requests trace log.
+ bool GetRequestsTrace(std::vector<NetLog::Entry>* entries);
// Applies a set of constraints for requests that belong to the specified
// pool. NOTE: Don't call this after requests have been already been started.
@@ -160,18 +161,18 @@ class HostResolverImpl : public HostResolver,
void OnJobComplete(Job* job, int error, const AddressList& addrlist);
// Called when a request has just been started.
- void OnStartRequest(LoadLog* load_log,
+ void OnStartRequest(const BoundNetLog& net_log,
int request_id,
const RequestInfo& info);
// Called when a request has just completed (before its callback is run).
- void OnFinishRequest(LoadLog* load_log,
+ void OnFinishRequest(const BoundNetLog& net_log,
int request_id,
const RequestInfo& info,
int error);
// Called when a request has been cancelled.
- void OnCancelRequest(LoadLog* load_log,
+ void OnCancelRequest(const BoundNetLog& net_log,
int request_id,
const RequestInfo& info);