summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/base/host_resolver_impl.cc12
-rw-r--r--net/base/host_resolver_impl_unittest.cc12
-rw-r--r--net/base/net_log_event_type_list.h9
3 files changed, 2 insertions, 31 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index ffaada3..5d0a85e 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -878,14 +878,10 @@ void HostResolverImpl::OnStartRequest(const BoundNetLog& net_log,
// Notify the observers of the start.
if (!observers_.empty()) {
- net_log.BeginEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONSTART, NULL);
-
for (ObserversList::iterator it = observers_.begin();
it != observers_.end(); ++it) {
(*it)->OnStartResolution(request_id, info);
}
-
- net_log.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONSTART, NULL);
}
}
@@ -895,15 +891,11 @@ void HostResolverImpl::OnFinishRequest(const BoundNetLog& net_log,
int error) {
// Notify the observers of the completion.
if (!observers_.empty()) {
- net_log.BeginEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONFINISH, NULL);
-
bool was_resolved = error == OK;
for (ObserversList::iterator it = observers_.begin();
it != observers_.end(); ++it) {
(*it)->OnFinishResolutionWithStatus(request_id, was_resolved, info);
}
-
- net_log.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONFINISH, NULL);
}
net_log.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL, NULL);
@@ -916,14 +908,10 @@ void HostResolverImpl::OnCancelRequest(const BoundNetLog& net_log,
// Notify the observers of the cancellation.
if (!observers_.empty()) {
- net_log.BeginEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONCANCEL, NULL);
-
for (ObserversList::iterator it = observers_.begin();
it != observers_.end(); ++it) {
(*it)->OnCancelResolution(request_id, info);
}
-
- net_log.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONCANCEL, NULL);
}
net_log.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL, NULL);
diff --git a/net/base/host_resolver_impl_unittest.cc b/net/base/host_resolver_impl_unittest.cc
index bf69bff7..ce1ae3b 100644
--- a/net/base/host_resolver_impl_unittest.cc
+++ b/net/base/host_resolver_impl_unittest.cc
@@ -911,19 +911,11 @@ TEST_F(HostResolverImplTest, Observers) {
int rv = host_resolver->Resolve(info1, &addrlist, NULL, NULL, log.bound());
EXPECT_EQ(OK, rv);
- EXPECT_EQ(6u, log.entries().size());
+ EXPECT_EQ(2u, log.entries().size());
EXPECT_TRUE(LogContainsBeginEvent(
log.entries(), 0, NetLog::TYPE_HOST_RESOLVER_IMPL));
- EXPECT_TRUE(LogContainsBeginEvent(
- log.entries(), 1, NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONSTART));
- EXPECT_TRUE(LogContainsEndEvent(
- log.entries(), 2, NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONSTART));
- EXPECT_TRUE(LogContainsBeginEvent(
- log.entries(), 3, NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONFINISH));
- EXPECT_TRUE(LogContainsEndEvent(
- log.entries(), 4, NetLog::TYPE_HOST_RESOLVER_IMPL_OBSERVER_ONFINISH));
EXPECT_TRUE(LogContainsEndEvent(
- log.entries(), 5, NetLog::TYPE_HOST_RESOLVER_IMPL));
+ log.entries(), 1, NetLog::TYPE_HOST_RESOLVER_IMPL));
EXPECT_EQ(1U, observer.start_log.size());
EXPECT_EQ(1U, observer.finish_log.size());
diff --git a/net/base/net_log_event_type_list.h b/net/base/net_log_event_type_list.h
index 84ef02e..5d9e312 100644
--- a/net/base/net_log_event_type_list.h
+++ b/net/base/net_log_event_type_list.h
@@ -28,15 +28,6 @@ EVENT_TYPE(REQUEST_ALIVE)
// The start/end of a host resolve (DNS) request.
EVENT_TYPE(HOST_RESOLVER_IMPL)
-// The start/end of HostResolver::Observer::OnStartResolution.
-EVENT_TYPE(HOST_RESOLVER_IMPL_OBSERVER_ONSTART)
-
-// The start/end of HostResolver::Observer::OnFinishResolutionWithStatus
-EVENT_TYPE(HOST_RESOLVER_IMPL_OBSERVER_ONFINISH)
-
-// The start/end of HostResolver::Observer::OnCancelResolution.
-EVENT_TYPE(HOST_RESOLVER_IMPL_OBSERVER_ONCANCEL)
-
// ------------------------------------------------------------------------
// InitProxyResolver
// ------------------------------------------------------------------------