summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/net/connection_tester.cc1
-rw-r--r--chrome/browser/net/passive_log_collector.cc26
-rw-r--r--chrome/browser/net/passive_log_collector.h17
-rw-r--r--chrome/browser/resources/net_internals/logviewpainter.js75
-rw-r--r--chrome/browser/resources/net_internals/main.css4
-rw-r--r--chrome/browser/resources/net_internals/sourceentry.js3
6 files changed, 38 insertions, 88 deletions
diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc
index f23d619..18960eb 100644
--- a/chrome/browser/net/connection_tester.cc
+++ b/chrome/browser/net/connection_tester.cc
@@ -71,7 +71,6 @@ class ExperimentURLRequestContext : public URLRequestContext {
dnsrr_resolver_, NULL /* dns_cert_checker */,
NULL /* ssl_host_info_factory */, proxy_service_,
ssl_config_service_, http_auth_handler_factory_, NULL, NULL),
- NULL /* net_log */,
net::HttpCache::DefaultBackend::InMemory(0));
// In-memory cookie store.
cookie_store_ = new net::CookieMonster(NULL, NULL);
diff --git a/chrome/browser/net/passive_log_collector.cc b/chrome/browser/net/passive_log_collector.cc
index 21e2935..0d41479 100644
--- a/chrome/browser/net/passive_log_collector.cc
+++ b/chrome/browser/net/passive_log_collector.cc
@@ -70,7 +70,6 @@ PassiveLogCollector::PassiveLogCollector()
trackers_[net::NetLog::SOURCE_HOST_RESOLVER_IMPL_REQUEST] =
&dns_request_tracker_;
trackers_[net::NetLog::SOURCE_HOST_RESOLVER_IMPL_JOB] = &dns_job_tracker_;
- trackers_[net::NetLog::SOURCE_DISK_CACHE_ENTRY] = &disk_cache_entry_tracker_;
// Make sure our mapping is up-to-date.
for (size_t i = 0; i < arraysize(trackers_); ++i)
DCHECK(trackers_[i]) << "Unhandled SourceType: " << i;
@@ -561,28 +560,3 @@ PassiveLogCollector::DNSJobTracker::DoAddEntry(const ChromeNetLog::Entry& entry,
return ACTION_NONE;
}
}
-
-//----------------------------------------------------------------------------
-// DiskCacheEntryTracker
-//----------------------------------------------------------------------------
-
-const size_t PassiveLogCollector::DiskCacheEntryTracker::kMaxNumSources = 100;
-const size_t PassiveLogCollector::DiskCacheEntryTracker::kMaxGraveyardSize = 25;
-
-PassiveLogCollector::DiskCacheEntryTracker::DiskCacheEntryTracker()
- : SourceTracker(kMaxNumSources, kMaxGraveyardSize, NULL) {
-}
-
-PassiveLogCollector::SourceTracker::Action
-PassiveLogCollector::DiskCacheEntryTracker::DoAddEntry(
- const ChromeNetLog::Entry& entry, SourceInfo* out_info) {
- AddEntryToSourceInfo(entry, out_info);
-
- // If the request has ended, move it to the graveyard.
- if (entry.type == net::NetLog::TYPE_DISK_CACHE_ENTRY &&
- entry.phase == net::NetLog::PHASE_END) {
- return ACTION_MOVE_TO_GRAVEYARD;
- }
-
- return ACTION_NONE;
-}
diff --git a/chrome/browser/net/passive_log_collector.h b/chrome/browser/net/passive_log_collector.h
index a415d59..114e439 100644
--- a/chrome/browser/net/passive_log_collector.h
+++ b/chrome/browser/net/passive_log_collector.h
@@ -304,22 +304,6 @@ class PassiveLogCollector : public ChromeNetLog::ThreadSafeObserver {
DISALLOW_COPY_AND_ASSIGN(DNSJobTracker);
};
- // Tracks the log entries for the last seen SOURCE_DISK_CACHE_ENTRY.
- class DiskCacheEntryTracker : public SourceTracker {
- public:
- static const size_t kMaxNumSources;
- static const size_t kMaxGraveyardSize;
-
- DiskCacheEntryTracker();
-
- protected:
- virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
- SourceInfo* out_info);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DiskCacheEntryTracker);
- };
-
PassiveLogCollector();
~PassiveLogCollector();
@@ -356,7 +340,6 @@ class PassiveLogCollector : public ChromeNetLog::ThreadSafeObserver {
SpdySessionTracker spdy_session_tracker_;
DNSRequestTracker dns_request_tracker_;
DNSJobTracker dns_job_tracker_;
- DiskCacheEntryTracker disk_cache_entry_tracker_;
// This array maps each NetLog::SourceType to one of the tracker instances
// defined above. Use of this array avoid duplicating the list of trackers
diff --git a/chrome/browser/resources/net_internals/logviewpainter.js b/chrome/browser/resources/net_internals/logviewpainter.js
index 28df383..82686c6 100644
--- a/chrome/browser/resources/net_internals/logviewpainter.js
+++ b/chrome/browser/resources/net_internals/logviewpainter.js
@@ -49,9 +49,10 @@ function addSourceEntry_(node, sourceEntry) {
function canCollapseBeginWithEnd(beginEntry) {
return beginEntry &&
beginEntry.isBegin() &&
+ !beginEntry.orig.params &&
beginEntry.end &&
beginEntry.end.index == beginEntry.index + 1 &&
- (!beginEntry.orig.params || !beginEntry.end.orig.params) &&
+ !beginEntry.end.orig.params &&
beginEntry.orig.wasPassivelyCaptured ==
beginEntry.end.orig.wasPassivelyCaptured;
}
@@ -69,43 +70,43 @@ PrintSourceEntriesAsText = function(sourceEntries, doSecurityStripping) {
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
- // Avoid printing the END for a BEGIN that was immediately before, unless
- // both have extra parameters.
- if (!entry.isEnd() || !canCollapseBeginWithEnd(entry.begin)) {
- tablePrinter.addRow();
-
- // Annotate this entry with "(P)" if it was passively captured.
- tablePrinter.addCell(entry.orig.wasPassivelyCaptured ? '(P) ' : '');
-
- tablePrinter.addCell('t=');
- var date = g_browser.convertTimeTicksToDate(entry.orig.time) ;
- var tCell = tablePrinter.addCell(date.getTime());
- tCell.alignRight = true;
- tablePrinter.addCell(' [st=');
- var stCell = tablePrinter.addCell(date.getTime() - startTime);
- stCell.alignRight = true;
- tablePrinter.addCell('] ');
-
- var indentationStr = makeRepeatedString(' ', entry.getDepth() * 3);
- var mainCell =
- tablePrinter.addCell(indentationStr + getTextForEvent(entry));
- tablePrinter.addCell(' ');
-
- // Get the elapsed time.
- if (entry.isBegin()) {
- tablePrinter.addCell('[dt=');
- var dt = '?';
- // Definite time.
- if (entry.end) {
- dt = entry.end.orig.time - entry.orig.time;
- }
- var dtCell = tablePrinter.addCell(dt);
- dtCell.alignRight = true;
-
- tablePrinter.addCell(']');
- } else {
- mainCell.allowOverflow = true;
+ // Avoid printing the END for a BEGIN that was immediately before.
+ if (entry.isEnd() && canCollapseBeginWithEnd(entry.begin))
+ continue;
+
+ tablePrinter.addRow();
+
+ // Annotate this entry with "(P)" if it was passively captured.
+ tablePrinter.addCell(entry.orig.wasPassivelyCaptured ? '(P) ' : '');
+
+ tablePrinter.addCell('t=');
+ var date = g_browser.convertTimeTicksToDate(entry.orig.time) ;
+ var tCell = tablePrinter.addCell(date.getTime());
+ tCell.alignRight = true;
+ tablePrinter.addCell(' [st=');
+ var stCell = tablePrinter.addCell(date.getTime() - startTime);
+ stCell.alignRight = true;
+ tablePrinter.addCell('] ');
+
+ var indentationStr = makeRepeatedString(' ', entry.getDepth() * 3);
+ var mainCell =
+ tablePrinter.addCell(indentationStr + getTextForEvent(entry));
+ tablePrinter.addCell(' ');
+
+ // Get the elapsed time.
+ if (entry.isBegin()) {
+ tablePrinter.addCell('[dt=');
+ var dt = '?';
+ // Definite time.
+ if (entry.end) {
+ dt = entry.end.orig.time - entry.orig.time;
}
+ var dtCell = tablePrinter.addCell(dt);
+ dtCell.alignRight = true;
+
+ tablePrinter.addCell(']');
+ } else {
+ mainCell.allowOverflow = true;
}
// Output the extra parameters.
diff --git a/chrome/browser/resources/net_internals/main.css b/chrome/browser/resources/net_internals/main.css
index 8c6982c..be3abee 100644
--- a/chrome/browser/resources/net_internals/main.css
+++ b/chrome/browser/resources/net_internals/main.css
@@ -92,10 +92,6 @@ body {
color: #308080;
}
-#eventsListTableBody .source_DISK_CACHE_ENTRY {
- color: gray;
-}
-
#eventsListTableBody .source_SOCKET {
color: purple;
}
diff --git a/chrome/browser/resources/net_internals/sourceentry.js b/chrome/browser/resources/net_internals/sourceentry.js
index 6c02c03..4a4df6e 100644
--- a/chrome/browser/resources/net_internals/sourceentry.js
+++ b/chrome/browser/resources/net_internals/sourceentry.js
@@ -232,9 +232,6 @@ SourceEntry.prototype.getDescription = function() {
case LogSourceType.HOST_RESOLVER_IMPL_JOB:
description = e.params.host;
break;
- case LogSourceType.DISK_CACHE_ENTRY:
- description = e.params.key;
- break;
case LogSourceType.SPDY_SESSION:
if (e.params.host)
description = e.params.host + ' (' + e.params.proxy + ')';