summaryrefslogtreecommitdiffstats
path: root/net/spdy
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-01 15:19:40 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-01 15:19:40 +0000
commitb2fcd0e0c8850eda2135b6fe270af5f453682f23 (patch)
tree2858497a3551d59093a5dfd233bf3550d40a4e8d /net/spdy
parent087a03f6aeded6397081304e191b1ac027b8e134 (diff)
downloadchromium_src-b2fcd0e0c8850eda2135b6fe270af5f453682f23.zip
chromium_src-b2fcd0e0c8850eda2135b6fe270af5f453682f23.tar.gz
chromium_src-b2fcd0e0c8850eda2135b6fe270af5f453682f23.tar.bz2
Update NetLog to be threadsafe.
The ChromeNetLog is now owned by the browser process, and passed to the IOThread on creation. NetLog entries can be added from any thread. Observers must be able to handle having log entries added from any thread. Observers can add/remove themselves on any thread. BUG=63334 TEST=None, yet Review URL: http://codereview.chromium.org/4118004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index e3ce486..7400756 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -3343,33 +3343,36 @@ TEST_P(SpdyNetworkTransactionTest, NetLog) {
// This test is intentionally non-specific about the exact ordering of the
// log; instead we just check to make sure that certain events exist, and that
// they are in the right order.
- EXPECT_LT(0u, log.entries().size());
+ net::CapturingNetLog::EntryList entries;
+ log.GetEntries(&entries);
+
+ EXPECT_LT(0u, entries.size());
int pos = 0;
- pos = net::ExpectLogContainsSomewhere(log.entries(), 0,
+ pos = net::ExpectLogContainsSomewhere(entries, 0,
net::NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST,
net::NetLog::PHASE_BEGIN);
- pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
+ pos = net::ExpectLogContainsSomewhere(entries, pos + 1,
net::NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST,
net::NetLog::PHASE_END);
- pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
+ pos = net::ExpectLogContainsSomewhere(entries, pos + 1,
net::NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS,
net::NetLog::PHASE_BEGIN);
- pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
+ pos = net::ExpectLogContainsSomewhere(entries, pos + 1,
net::NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS,
net::NetLog::PHASE_END);
- pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
+ pos = net::ExpectLogContainsSomewhere(entries, pos + 1,
net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY,
net::NetLog::PHASE_BEGIN);
- pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
+ pos = net::ExpectLogContainsSomewhere(entries, pos + 1,
net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY,
net::NetLog::PHASE_END);
// Check that we logged all the headers correctly
pos = net::ExpectLogContainsSomewhere(
- log.entries(), 0,
+ entries, 0,
net::NetLog::TYPE_SPDY_SESSION_SYN_STREAM,
net::NetLog::PHASE_NONE);
- CapturingNetLog::Entry entry = log.entries()[pos];
+ CapturingNetLog::Entry entry = entries[pos];
NetLogSpdySynParameter* request_params =
static_cast<NetLogSpdySynParameter*>(entry.extra_parameters.get());
spdy::SpdyHeaderBlock* headers =