summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 17:47:49 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 17:47:49 +0000
commitfd9c0d9df665355c14d3c0df6f3c5b0b2059c129 (patch)
tree1d2c2cb1cd339587089ae0f913864ef163cf2778 /net
parent3773020c131d144f0e0e1d849227b34d7c4cf6e1 (diff)
downloadchromium_src-fd9c0d9df665355c14d3c0df6f3c5b0b2059c129.zip
chromium_src-fd9c0d9df665355c14d3c0df6f3c5b0b2059c129.tar.gz
chromium_src-fd9c0d9df665355c14d3c0df6f3c5b0b2059c129.tar.bz2
Add an initial implementation of net-internals inspector in javascript.
BUG=37421 Review URL: http://codereview.chromium.org/1088007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/net_log.cc9
-rw-r--r--net/base/net_log.h3
-rw-r--r--net/socket/client_socket_pool_base.cc3
3 files changed, 14 insertions, 1 deletions
diff --git a/net/base/net_log.cc b/net/base/net_log.cc
index 1b1661e..6bb9297 100644
--- a/net/base/net_log.cc
+++ b/net/base/net_log.cc
@@ -17,6 +17,15 @@ const char* NetLog::EventTypeToString(EventType event) {
return NULL;
}
+// static
+std::vector<NetLog::EventType> NetLog::GetAllEventTypes() {
+ std::vector<NetLog::EventType> types;
+#define EVENT_TYPE(label) types.push_back(TYPE_ ## label);
+#include "net/base/net_log_event_type_list.h"
+#undef EVENT_TYPE
+ return types;
+}
+
void BoundNetLog::AddEntry(const NetLog::Entry& entry) const {
if (net_log_)
net_log_->AddEntry(entry);
diff --git a/net/base/net_log.h b/net/base/net_log.h
index 79c6585..ca83edd 100644
--- a/net/base/net_log.h
+++ b/net/base/net_log.h
@@ -118,6 +118,9 @@ class NetLog {
// Returns a C-String symbolic name for |event_type|.
static const char* EventTypeToString(EventType event_type);
+ // Returns a list of all the available EventTypes.
+ static std::vector<EventType> GetAllEventTypes();
+
private:
DISALLOW_COPY_AND_ASSIGN(NetLog);
};
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index 75196f5..c3172e5 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -56,7 +56,8 @@ int ConnectJob::Connect() {
if (timeout_duration_ != base::TimeDelta())
timer_.Start(timeout_duration_, this, &ConnectJob::OnTimeout);
- net_log_.BeginEvent(NetLog::TYPE_SOCKET_POOL_CONNECT_JOB);
+ net_log_.BeginEventWithString(NetLog::TYPE_SOCKET_POOL_CONNECT_JOB,
+ group_name_);
int rv = ConnectInternal();