diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-12 18:35:04 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-12 18:35:04 +0000 |
commit | 5e49b2ce1dc358328ab732520b17414b44081712 (patch) | |
tree | 1137d2dbb179f931d1c725ee8238eef4c70ad1c6 | |
parent | b9ae5690d326fd0211b12b584944dcebce5fd236 (diff) | |
download | chromium_src-5e49b2ce1dc358328ab732520b17414b44081712.zip chromium_src-5e49b2ce1dc358328ab732520b17414b44081712.tar.gz chromium_src-5e49b2ce1dc358328ab732520b17414b44081712.tar.bz2 |
Initialize the new net internals page using the passively collected log entries.
BUG=37421
Review URL: http://codereview.chromium.org/1560025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44266 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/dom_ui/net_internals_ui.cc | 105 | ||||
-rw-r--r-- | chrome/browser/net/passive_log_collector.cc | 65 | ||||
-rw-r--r-- | chrome/browser/net/passive_log_collector.h | 59 | ||||
-rw-r--r-- | chrome/browser/net/passive_log_collector_unittest.cc | 14 | ||||
-rw-r--r-- | chrome/browser/net/view_net_internals_job_factory.cc | 32 | ||||
-rw-r--r-- | chrome/browser/resources/net_internals/index.html | 10 | ||||
-rw-r--r-- | chrome/browser/resources/net_internals/main.js | 5 |
7 files changed, 215 insertions, 75 deletions
diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index e72ef12..6d0f308 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.cc @@ -18,6 +18,7 @@ #include "chrome/browser/dom_ui/chrome_url_data_manager.h" #include "chrome/browser/io_thread.h" #include "chrome/browser/net/chrome_net_log.h" +#include "chrome/browser/net/passive_log_collector.h" #include "chrome/browser/net/url_request_context_getter.h" #include "chrome/browser/profile.h" #include "chrome/common/chrome_paths.h" @@ -49,8 +50,34 @@ net::HostCache* GetHostResolverCache(URLRequestContext* context) { return host_resolver_impl->cache(); } -// TODO(eroman): Bootstrap the net-internals page using the passively logged -// data. +// Serializes the specified event to a DictionaryValue. +Value* EntryToDictionaryValue(net::NetLog::EventType type, + const base::TimeTicks& time, + const net::NetLog::Source& source, + net::NetLog::EventPhase phase, + net::NetLog::EventParameters* extra_parameters) { + DictionaryValue* entry_dict = new DictionaryValue(); + + // Set the entry time. (Note that we send it as a string since integers + // might overflow). + entry_dict->SetString(L"time", TickCountToString(time)); + + // Set the entry source. + DictionaryValue* source_dict = new DictionaryValue(); + source_dict->SetInteger(L"id", source.id); + source_dict->SetInteger(L"type", static_cast<int>(source.type)); + entry_dict->Set(L"source", source_dict); + + // Set the event info. + entry_dict->SetInteger(L"type", static_cast<int>(type)); + entry_dict->SetInteger(L"phase", static_cast<int>(phase)); + + // Set the event-specific parameters. + if (extra_parameters) + entry_dict->SetString(L"extra_parameters", extra_parameters->ToString()); + + return entry_dict; +} class NetInternalsHTMLSource : public ChromeURLDataManager::DataSource { public: @@ -150,6 +177,7 @@ class NetInternalsMessageHandler::IOThreadImpl void OnClearBadProxies(const Value* value); void OnGetHostResolverCache(const Value* value); void OnClearHostResolverCache(const Value* value); + void OnGetPassiveLogEntries(const Value* value); // ChromeNetLog::Observer implementation: virtual void OnAddEntry(net::NetLog::EventType type, @@ -291,20 +319,30 @@ DOMMessageHandler* NetInternalsMessageHandler::Attach(DOMUI* dom_ui) { void NetInternalsMessageHandler::RegisterMessages() { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - dom_ui_->RegisterMessageCallback("notifyReady", + dom_ui_->RegisterMessageCallback( + "notifyReady", proxy_->CreateCallback(&IOThreadImpl::OnRendererReady)); - dom_ui_->RegisterMessageCallback("getProxySettings", + dom_ui_->RegisterMessageCallback( + "getProxySettings", proxy_->CreateCallback(&IOThreadImpl::OnGetProxySettings)); - dom_ui_->RegisterMessageCallback("reloadProxySettings", + dom_ui_->RegisterMessageCallback( + "reloadProxySettings", proxy_->CreateCallback(&IOThreadImpl::OnReloadProxySettings)); - dom_ui_->RegisterMessageCallback("getBadProxies", + dom_ui_->RegisterMessageCallback( + "getBadProxies", proxy_->CreateCallback(&IOThreadImpl::OnGetBadProxies)); - dom_ui_->RegisterMessageCallback("clearBadProxies", + dom_ui_->RegisterMessageCallback( + "clearBadProxies", proxy_->CreateCallback(&IOThreadImpl::OnClearBadProxies)); - dom_ui_->RegisterMessageCallback("getHostResolverCache", + dom_ui_->RegisterMessageCallback( + "getHostResolverCache", proxy_->CreateCallback(&IOThreadImpl::OnGetHostResolverCache)); - dom_ui_->RegisterMessageCallback("clearHostResolverCache", + dom_ui_->RegisterMessageCallback( + "clearHostResolverCache", proxy_->CreateCallback(&IOThreadImpl::OnClearHostResolverCache)); + dom_ui_->RegisterMessageCallback( + "getPassiveLogEntries", + proxy_->CreateCallback(&IOThreadImpl::OnGetPassiveLogEntries)); } void NetInternalsMessageHandler::CallJavascriptFunction( @@ -428,7 +466,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( Int64ToString(tick_to_unix_time_ms))); } - // Notify the client of the basic proxy data. + OnGetPassiveLogEntries(NULL); OnGetProxySettings(NULL); OnGetBadProxies(NULL); OnGetHostResolverCache(NULL); @@ -567,6 +605,26 @@ void NetInternalsMessageHandler::IOThreadImpl::OnClearHostResolverCache( OnGetHostResolverCache(NULL); } +void NetInternalsMessageHandler::IOThreadImpl::OnGetPassiveLogEntries( + const Value* value) { + ChromeNetLog* net_log = io_thread_->globals()->net_log.get(); + + PassiveLogCollector::EntryList passive_entries; + net_log->passive_collector()->GetAllCapturedEvents(&passive_entries); + + ListValue* list = new ListValue(); + for (size_t i = 0; i < passive_entries.size(); ++i) { + const PassiveLogCollector::Entry& e = passive_entries[i]; + list->Append(EntryToDictionaryValue(e.type, + e.time, + e.source, + e.phase, + e.extra_parameters)); + } + + CallJavascriptFunction(L"g_browser.receivedPassiveLogEntries", list); +} + void NetInternalsMessageHandler::IOThreadImpl::OnAddEntry( net::NetLog::EventType type, const base::TimeTicks& time, @@ -575,29 +633,9 @@ void NetInternalsMessageHandler::IOThreadImpl::OnAddEntry( net::NetLog::EventParameters* extra_parameters) { DCHECK(is_observing_log_); - // JSONify the NetLog::Entry. - // TODO(eroman): Need a better format for this. - DictionaryValue* entry_dict = new DictionaryValue(); - - // Set the entry time. (Note that we send it as a string since integers - // might overflow). - entry_dict->SetString(L"time", TickCountToString(time)); - - // Set the entry source. - DictionaryValue* source_dict = new DictionaryValue(); - source_dict->SetInteger(L"id", source.id); - source_dict->SetInteger(L"type", static_cast<int>(source.type)); - entry_dict->Set(L"source", source_dict); - - // Set the event info. - entry_dict->SetInteger(L"type", static_cast<int>(type)); - entry_dict->SetInteger(L"phase", static_cast<int>(phase)); - - // Set the event-specific parameters. - if (extra_parameters) - entry_dict->SetString(L"extra_parameters", extra_parameters->ToString()); - - CallJavascriptFunction(L"g_browser.receivedLogEntry", entry_dict); + CallJavascriptFunction( + L"g_browser.receivedLogEntry", + EntryToDictionaryValue(type, time, source, phase, extra_parameters)); } void NetInternalsMessageHandler::IOThreadImpl::DispatchToMessageHandler( @@ -620,7 +658,6 @@ void NetInternalsMessageHandler::IOThreadImpl::CallJavascriptFunction( return; } - // Otherwise if we were called from the IO thread, bridge the request over to // the UI thread. diff --git a/chrome/browser/net/passive_log_collector.cc b/chrome/browser/net/passive_log_collector.cc index 2b73885..64484da 100644 --- a/chrome/browser/net/passive_log_collector.cc +++ b/chrome/browser/net/passive_log_collector.cc @@ -21,7 +21,7 @@ bool OrderBySourceID(const PassiveLogCollector::RequestInfo& a, return a.entries[0].source.id < b.entries[0].source.id; } -void AddEntryToRequestInfo(const net::CapturingNetLog::Entry& entry, +void AddEntryToRequestInfo(const PassiveLogCollector::Entry& entry, bool is_unbounded, PassiveLogCollector::RequestInfo* out_info) { // Start dropping new entries when the log has gotten too big. @@ -40,6 +40,22 @@ void AppendToRequestInfo(const PassiveLogCollector::RequestInfo& info, AddEntryToRequestInfo(info.entries[i], is_unbounded, out_info); } +// Appends all of the logged events in |input| to |out|. +void AppendAllEntriesFromRequests( + const PassiveLogCollector::RequestInfoList& input, + PassiveLogCollector::EntryList* out) { + for (size_t i = 0; i < input.size(); ++i) { + const PassiveLogCollector::EntryList& entries = input[i].entries; + out->insert(out->end(), entries.begin(), entries.end()); + } +} + +// Comparator to sort entries by their |order| property, ascending. +bool SortByOrderComparator(const PassiveLogCollector::Entry& a, + const PassiveLogCollector::Entry& b) { + return a.order < b.order; +} + } // namespace //---------------------------------------------------------------------------- @@ -48,7 +64,8 @@ void AppendToRequestInfo(const PassiveLogCollector::RequestInfo& info, PassiveLogCollector::PassiveLogCollector() : url_request_tracker_(&connect_job_tracker_), - socket_stream_tracker_(&connect_job_tracker_) { + socket_stream_tracker_(&connect_job_tracker_), + num_events_seen_(0) { } PassiveLogCollector::~PassiveLogCollector() { @@ -61,8 +78,7 @@ void PassiveLogCollector::OnAddEntry( net::NetLog::EventPhase phase, net::NetLog::EventParameters* extra_parameters) { // Package the parameters into a single struct for convenience. - net::CapturingNetLog::Entry entry(type, time, source, phase, - extra_parameters); + Entry entry(num_events_seen_++, type, time, source, phase, extra_parameters); switch (entry.source.type) { case net::NetLog::SOURCE_URL_REQUEST: @@ -89,6 +105,22 @@ void PassiveLogCollector::Clear() { socket_stream_tracker_.Clear(); } +void PassiveLogCollector::GetAllCapturedEvents(EntryList* out) const { + out->clear(); + + // Append all of the captured entries held by the various trackers to + // |out|. + socket_stream_tracker_.AppendAllEntries(out); + url_request_tracker_.AppendAllEntries(out); + + const EntryList& proxy_entries = + init_proxy_resolver_tracker_.entries(); + out->insert(out->end(), proxy_entries.begin(), proxy_entries.end()); + + // Now sort the list of entries by their insertion time (ascending). + std::sort(out->begin(), out->end(), &SortByOrderComparator); +} + //---------------------------------------------------------------------------- // RequestTrackerBase //---------------------------------------------------------------------------- @@ -100,8 +132,7 @@ PassiveLogCollector::RequestTrackerBase::RequestTrackerBase( is_unbounded_(false) { } -void PassiveLogCollector::RequestTrackerBase::OnAddEntry( - const net::CapturingNetLog::Entry& entry) { +void PassiveLogCollector::RequestTrackerBase::OnAddEntry(const Entry& entry) { RequestInfo& info = live_requests_[entry.source.id]; Action result = DoAddEntry(entry, &info); @@ -199,6 +230,12 @@ void PassiveLogCollector::RequestTrackerBase::Clear() { live_requests_.clear(); } +void PassiveLogCollector::RequestTrackerBase::AppendAllEntries( + EntryList* out) const { + AppendAllEntriesFromRequests(GetLiveRequests(), out); + AppendAllEntriesFromRequests(GetRecentlyDeceased(), out); +} + void PassiveLogCollector::RequestTrackerBase::InsertIntoGraveyard( const RequestInfo& info) { if (is_unbounded_) { @@ -230,9 +267,8 @@ PassiveLogCollector::ConnectJobTracker::ConnectJobTracker() } PassiveLogCollector::RequestTrackerBase::Action -PassiveLogCollector::ConnectJobTracker::DoAddEntry( - const net::CapturingNetLog::Entry& entry, - RequestInfo* out_info) { +PassiveLogCollector::ConnectJobTracker::DoAddEntry(const Entry& entry, + RequestInfo* out_info) { // Save the entry (possibly truncating). AddEntryToRequestInfo(entry, is_unbounded(), out_info); @@ -259,9 +295,8 @@ PassiveLogCollector::RequestTracker::RequestTracker( } PassiveLogCollector::RequestTrackerBase::Action -PassiveLogCollector::RequestTracker::DoAddEntry( - const net::CapturingNetLog::Entry& entry, - RequestInfo* out_info) { +PassiveLogCollector::RequestTracker::DoAddEntry(const Entry& entry, + RequestInfo* out_info) { if (entry.type == net::NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_ID) { // If this was notification that a ConnectJob was bound to the request, @@ -298,7 +333,7 @@ PassiveLogCollector::RequestTracker::DoAddEntry( } void PassiveLogCollector::RequestTracker::AddConnectJobInfo( - const net::CapturingNetLog::Entry& entry, + const Entry& entry, RequestInfo* live_entry) { // We have just been notified of which ConnectJob the // URLRequest/SocketStream was assigned. Lookup all the data we captured @@ -317,7 +352,7 @@ void PassiveLogCollector::RequestTracker::AddConnectJobInfo( } else { // If we couldn't find the information for the ConnectJob, append a // generic message instead. - net::CapturingNetLog::Entry e(entry); + Entry e(entry); e.type = net::NetLog::TYPE_TODO_STRING; e.extra_parameters = new net::NetLogStringParameter( StringPrintf("Used ConnectJob id=%d", connect_job_id)); @@ -332,7 +367,7 @@ void PassiveLogCollector::RequestTracker::AddConnectJobInfo( PassiveLogCollector::InitProxyResolverTracker::InitProxyResolverTracker() {} void PassiveLogCollector::InitProxyResolverTracker::OnAddEntry( - const net::CapturingNetLog::Entry& entry) { + const Entry& entry) { if (entry.type == net::NetLog::TYPE_INIT_PROXY_RESOLVER && entry.phase == net::NetLog::PHASE_BEGIN) { // If this is the start of a new InitProxyResolver, overwrite the old data. diff --git a/chrome/browser/net/passive_log_collector.h b/chrome/browser/net/passive_log_collector.h index cb4395d..df9688a 100644 --- a/chrome/browser/net/passive_log_collector.h +++ b/chrome/browser/net/passive_log_collector.h @@ -8,15 +8,41 @@ #include <vector> #include "base/hash_tables.h" +#include "base/ref_counted.h" +#include "base/time.h" #include "chrome/browser/net/chrome_net_log.h" #include "net/base/net_log.h" class PassiveLogCollector : public ChromeNetLog::Observer { public: + // This structure encapsulates all of the parameters of a captured event, + // including an "order" field that identifies when it was captured relative + // to other events. + struct Entry { + Entry(int order, + net::NetLog::EventType type, + const base::TimeTicks& time, + net::NetLog::Source source, + net::NetLog::EventPhase phase, + net::NetLog::EventParameters* extra_parameters) + : order(order), type(type), time(time), source(source), phase(phase), + extra_parameters(extra_parameters) { + } + + int order; + net::NetLog::EventType type; + base::TimeTicks time; + net::NetLog::Source source; + net::NetLog::EventPhase phase; + scoped_refptr<net::NetLog::EventParameters> extra_parameters; + }; + + typedef std::vector<Entry> EntryList; + struct RequestInfo { RequestInfo() : num_entries_truncated(0) {} std::string url; - net::CapturingNetLog::EntryList entries; + EntryList entries; size_t num_entries_truncated; }; @@ -28,7 +54,7 @@ class PassiveLogCollector : public ChromeNetLog::Observer { public: explicit RequestTrackerBase(size_t max_graveyard_size); - void OnAddEntry(const net::CapturingNetLog::Entry& entry); + void OnAddEntry(const Entry& entry); RequestInfoList GetLiveRequests() const; void ClearRecentlyDeceased(); @@ -39,6 +65,9 @@ class PassiveLogCollector : public ChromeNetLog::Observer { void Clear(); + // Appends all the captured entries to |out|. The ordering is undefined. + void AppendAllEntries(EntryList* out) const; + const RequestInfo* GetRequestInfoFromGraveyard(int id) const; protected: @@ -50,8 +79,7 @@ class PassiveLogCollector : public ChromeNetLog::Observer { // Updates |out_info| with the information from |entry|. Returns an action // to perform for this map entry on completion. - virtual Action DoAddEntry(const net::CapturingNetLog::Entry& entry, - RequestInfo* out_info) = 0; + virtual Action DoAddEntry(const Entry& entry, RequestInfo* out_info) = 0; bool is_unbounded() const { return is_unbounded_; } @@ -78,8 +106,7 @@ class PassiveLogCollector : public ChromeNetLog::Observer { ConnectJobTracker(); protected: - virtual Action DoAddEntry(const net::CapturingNetLog::Entry& entry, - RequestInfo* out_info); + virtual Action DoAddEntry(const Entry& entry, RequestInfo* out_info); private: DISALLOW_COPY_AND_ASSIGN(ConnectJobTracker); }; @@ -93,14 +120,12 @@ class PassiveLogCollector : public ChromeNetLog::Observer { explicit RequestTracker(ConnectJobTracker* connect_job_tracker); protected: - virtual Action DoAddEntry(const net::CapturingNetLog::Entry& entry, - RequestInfo* out_info); + virtual Action DoAddEntry(const Entry& entry, RequestInfo* out_info); private: // Searches through |connect_job_tracker_| for information on the // ConnectJob specified in |entry|, and appends it to |live_entry|. - void AddConnectJobInfo(const net::CapturingNetLog::Entry& entry, - RequestInfo* live_entry); + void AddConnectJobInfo(const Entry& entry, RequestInfo* live_entry); ConnectJobTracker* connect_job_tracker_; @@ -112,14 +137,14 @@ class PassiveLogCollector : public ChromeNetLog::Observer { public: InitProxyResolverTracker(); - void OnAddEntry(const net::CapturingNetLog::Entry& entry); + void OnAddEntry(const Entry& entry); - const net::CapturingNetLog::EntryList& entries() const { + const EntryList& entries() const { return entries_; } private: - net::CapturingNetLog::EntryList entries_; + EntryList entries_; DISALLOW_COPY_AND_ASSIGN(InitProxyResolverTracker); }; @@ -148,12 +173,20 @@ class PassiveLogCollector : public ChromeNetLog::Observer { return &init_proxy_resolver_tracker_; } + // Fills |out| with the full list of events that have been passively + // captured. The list is ordered by capture time. + void GetAllCapturedEvents(EntryList* out) const; + private: ConnectJobTracker connect_job_tracker_; RequestTracker url_request_tracker_; RequestTracker socket_stream_tracker_; InitProxyResolverTracker init_proxy_resolver_tracker_; + // The count of how many events have flowed through this log. Used to set the + // "order" field on captured events. + int num_events_seen_; + DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); }; diff --git a/chrome/browser/net/passive_log_collector_unittest.cc b/chrome/browser/net/passive_log_collector_unittest.cc index 9c31ee0..ef3d396 100644 --- a/chrome/browser/net/passive_log_collector_unittest.cc +++ b/chrome/browser/net/passive_log_collector_unittest.cc @@ -16,9 +16,10 @@ typedef PassiveLogCollector::RequestInfoList RequestInfoList; const net::NetLog::SourceType kSourceType = net::NetLog::SOURCE_NONE; -net::CapturingNetLog::Entry MakeStartLogEntryWithURL(int source_id, - const std::string& url) { - return net::CapturingNetLog::Entry( +PassiveLogCollector::Entry MakeStartLogEntryWithURL(int source_id, + const std::string& url) { + return PassiveLogCollector::Entry( + 0, net::NetLog::TYPE_URL_REQUEST_START, base::TimeTicks(), net::NetLog::Source(kSourceType, source_id), @@ -26,13 +27,14 @@ net::CapturingNetLog::Entry MakeStartLogEntryWithURL(int source_id, new net::NetLogStringParameter(url)); } -net::CapturingNetLog::Entry MakeStartLogEntry(int source_id) { +PassiveLogCollector::Entry MakeStartLogEntry(int source_id) { return MakeStartLogEntryWithURL(source_id, StringPrintf("http://req%d", source_id)); } -net::CapturingNetLog::Entry MakeEndLogEntry(int source_id) { - return net::CapturingNetLog::Entry( +PassiveLogCollector::Entry MakeEndLogEntry(int source_id) { + return PassiveLogCollector::Entry( + 0, net::NetLog::TYPE_REQUEST_ALIVE, base::TimeTicks(), net::NetLog::Source(kSourceType, source_id), diff --git a/chrome/browser/net/view_net_internals_job_factory.cc b/chrome/browser/net/view_net_internals_job_factory.cc index aa63fe0..176bf76 100644 --- a/chrome/browser/net/view_net_internals_job_factory.cc +++ b/chrome/browser/net/view_net_internals_job_factory.cc @@ -30,6 +30,10 @@ namespace { const char kViewHttpCacheSubPath[] = "view-cache"; +// TODO(eroman): Delete this file. It should be replaced by +// chrome/browser/dom_ui/net_internals_ui.cc once the porting is +// complete. + PassiveLogCollector* GetPassiveLogCollector(URLRequestContext* context) { // Really this is the same as: // g_browser_process->io_thread()->globals()-> @@ -67,6 +71,25 @@ GURL MakeURL(const std::string& details) { return GURL(std::string(chrome::kNetworkViewInternalsURL) + details); } +// Converts a PassiveLogCollector::EntryList to a CapturingNetLog::EntryList. +// +// They are basically the same thing, except PassiveLogCollector has an extra +// "order" field which we will drop. +net::CapturingNetLog::EntryList ConvertEntryList( + const PassiveLogCollector::EntryList& input) { + net::CapturingNetLog::EntryList result; + for (size_t i = 0; i < input.size(); ++i) { + result.push_back( + net::CapturingNetLog::Entry( + input[i].type, + input[i].time, + input[i].source, + input[i].phase, + input[i].extra_parameters)); + } + return result; +} + // A job subclass that implements a protocol to inspect the internal // state of the network stack. class ViewNetInternalsJob : public URLRequestSimpleJob { @@ -259,8 +282,11 @@ class ProxyServiceLastInitLogSubSection : public SubSection { } virtual void OutputBody(URLRequestContext* context, std::string* out) { - OutputTextInPre(net::NetLogUtil::PrettyPrintAsEventTree( - GetInitProxyResolverTracker(context)->entries(), 0), out); + OutputTextInPre( + net::NetLogUtil::PrettyPrintAsEventTree( + ConvertEntryList(GetInitProxyResolverTracker(context)->entries()), + 0), + out); } }; @@ -480,7 +506,7 @@ void OutputURLAndLoadLog(const PassiveLogCollector::RequestInfo& request, out->append("</nobr>"); OutputTextInPre( net::NetLogUtil::PrettyPrintAsEventTree( - request.entries, + ConvertEntryList(request.entries), request.num_entries_truncated), out); out->append("</li>"); diff --git a/chrome/browser/resources/net_internals/index.html b/chrome/browser/resources/net_internals/index.html index 301eb16..cd77f62 100644 --- a/chrome/browser/resources/net_internals/index.html +++ b/chrome/browser/resources/net_internals/index.html @@ -71,10 +71,12 @@ found in the LICENSE file. <table border=1> <thead> - <th>Hostname</th> - <th>Family</th> - <th>Addresses</th> - <th>Expires</th> + <tr> + <th>Hostname</th> + <th>Family</th> + <th>Addresses</th> + <th>Expires</th> + </tr> </thead> <tbody id=hostResolverCacheTbody> </tbody> diff --git a/chrome/browser/resources/net_internals/main.js b/chrome/browser/resources/net_internals/main.js index 2d1fa2f..f695c3c 100644 --- a/chrome/browser/resources/net_internals/main.js +++ b/chrome/browser/resources/net_internals/main.js @@ -209,6 +209,11 @@ function(hostResolverCache) { hostResolverCache); }; +BrowserBridge.prototype.receivedPassiveLogEntries = function(entries) { + for (var i = 0; i < entries.length; ++i) + this.receivedLogEntry(entries[i]); +}; + //------------------------------------------------------------------------------ /** |