net: rename BoundNetLog to NetLogWithSource
Patch generated by the following command line:
$ g grep -l BoundNetLog | xargs perl -pi -e 's/BoundNetLog/NetLogWithSource/g'
BUG=475260
TEST=net_unittests
[email protected]
TBR=dtrainor,thestig,oshima,sdefresne,avi,rockot,rogerta,sergeyu
Review-Url: https://codereview.chromium.org/2351513002
Cr-Commit-Position: refs/heads/master@{#420320}
diff --git a/net/base/chunked_upload_data_stream.cc b/net/base/chunked_upload_data_stream.cc
index e835934..4670a0c 100644
--- a/net/base/chunked_upload_data_stream.cc
+++ b/net/base/chunked_upload_data_stream.cc
@@ -64,7 +64,7 @@
OnReadCompleted(result);
}
-int ChunkedUploadDataStream::InitInternal(const BoundNetLog& net_log) {
+int ChunkedUploadDataStream::InitInternal(const NetLogWithSource& net_log) {
// ResetInternal should already have been called.
DCHECK(!read_buffer_.get());
DCHECK_EQ(0u, read_index_);
diff --git a/net/base/chunked_upload_data_stream.h b/net/base/chunked_upload_data_stream.h
index 4c23d10..5efd6714 100644
--- a/net/base/chunked_upload_data_stream.h
+++ b/net/base/chunked_upload_data_stream.h
@@ -79,7 +79,7 @@
private:
// UploadDataStream implementation.
- int InitInternal(const BoundNetLog& net_log) override;
+ int InitInternal(const NetLogWithSource& net_log) override;
int ReadInternal(IOBuffer* buf, int buf_len) override;
void ResetInternal() override;
diff --git a/net/base/chunked_upload_data_stream_unittest.cc b/net/base/chunked_upload_data_stream_unittest.cc
index 67a35c3..ccf8eb1c 100644
--- a/net/base/chunked_upload_data_stream_unittest.cc
+++ b/net/base/chunked_upload_data_stream_unittest.cc
@@ -43,8 +43,9 @@
TEST(ChunkedUploadDataStreamTest, AppendOnce) {
ChunkedUploadDataStream stream(0);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -67,8 +68,9 @@
TEST(ChunkedUploadDataStreamTest, AppendOnceBeforeRead) {
ChunkedUploadDataStream stream(0);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -90,8 +92,9 @@
ChunkedUploadDataStream stream(0);
stream.AppendData(kTestData, kTestDataSize, true);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -107,8 +110,9 @@
TEST(ChunkedUploadDataStreamTest, MultipleAppends) {
ChunkedUploadDataStream stream(0);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size());
EXPECT_EQ(0u, stream.position());
@@ -137,8 +141,9 @@
TEST(ChunkedUploadDataStreamTest, MultipleAppendsBetweenReads) {
ChunkedUploadDataStream stream(0);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -167,8 +172,9 @@
stream.AppendData(kTestData + 1, 1, false);
stream.AppendData(kTestData + 2, kTestDataSize - 2, true);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -190,8 +196,9 @@
stream.AppendData(kTestData, kTestDataSize, false);
stream.AppendData(kTestData, kTestDataSize, true);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -221,8 +228,9 @@
TEST(ChunkedUploadDataStreamTest, EmptyUpload) {
ChunkedUploadDataStream stream(0);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -244,8 +252,9 @@
ChunkedUploadDataStream stream(0);
stream.AppendData(NULL, 0, true);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -262,8 +271,9 @@
stream.AppendData(kTestData, 1, false);
stream.AppendData(kTestData + 1, kTestDataSize - 1, true);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -275,8 +285,9 @@
ASSERT_TRUE(stream.IsEOF());
// Rewind stream and repeat.
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -291,8 +302,9 @@
TEST(ChunkedUploadDataStreamTest, RewindWhileReading) {
ChunkedUploadDataStream stream(0);
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -303,8 +315,9 @@
int result = stream.Read(buf.get(), kTestBufferSize, callback.callback());
ASSERT_THAT(result, IsError(ERR_IO_PENDING));
- ASSERT_THAT(stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream.Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(stream.IsInMemory());
EXPECT_EQ(0u, stream.size()); // Content-Length is 0 for chunked data.
EXPECT_EQ(0u, stream.position());
@@ -332,8 +345,9 @@
// Write before Init.
ASSERT_TRUE(writer->AppendData(kTestData, 1, false));
- ASSERT_THAT(stream->Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ stream->Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
// Write after Init.
ASSERT_TRUE(writer->AppendData(kTestData + 1, kTestDataSize - 1, false));
diff --git a/net/base/elements_upload_data_stream.cc b/net/base/elements_upload_data_stream.cc
index bd6d39f..78d5637 100644
--- a/net/base/elements_upload_data_stream.cc
+++ b/net/base/elements_upload_data_stream.cc
@@ -35,7 +35,7 @@
new ElementsUploadDataStream(std::move(readers), identifier));
}
-int ElementsUploadDataStream::InitInternal(const BoundNetLog& net_log) {
+int ElementsUploadDataStream::InitInternal(const NetLogWithSource& net_log) {
return InitElements(0);
}
diff --git a/net/base/elements_upload_data_stream.h b/net/base/elements_upload_data_stream.h
index e787852d..4ad4048 100644
--- a/net/base/elements_upload_data_stream.h
+++ b/net/base/elements_upload_data_stream.h
@@ -43,7 +43,7 @@
bool IsInMemory() const override;
const std::vector<std::unique_ptr<UploadElementReader>>* GetElementReaders()
const override;
- int InitInternal(const net::BoundNetLog& net_log) override;
+ int InitInternal(const NetLogWithSource& net_log) override;
int ReadInternal(IOBuffer* buf, int buf_len) override;
void ResetInternal() override;
diff --git a/net/base/elements_upload_data_stream_unittest.cc b/net/base/elements_upload_data_stream_unittest.cc
index 9d4f42a4..3ed3f397 100644
--- a/net/base/elements_upload_data_stream_unittest.cc
+++ b/net/base/elements_upload_data_stream_unittest.cc
@@ -154,7 +154,7 @@
TEST_F(ElementsUploadDataStreamTest, EmptyUploadData) {
std::unique_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
- ASSERT_THAT(stream->Init(CompletionCallback(), BoundNetLog()), IsOk());
+ ASSERT_THAT(stream->Init(CompletionCallback(), NetLogWithSource()), IsOk());
EXPECT_TRUE(stream->IsInMemory());
EXPECT_EQ(0U, stream->size());
EXPECT_EQ(0U, stream->position());
@@ -166,7 +166,7 @@
base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
std::unique_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
- ASSERT_THAT(stream->Init(CompletionCallback(), BoundNetLog()), IsOk());
+ ASSERT_THAT(stream->Init(CompletionCallback(), NetLogWithSource()), IsOk());
EXPECT_TRUE(stream->IsInMemory());
EXPECT_EQ(kTestDataSize, stream->size());
EXPECT_EQ(0U, stream->position());
@@ -195,7 +195,7 @@
TestCompletionCallback init_callback;
std::unique_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
- ASSERT_THAT(stream->Init(init_callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
ASSERT_THAT(init_callback.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsInMemory());
@@ -232,7 +232,7 @@
TestCompletionCallback init_callback;
std::unique_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
- ASSERT_THAT(stream->Init(init_callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
ASSERT_THAT(init_callback.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsInMemory());
@@ -274,7 +274,7 @@
new ElementsUploadDataStream(std::move(element_readers_), 0));
// Run Init().
- ASSERT_THAT(stream->Init(CompletionCallback(), BoundNetLog()), IsOk());
+ ASSERT_THAT(stream->Init(CompletionCallback(), NetLogWithSource()), IsOk());
EXPECT_EQ(kTestDataSize*2, stream->size());
EXPECT_EQ(0U, stream->position());
EXPECT_FALSE(stream->IsEOF());
@@ -310,7 +310,7 @@
// Run Init().
TestCompletionCallback init_callback;
- ASSERT_THAT(stream->Init(init_callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(init_callback.WaitForResult(), IsOk());
EXPECT_EQ(kTestDataSize*2, stream->size());
@@ -353,7 +353,7 @@
TestCompletionCallback init_callback;
std::unique_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
- ASSERT_THAT(stream->Init(init_callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
ASSERT_THAT(init_callback.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsInMemory());
@@ -406,7 +406,7 @@
// Run Init().
TestCompletionCallback callback;
- ASSERT_THAT(stream->Init(callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
}
@@ -424,7 +424,7 @@
// Run Init().
TestCompletionCallback callback;
- ASSERT_THAT(stream->Init(callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_FAILED));
}
@@ -447,7 +447,7 @@
// Run Init().
TestCompletionCallback callback;
- ASSERT_THAT(stream->Init(callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_FAILED));
}
@@ -459,7 +459,7 @@
std::unique_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
- ASSERT_THAT(stream->Init(CompletionCallback(), BoundNetLog()), IsOk());
+ ASSERT_THAT(stream->Init(CompletionCallback(), NetLogWithSource()), IsOk());
EXPECT_TRUE(stream->IsInMemory());
EXPECT_EQ(kTestDataSize, stream->size());
EXPECT_EQ(0U, stream->position());
@@ -503,7 +503,7 @@
// Run Init().
TestCompletionCallback init_callback;
- EXPECT_THAT(stream->Init(init_callback.callback(), BoundNetLog()),
+ EXPECT_THAT(stream->Init(init_callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(init_callback.WaitForResult(), IsOk());
@@ -544,7 +544,7 @@
TestCompletionCallback init_callback;
std::unique_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers), 0));
- ASSERT_THAT(stream->Init(init_callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
int error_code = init_callback.WaitForResult();
if (error_expected)
@@ -593,7 +593,7 @@
// Call Init().
TestCompletionCallback init_callback1;
- ASSERT_THAT(stream->Init(init_callback1.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback1.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
ASSERT_THAT(init_callback1.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
@@ -605,7 +605,7 @@
// Call Init() again to reset.
TestCompletionCallback init_callback2;
- ASSERT_THAT(stream->Init(init_callback2.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback2.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
ASSERT_THAT(init_callback2.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
@@ -637,7 +637,7 @@
expected_data += expected_data;
// Call Init().
- ASSERT_THAT(stream->Init(test_callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(test_callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(test_callback.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
@@ -648,7 +648,7 @@
EXPECT_TRUE(stream->IsEOF());
// Call Init() again to reset.
- ASSERT_THAT(stream->Init(test_callback.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(test_callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(test_callback.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
@@ -681,7 +681,7 @@
// Call Init().
TestCompletionCallback init_callback1;
- ASSERT_THAT(stream->Init(init_callback1.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback1.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(init_callback1.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
@@ -700,7 +700,7 @@
// Call Init to reset the state.
TestCompletionCallback init_callback2;
- ASSERT_THAT(stream->Init(init_callback2.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback2.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(init_callback2.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
@@ -739,12 +739,12 @@
// Start Init.
TestCompletionCallback init_callback1;
- EXPECT_THAT(stream->Init(init_callback1.callback(), BoundNetLog()),
+ EXPECT_THAT(stream->Init(init_callback1.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
// Call Init again to cancel the previous init.
TestCompletionCallback init_callback2;
- EXPECT_THAT(stream->Init(init_callback2.callback(), BoundNetLog()),
+ EXPECT_THAT(stream->Init(init_callback2.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(init_callback2.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
@@ -787,7 +787,7 @@
// Call Init().
TestCompletionCallback init_callback1;
- ASSERT_THAT(stream->Init(init_callback1.callback(), BoundNetLog()),
+ ASSERT_THAT(stream->Init(init_callback1.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(init_callback1.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
@@ -804,7 +804,7 @@
// Call Init to cancel the previous read.
TestCompletionCallback init_callback2;
- EXPECT_THAT(stream->Init(init_callback2.callback(), BoundNetLog()),
+ EXPECT_THAT(stream->Init(init_callback2.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
EXPECT_THAT(init_callback2.WaitForResult(), IsOk());
EXPECT_FALSE(stream->IsEOF());
diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc
index 9e40f10..8b5a989 100644
--- a/net/base/upload_data_stream.cc
+++ b/net/base/upload_data_stream.cc
@@ -52,7 +52,7 @@
}
int UploadDataStream::Init(const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
Reset();
DCHECK(!initialized_successfully_);
DCHECK(callback_.is_null());
diff --git a/net/base/upload_data_stream.h b/net/base/upload_data_stream.h
index 437dbc5..19f2a84b 100644
--- a/net/base/upload_data_stream.h
+++ b/net/base/upload_data_stream.h
@@ -45,7 +45,7 @@
// Returns OK on success. Returns ERR_UPLOAD_FILE_CHANGED if the expected
// file modification time is set (usually not set, but set for sliced
// files) and the target file is changed.
- int Init(const CompletionCallback& callback, const BoundNetLog& net_log);
+ int Init(const CompletionCallback& callback, const NetLogWithSource& net_log);
// When possible, reads up to |buf_len| bytes synchronously from the upload
// data stream to |buf| and returns the number of bytes read; otherwise,
@@ -114,7 +114,7 @@
// See Init(). If it returns ERR_IO_PENDING, OnInitCompleted must be called
// once it completes. If the upload is not chunked, SetSize must be called
// before it completes.
- virtual int InitInternal(const BoundNetLog& net_log) = 0;
+ virtual int InitInternal(const NetLogWithSource& net_log) = 0;
// See Read(). For chunked uploads, must call SetIsFinalChunk if this is the
// final chunk. For non-chunked uploads, the UploadDataStream determins which
@@ -142,7 +142,7 @@
CompletionCallback callback_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(UploadDataStream);
};
diff --git a/net/cert/caching_cert_verifier.cc b/net/cert/caching_cert_verifier.cc
index 1b05385..43515f8d 100644
--- a/net/cert/caching_cert_verifier.cc
+++ b/net/cert/caching_cert_verifier.cc
@@ -36,7 +36,7 @@
CertVerifyResult* verify_result,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
out_req->reset();
requests_++;
diff --git a/net/cert/caching_cert_verifier.h b/net/cert/caching_cert_verifier.h
index 54ba118c..e10d6db0 100644
--- a/net/cert/caching_cert_verifier.h
+++ b/net/cert/caching_cert_verifier.h
@@ -62,7 +62,7 @@
CertVerifyResult* verify_result,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
bool SupportsOCSPStapling() override;
// Opportunistically attempts to add |error| and |verify_result| as the
diff --git a/net/cert/caching_cert_verifier_unittest.cc b/net/cert/caching_cert_verifier_unittest.cc
index fcf6b4f..704be6f 100644
--- a/net/cert/caching_cert_verifier_unittest.cc
+++ b/net/cert/caching_cert_verifier_unittest.cc
@@ -72,7 +72,8 @@
error = callback.GetResult(verifier_.Verify(
CertVerifier::RequestParams(test_cert, "www.example.com", 0,
std::string(), CertificateList()),
- nullptr, &verify_result, callback.callback(), &request, BoundNetLog()));
+ nullptr, &verify_result, callback.callback(), &request,
+ NetLogWithSource()));
ASSERT_TRUE(IsCertificateError(error));
ASSERT_EQ(1u, verifier_.requests());
ASSERT_EQ(0u, verifier_.cache_hits());
@@ -81,7 +82,8 @@
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, "www.example.com", 0,
std::string(), CertificateList()),
- nullptr, &verify_result, callback.callback(), &request, BoundNetLog());
+ nullptr, &verify_result, callback.callback(), &request,
+ NetLogWithSource());
// Synchronous completion.
ASSERT_NE(ERR_IO_PENDING, error);
ASSERT_TRUE(IsCertificateError(error));
@@ -104,9 +106,9 @@
CertVerifier::RequestParams params1(test_cert, "www.example.com", 0,
std::string(), CertificateList());
CertVerifyResult result1;
- int error1 = callback.GetResult(verifier_.Verify(params1, nullptr, &result1,
- callback.callback(),
- &request, BoundNetLog()));
+ int error1 = callback.GetResult(
+ verifier_.Verify(params1, nullptr, &result1, callback.callback(),
+ &request, NetLogWithSource()));
ASSERT_TRUE(IsCertificateError(error1));
ASSERT_EQ(1u, verifier_.requests());
ASSERT_EQ(0u, verifier_.cache_hits());
@@ -115,9 +117,9 @@
CertVerifier::RequestParams params2(test_cert, "www.example.net", 0,
std::string(), CertificateList());
CertVerifyResult result2;
- int error2 = callback.GetResult(verifier_.Verify(params2, nullptr, &result2,
- callback.callback(),
- &request, BoundNetLog()));
+ int error2 = callback.GetResult(
+ verifier_.Verify(params2, nullptr, &result2, callback.callback(),
+ &request, NetLogWithSource()));
ASSERT_TRUE(IsCertificateError(error2));
ASSERT_EQ(2u, verifier_.requests());
ASSERT_EQ(0u, verifier_.cache_hits());
@@ -126,9 +128,9 @@
CertVerifier::RequestParams params3(test_cert, "www.example.org", 0,
std::string(), CertificateList());
CertVerifyResult result3;
- int error3 = callback.GetResult(verifier_.Verify(params3, nullptr, &result3,
- callback.callback(),
- &request, BoundNetLog()));
+ int error3 = callback.GetResult(
+ verifier_.Verify(params3, nullptr, &result3, callback.callback(),
+ &request, NetLogWithSource()));
ASSERT_TRUE(IsCertificateError(error3));
ASSERT_EQ(3u, verifier_.requests());
ASSERT_EQ(0u, verifier_.cache_hits());
@@ -191,7 +193,7 @@
CertVerifyResult cached_result;
int error = callback.GetResult(
verifier_.Verify(params, nullptr, &cached_result, callback.callback(),
- &request, BoundNetLog()));
+ &request, NetLogWithSource()));
ASSERT_THAT(error, IsError(ERR_CERT_WEAK_KEY));
EXPECT_TRUE(cached_result.has_md2);
EXPECT_FALSE(cached_result.is_issued_by_known_root);
@@ -207,7 +209,7 @@
error = callback.GetResult(verifier_.Verify(params, nullptr, &cached_result,
callback.callback(), &request,
- BoundNetLog()));
+ NetLogWithSource()));
ASSERT_THAT(error, IsError(ERR_CERT_WEAK_KEY));
EXPECT_TRUE(cached_result.has_md2);
EXPECT_FALSE(cached_result.is_issued_by_known_root);
@@ -257,7 +259,8 @@
error = callback.GetResult(verifier_.Verify(
CertVerifier::RequestParams(cert_chain1, "www.example.com", 0,
std::string(), CertificateList()),
- nullptr, &verify_result, callback.callback(), &request, BoundNetLog()));
+ nullptr, &verify_result, callback.callback(), &request,
+ NetLogWithSource()));
ASSERT_TRUE(IsCertificateError(error));
ASSERT_EQ(1u, verifier_.requests());
ASSERT_EQ(0u, verifier_.cache_hits());
@@ -266,7 +269,8 @@
error = callback.GetResult(verifier_.Verify(
CertVerifier::RequestParams(cert_chain2, "www.example.com", 0,
std::string(), CertificateList()),
- nullptr, &verify_result, callback.callback(), &request, BoundNetLog()));
+ nullptr, &verify_result, callback.callback(), &request,
+ NetLogWithSource()));
ASSERT_TRUE(IsCertificateError(error));
ASSERT_EQ(2u, verifier_.requests());
ASSERT_EQ(0u, verifier_.cache_hits());
diff --git a/net/cert/cert_verifier.h b/net/cert/cert_verifier.h
index f60efddc..ae96937 100644
--- a/net/cert/cert_verifier.h
+++ b/net/cert/cert_verifier.h
@@ -18,7 +18,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class CertVerifyResult;
class CRLSet;
@@ -167,7 +167,7 @@
CertVerifyResult* verify_result,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Returns true if this CertVerifier supports stapled OCSP responses.
virtual bool SupportsOCSPStapling();
diff --git a/net/cert/ct_policy_enforcer.cc b/net/cert/ct_policy_enforcer.cc
index cfc662fa..7d9fb97 100644
--- a/net/cert/ct_policy_enforcer.cc
+++ b/net/cert/ct_policy_enforcer.cc
@@ -381,7 +381,7 @@
void CheckCTEVPolicyCompliance(X509Certificate* cert,
const ct::EVCertsWhitelist* ev_whitelist,
const ct::SCTList& verified_scts,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
EVComplianceDetails* result) {
result->status = CertPolicyComplianceToEVPolicyCompliance(
CheckCertPolicyCompliance(*cert, verified_scts));
@@ -399,7 +399,7 @@
ct::CertPolicyCompliance CTPolicyEnforcer::DoesConformToCertPolicy(
X509Certificate* cert,
const ct::SCTList& verified_scts,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
// If the build is not timely, no certificate is considered compliant
// with CT policy. The reasoning is that, for example, a log might
// have been pulled and is no longer considered valid; thus, a client
@@ -427,7 +427,7 @@
X509Certificate* cert,
const ct::EVCertsWhitelist* ev_whitelist,
const ct::SCTList& verified_scts,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
EVComplianceDetails details;
// If the build is not timely, no certificate is considered compliant
// with EV policy. The reasoning is that, for example, a log might
diff --git a/net/cert/ct_policy_enforcer.h b/net/cert/ct_policy_enforcer.h
index c49e09101..d4baa75a 100644
--- a/net/cert/ct_policy_enforcer.h
+++ b/net/cert/ct_policy_enforcer.h
@@ -85,7 +85,7 @@
virtual ct::CertPolicyCompliance DoesConformToCertPolicy(
X509Certificate* cert,
const SCTList& verified_scts,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Returns the CT/EV policy compliance status for a given certificate
// and collection of SCTs.
@@ -99,7 +99,7 @@
X509Certificate* cert,
const ct::EVCertsWhitelist* ev_whitelist,
const SCTList& verified_scts,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
};
} // namespace net
diff --git a/net/cert/ct_policy_enforcer_unittest.cc b/net/cert/ct_policy_enforcer_unittest.cc
index e86ff256..b9bd7ee 100644
--- a/net/cert/ct_policy_enforcer_unittest.cc
+++ b/net/cert/ct_policy_enforcer_unittest.cc
@@ -147,10 +147,10 @@
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_DIVERSE_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_DIVERSE_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest,
@@ -164,10 +164,10 @@
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_DIVERSE_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_DIVERSE_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, ConformsToCTEVPolicyIfSCTBeforeEnforcementDate) {
@@ -179,10 +179,10 @@
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, ConformsToCTEVPolicyWithNonEmbeddedSCTs) {
@@ -192,10 +192,10 @@
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, ConformsToCTEVPolicyWithEmbeddedSCTs) {
@@ -206,10 +206,10 @@
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, ConformsToCTEVPolicyWithPooledNonEmbeddedSCTs) {
@@ -232,10 +232,10 @@
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, ConformsToCTEVPolicyWithPooledEmbeddedSCTs) {
@@ -257,10 +257,10 @@
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, DoesNotConformToCTEVPolicyNotEnoughSCTs) {
@@ -273,18 +273,18 @@
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
- EXPECT_EQ(
- ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(
- chain_.get(), non_including_whitelist.get(), scts, BoundNetLog()));
+ NetLogWithSource()));
+ EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS,
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), non_including_whitelist.get(), scts,
+ NetLogWithSource()));
// ... but should be OK if whitelisted.
scoped_refptr<ct::EVCertsWhitelist> whitelist(
new DummyEVCertsWhitelist(true, true));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_WHITELIST,
policy_enforcer_->DoesConformToCTEVPolicy(
- chain_.get(), whitelist.get(), scts, BoundNetLog()));
+ chain_.get(), whitelist.get(), scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, DoesNotConformToCTEVPolicyNotEnoughFreshSCTs) {
@@ -301,10 +301,10 @@
false, &scts);
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_DIVERSE_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_DIVERSE_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
// SCT from after disqualification.
scts.clear();
@@ -314,10 +314,10 @@
true, &scts);
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_DIVERSE_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_DIVERSE_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
// Embedded SCT from before disqualification.
scts.clear();
@@ -327,10 +327,10 @@
&scts);
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_DIVERSE_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_DIVERSE_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
// Embedded SCT from after disqualification.
scts.clear();
@@ -340,10 +340,10 @@
&scts);
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_DIVERSE_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_DIVERSE_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest,
@@ -357,10 +357,10 @@
// |chain_| is valid for 10 years - over 121 months - so requires 5 SCTs.
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest,
@@ -374,10 +374,10 @@
// |chain_| is valid for 10 years - over 121 months - so requires 5 SCTs.
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest,
@@ -394,10 +394,10 @@
// |chain_| is valid for 10 years - over 121 months - so requires 5 SCTs.
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest,
@@ -429,10 +429,10 @@
// However, there are only 4 SCTs are from distinct logs.
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest,
@@ -496,12 +496,12 @@
std::vector<std::string>(), false, &scts);
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS,
policy_enforcer_->DoesConformToCertPolicy(cert.get(), scts,
- BoundNetLog()))
+ NetLogWithSource()))
<< " for: " << (end - start).InDays() << " and " << required_scts
<< " scts=" << scts.size() << " i=" << i;
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(cert.get(), nullptr,
- scts, BoundNetLog()))
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ cert.get(), nullptr, scts, NetLogWithSource()))
<< " for: " << (end - start).InDays() << " and " << required_scts
<< " scts=" << scts.size() << " i=" << i;
}
@@ -511,12 +511,12 @@
&scts);
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS,
policy_enforcer_->DoesConformToCertPolicy(cert.get(), scts,
- BoundNetLog()))
+ NetLogWithSource()))
<< " for: " << (end - start).InDays() << " and " << required_scts
<< " scts=" << scts.size();
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(cert.get(), nullptr,
- scts, BoundNetLog()))
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ cert.get(), nullptr, scts, NetLogWithSource()))
<< " for: " << (end - start).InDays() << " and " << required_scts
<< " scts=" << scts.size();
}
@@ -531,10 +531,10 @@
&scts);
EXPECT_EQ(ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS,
policy_enforcer_->DoesConformToCertPolicy(chain_.get(), scts,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_WHITELIST,
policy_enforcer_->DoesConformToCTEVPolicy(
- chain_.get(), whitelist.get(), scts, BoundNetLog()));
+ chain_.get(), whitelist.get(), scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, IgnoresInvalidEVWhitelist) {
@@ -546,7 +546,7 @@
&scts);
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS,
policy_enforcer_->DoesConformToCTEVPolicy(
- chain_.get(), whitelist.get(), scts, BoundNetLog()));
+ chain_.get(), whitelist.get(), scts, NetLogWithSource()));
}
TEST_F(CTPolicyEnforcerTest, IgnoresNullEVWhitelist) {
@@ -554,8 +554,8 @@
FillListWithSCTsOfOrigin(ct::SignedCertificateTimestamp::SCT_EMBEDDED, 2,
&scts);
EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS,
- policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr,
- scts, BoundNetLog()));
+ policy_enforcer_->DoesConformToCTEVPolicy(
+ chain_.get(), nullptr, scts, NetLogWithSource()));
}
} // namespace
diff --git a/net/cert/ct_verifier.h b/net/cert/ct_verifier.h
index cdc81c91..7a54dea5 100644
--- a/net/cert/ct_verifier.h
+++ b/net/cert/ct_verifier.h
@@ -16,7 +16,7 @@
struct SignedCertificateTimestamp;
} // namespace ct
-class BoundNetLog;
+class NetLogWithSource;
class CTLogVerifier;
class X509Certificate;
@@ -55,7 +55,7 @@
const std::string& stapled_ocsp_response,
const std::string& sct_list_from_tls_extension,
ct::CTVerifyResult* result,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Registers |observer| to receive notifications of validated SCTs. Does not
// take ownership of the observer as the observer may be performing
diff --git a/net/cert/mock_cert_verifier.cc b/net/cert/mock_cert_verifier.cc
index f184e55e..9cbbafd 100644
--- a/net/cert/mock_cert_verifier.cc
+++ b/net/cert/mock_cert_verifier.cc
@@ -45,7 +45,7 @@
CertVerifyResult* verify_result,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
RuleList::const_iterator it;
for (it = rules_.begin(); it != rules_.end(); ++it) {
// Check just the server cert. Intermediates will be ignored.
diff --git a/net/cert/mock_cert_verifier.h b/net/cert/mock_cert_verifier.h
index 994c554..b5b35a1 100644
--- a/net/cert/mock_cert_verifier.h
+++ b/net/cert/mock_cert_verifier.h
@@ -31,7 +31,7 @@
CertVerifyResult* verify_result,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
// Sets the default return value for Verify() for certificates/hosts that do
// not have explicit results added via the AddResult*() methods.
diff --git a/net/cert/multi_log_ct_verifier.cc b/net/cert/multi_log_ct_verifier.cc
index 4ad9af9..f084c0e 100644
--- a/net/cert/multi_log_ct_verifier.cc
+++ b/net/cert/multi_log_ct_verifier.cc
@@ -80,12 +80,11 @@
observer_ = observer;
}
-int MultiLogCTVerifier::Verify(
- X509Certificate* cert,
- const std::string& stapled_ocsp_response,
- const std::string& sct_list_from_tls_extension,
- ct::CTVerifyResult* result,
- const BoundNetLog& net_log) {
+int MultiLogCTVerifier::Verify(X509Certificate* cert,
+ const std::string& stapled_ocsp_response,
+ const std::string& sct_list_from_tls_extension,
+ ct::CTVerifyResult* result,
+ const NetLogWithSource& net_log) {
DCHECK(cert);
DCHECK(result);
diff --git a/net/cert/multi_log_ct_verifier.h b/net/cert/multi_log_ct_verifier.h
index 0d8667e..38ea659d 100644
--- a/net/cert/multi_log_ct_verifier.h
+++ b/net/cert/multi_log_ct_verifier.h
@@ -38,7 +38,7 @@
const std::string& stapled_ocsp_response,
const std::string& sct_list_from_tls_extension,
ct::CTVerifyResult* result,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void SetObserver(Observer* observer) override;
diff --git a/net/cert/multi_log_ct_verifier_unittest.cc b/net/cert/multi_log_ct_verifier_unittest.cc
index 05af2d2..8f3cb39 100644
--- a/net/cert/multi_log_ct_verifier_unittest.cc
+++ b/net/cert/multi_log_ct_verifier_unittest.cc
@@ -112,38 +112,32 @@
}
bool VerifySinglePrecertificateChain(scoped_refptr<X509Certificate> chain,
- const BoundNetLog& bound_net_log,
+ const NetLogWithSource& net_log,
ct::CTVerifyResult* result) {
- return verifier_->Verify(chain.get(),
- std::string(),
- std::string(),
- result,
- bound_net_log) == OK;
+ return verifier_->Verify(chain.get(), std::string(), std::string(), result,
+ net_log) == OK;
}
bool VerifySinglePrecertificateChain(scoped_refptr<X509Certificate> chain) {
ct::CTVerifyResult result;
- TestNetLog net_log;
- BoundNetLog bound_net_log =
- BoundNetLog::Make(&net_log, NetLogSourceType::CONNECT_JOB);
+ TestNetLog test_net_log;
+ NetLogWithSource net_log =
+ NetLogWithSource::Make(&test_net_log, NetLogSourceType::CONNECT_JOB);
- return verifier_->Verify(chain.get(),
- std::string(),
- std::string(),
- &result,
- bound_net_log) == OK;
+ return verifier_->Verify(chain.get(), std::string(), std::string(), &result,
+ net_log) == OK;
}
bool CheckPrecertificateVerification(scoped_refptr<X509Certificate> chain) {
ct::CTVerifyResult result;
- TestNetLog net_log;
- BoundNetLog bound_net_log =
- BoundNetLog::Make(&net_log, NetLogSourceType::CONNECT_JOB);
- return (VerifySinglePrecertificateChain(chain, bound_net_log, &result) &&
+ TestNetLog test_net_log;
+ NetLogWithSource net_log =
+ NetLogWithSource::Make(&test_net_log, NetLogSourceType::CONNECT_JOB);
+ return (VerifySinglePrecertificateChain(chain, net_log, &result) &&
ct::CheckForSingleVerifiedSCTInResult(result, kLogDescription) &&
ct::CheckForSCTOrigin(
result, ct::SignedCertificateTimestamp::SCT_EMBEDDED) &&
- CheckForEmbeddedSCTInNetLog(net_log));
+ CheckForEmbeddedSCTInNetLog(test_net_log));
}
// Histogram-related helper methods
@@ -217,9 +211,8 @@
std::string sct_list = ct::GetSCTListForTesting();
ct::CTVerifyResult result;
- EXPECT_EQ(OK,
- verifier_->Verify(
- chain_.get(), std::string(), sct_list, &result, BoundNetLog()));
+ EXPECT_EQ(OK, verifier_->Verify(chain_.get(), std::string(), sct_list,
+ &result, NetLogWithSource()));
ASSERT_TRUE(ct::CheckForSingleVerifiedSCTInResult(result, kLogDescription));
ASSERT_TRUE(ct::CheckForSCTOrigin(
result, ct::SignedCertificateTimestamp::SCT_FROM_TLS_EXTENSION));
@@ -229,9 +222,8 @@
std::string sct_list = ct::GetSCTListWithInvalidSCT();
ct::CTVerifyResult result;
- EXPECT_NE(OK,
- verifier_->Verify(
- chain_.get(), std::string(), sct_list, &result, BoundNetLog()));
+ EXPECT_NE(OK, verifier_->Verify(chain_.get(), std::string(), sct_list,
+ &result, NetLogWithSource()));
EXPECT_EQ(1U, result.scts.size());
EXPECT_EQ("", result.scts[0].sct->log_description);
EXPECT_EQ(ct::SCT_STATUS_LOG_UNKNOWN, result.scts[0].status);
@@ -252,9 +244,8 @@
int num_invalid_scts = GetValueFromHistogram(
"Net.CertificateTransparency.SCTStatus", ct::SCT_STATUS_LOG_UNKNOWN);
- EXPECT_NE(OK,
- verifier_->Verify(
- chain_.get(), std::string(), sct_list, &result, BoundNetLog()));
+ EXPECT_NE(OK, verifier_->Verify(chain_.get(), std::string(), sct_list,
+ &result, NetLogWithSource()));
ASSERT_EQ(num_valid_scts, NumValidSCTsInStatusHistogram());
ASSERT_EQ(num_invalid_scts + 1,
diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
index 5671391..5c9b4bf 100644
--- a/net/cert/multi_threaded_cert_verifier.cc
+++ b/net/cert/multi_threaded_cert_verifier.cc
@@ -127,7 +127,7 @@
CertVerifierRequest(CertVerifierJob* job,
const CompletionCallback& callback,
CertVerifyResult* verify_result,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: job_(job),
callback_(callback),
verify_result_(verify_result),
@@ -166,13 +166,13 @@
callback_.Reset();
}
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
private:
CertVerifierJob* job_; // Not owned.
CompletionCallback callback_;
CertVerifyResult* verify_result_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
};
// DoVerifyOnWorkerThread runs the verification synchronously on a worker
@@ -210,8 +210,8 @@
MultiThreadedCertVerifier* cert_verifier)
: key_(key),
start_time_(base::TimeTicks::Now()),
- net_log_(
- BoundNetLog::Make(net_log, NetLogSourceType::CERT_VERIFIER_JOB)),
+ net_log_(NetLogWithSource::Make(net_log,
+ NetLogSourceType::CERT_VERIFIER_JOB)),
cert_verifier_(cert_verifier),
is_first_job_(false),
weak_ptr_factory_(this) {
@@ -269,7 +269,7 @@
std::unique_ptr<CertVerifierRequest> CreateRequest(
const CompletionCallback& callback,
CertVerifyResult* verify_result,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
std::unique_ptr<CertVerifierRequest> request(
new CertVerifierRequest(this, callback, verify_result, net_log));
@@ -329,7 +329,7 @@
RequestList requests_; // Non-owned.
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
MultiThreadedCertVerifier* cert_verifier_; // Non-owned.
bool is_first_job_;
@@ -349,7 +349,7 @@
CertVerifyResult* verify_result,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
out_req->reset();
DCHECK(CalledOnValidThread());
diff --git a/net/cert/multi_threaded_cert_verifier.h b/net/cert/multi_threaded_cert_verifier.h
index f1c4af3a..d30d1fbd 100644
--- a/net/cert/multi_threaded_cert_verifier.h
+++ b/net/cert/multi_threaded_cert_verifier.h
@@ -46,7 +46,7 @@
CertVerifyResult* verify_result,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
bool SupportsOCSPStapling() override;
diff --git a/net/cert/multi_threaded_cert_verifier_unittest.cc b/net/cert/multi_threaded_cert_verifier_unittest.cc
index 4d9e50e..b8745d47 100644
--- a/net/cert/multi_threaded_cert_verifier_unittest.cc
+++ b/net/cert/multi_threaded_cert_verifier_unittest.cc
@@ -88,13 +88,14 @@
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, "www.example.com", 0,
std::string(), CertificateList()),
- NULL, &verify_result, callback.callback(), &request, BoundNetLog());
+ NULL, &verify_result, callback.callback(), &request, NetLogWithSource());
ASSERT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request);
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, "www.example.com", 0,
std::string(), CertificateList()),
- NULL, &verify_result2, callback2.callback(), &request2, BoundNetLog());
+ NULL, &verify_result2, callback2.callback(), &request2,
+ NetLogWithSource());
EXPECT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request2);
error = callback.WaitForResult();
@@ -119,7 +120,8 @@
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, "www.example.com", 0,
std::string(), CertificateList()),
- NULL, &verify_result, base::Bind(&FailTest), &request, BoundNetLog());
+ NULL, &verify_result, base::Bind(&FailTest), &request,
+ NetLogWithSource());
ASSERT_THAT(error, IsError(ERR_IO_PENDING));
ASSERT_TRUE(request);
request.reset();
@@ -132,7 +134,8 @@
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, "www2.example.com", 0,
std::string(), CertificateList()),
- NULL, &verify_result, callback.callback(), &request, BoundNetLog());
+ NULL, &verify_result, callback.callback(), &request,
+ NetLogWithSource());
ASSERT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request);
error = callback.WaitForResult();
@@ -162,7 +165,8 @@
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, "www.example.com", 0,
std::string(), CertificateList()),
- NULL, &verify_result, callback.callback(), &request, BoundNetLog());
+ NULL, &verify_result, callback.callback(), &request,
+ NetLogWithSource());
}
ASSERT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request);
@@ -203,21 +207,24 @@
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, domain2, 0, std::string(),
CertificateList()),
- nullptr, &verify_result1, callback1.callback(), &request1, BoundNetLog());
+ nullptr, &verify_result1, callback1.callback(), &request1,
+ NetLogWithSource());
ASSERT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request1);
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, domain2, 0, std::string(),
CertificateList()),
- nullptr, &verify_result2, callback2.callback(), &request2, BoundNetLog());
+ nullptr, &verify_result2, callback2.callback(), &request2,
+ NetLogWithSource());
EXPECT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request2);
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, domain3, 0, std::string(),
CertificateList()),
- nullptr, &verify_result3, callback3.callback(), &request3, BoundNetLog());
+ nullptr, &verify_result3, callback3.callback(), &request3,
+ NetLogWithSource());
EXPECT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request3);
@@ -225,14 +232,16 @@
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, domain1, 0, std::string(),
CertificateList()),
- nullptr, &verify_result4, callback4.callback(), &request4, BoundNetLog());
+ nullptr, &verify_result4, callback4.callback(), &request4,
+ NetLogWithSource());
EXPECT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request4);
error = verifier_.Verify(
CertVerifier::RequestParams(test_cert, domain2, 0, std::string(),
CertificateList()),
- nullptr, &verify_result5, callback5.callback(), &request5, BoundNetLog());
+ nullptr, &verify_result5, callback5.callback(), &request5,
+ NetLogWithSource());
EXPECT_THAT(error, IsError(ERR_IO_PENDING));
EXPECT_TRUE(request5);
diff --git a/net/cert_net/nss_ocsp_unittest.cc b/net/cert_net/nss_ocsp_unittest.cc
index 8dca371..23896fa 100644
--- a/net/cert_net/nss_ocsp_unittest.cc
+++ b/net/cert_net/nss_ocsp_unittest.cc
@@ -152,7 +152,7 @@
CertVerifier::RequestParams(test_cert, "aia-host.invalid", flags,
std::string(), CertificateList()),
nullptr, &verify_result, test_callback.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_THAT(error, IsError(ERR_IO_PENDING));
error = test_callback.WaitForResult();
diff --git a/net/disk_cache/blockfile/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc
index c8b64fbb..17185ba 100644
--- a/net/disk_cache/blockfile/entry_impl.cc
+++ b/net/disk_cache/blockfile/entry_impl.cc
@@ -735,13 +735,13 @@
void EntryImpl::BeginLogging(net::NetLog* net_log, bool created) {
DCHECK(!net_log_.net_log());
- net_log_ =
- net::BoundNetLog::Make(net_log, net::NetLogSourceType::DISK_CACHE_ENTRY);
+ net_log_ = net::NetLogWithSource::Make(
+ net_log, net::NetLogSourceType::DISK_CACHE_ENTRY);
net_log_.BeginEvent(net::NetLogEventType::DISK_CACHE_ENTRY_IMPL,
CreateNetLogEntryCreationCallback(this, created));
}
-const net::BoundNetLog& EntryImpl::net_log() const {
+const net::NetLogWithSource& EntryImpl::net_log() const {
return net_log_;
}
diff --git a/net/disk_cache/blockfile/entry_impl.h b/net/disk_cache/blockfile/entry_impl.h
index 55f68e7..893afba 100644
--- a/net/disk_cache/blockfile/entry_impl.h
+++ b/net/disk_cache/blockfile/entry_impl.h
@@ -149,7 +149,7 @@
// created rather than opened.
void BeginLogging(net::NetLog* net_log, bool created);
- const net::BoundNetLog& net_log() const;
+ const net::NetLogWithSource& net_log() const;
// Returns the number of blocks needed to store an EntryStore.
static int NumBlocksForEntry(int key_size);
@@ -288,7 +288,7 @@
bool dirty_; // True if we detected that this is a dirty entry.
std::unique_ptr<SparseControl> sparse_; // Support for sparse entries.
- net::BoundNetLog net_log_;
+ net::NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(EntryImpl);
};
diff --git a/net/disk_cache/blockfile/sparse_control.cc b/net/disk_cache/blockfile/sparse_control.cc
index d7981b3..303b1ba 100644
--- a/net/disk_cache/blockfile/sparse_control.cc
+++ b/net/disk_cache/blockfile/sparse_control.cc
@@ -165,7 +165,7 @@
// Logs the end event for |operation| on a child entry. Range operations log
// no events for each child they search through.
-void LogChildOperationEnd(const net::BoundNetLog& net_log,
+void LogChildOperationEnd(const net::NetLogWithSource& net_log,
disk_cache::SparseControl::SparseOperation operation,
int result) {
if (net_log.IsCapturing()) {
diff --git a/net/disk_cache/memory/mem_entry_impl.cc b/net/disk_cache/memory/mem_entry_impl.cc
index a568a95..cfe23e7 100644
--- a/net/disk_cache/memory/mem_entry_impl.cc
+++ b/net/disk_cache/memory/mem_entry_impl.cc
@@ -270,8 +270,8 @@
backend_(backend),
doomed_(false) {
backend_->OnEntryInserted(this);
- net_log_ = net::BoundNetLog::Make(net_log,
- net::NetLogSourceType::MEMORY_CACHE_ENTRY);
+ net_log_ = net::NetLogWithSource::Make(
+ net_log, net::NetLogSourceType::MEMORY_CACHE_ENTRY);
net_log_.BeginEvent(net::NetLogEventType::DISK_CACHE_MEM_ENTRY_IMPL,
base::Bind(&NetLogEntryCreationCallback, this));
}
diff --git a/net/disk_cache/memory/mem_entry_impl.h b/net/disk_cache/memory/mem_entry_impl.h
index b366065..efa3e63b 100644
--- a/net/disk_cache/memory/mem_entry_impl.h
+++ b/net/disk_cache/memory/mem_entry_impl.h
@@ -179,7 +179,7 @@
MemBackendImpl* backend_; // Back pointer to the cache.
bool doomed_; // True if this entry was removed from the cache.
- net::BoundNetLog net_log_;
+ net::NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(MemEntryImpl);
};
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index 85655d9..cf45956 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -184,7 +184,8 @@
doomed_(false),
state_(STATE_UNINITIALIZED),
synchronous_entry_(NULL),
- net_log_(net::BoundNetLog::Make(net_log,
+ net_log_(
+ net::NetLogWithSource::Make(net_log,
net::NetLogSourceType::DISK_CACHE_ENTRY)),
stream_0_data_(new net::GrowableIOBuffer()) {
static_assert(arraysize(data_size_) == arraysize(crc32s_end_offset_),
diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h
index 34f9092..c6d5669 100644
--- a/net/disk_cache/simple/simple_entry_impl.h
+++ b/net/disk_cache/simple/simple_entry_impl.h
@@ -369,7 +369,7 @@
std::queue<SimpleEntryOperation> pending_operations_;
- net::BoundNetLog net_log_;
+ net::NetLogWithSource net_log_;
std::unique_ptr<SimpleEntryOperation> executing_operation_;
diff --git a/net/dns/address_sorter_posix_unittest.cc b/net/dns/address_sorter_posix_unittest.cc
index 7520f20c..78ba5b9 100644
--- a/net/dns/address_sorter_posix_unittest.cc
+++ b/net/dns/address_sorter_posix_unittest.cc
@@ -85,10 +85,10 @@
return OK;
}
- const BoundNetLog& NetLog() const override { return net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
private:
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
const AddressMapping* mapping_;
bool connected_;
IPEndPoint local_endpoint_;
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
index 5ee0f1d..24ce6fb 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -171,7 +171,7 @@
const std::string& hostname,
uint16_t qtype,
const DnsTransactionFactory::CallbackType& callback,
- const BoundNetLog&) override {
+ const NetLogWithSource&) override {
MockTransaction* transaction =
new MockTransaction(rules_, hostname, qtype, callback);
if (transaction->delayed())
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index 4a7ce7e..4b8cd12 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -97,7 +97,7 @@
virtual const DnsResponse* GetResponse() const = 0;
// Returns the net log bound to the source of the socket.
- virtual const BoundNetLog& GetSocketNetLog() const = 0;
+ virtual const NetLogWithSource& GetSocketNetLog() const = 0;
// Returns the index of the destination server within DnsConfig::nameservers.
unsigned server_index() const { return server_index_; }
@@ -165,7 +165,7 @@
return (resp != NULL && resp->IsValid()) ? resp : NULL;
}
- const BoundNetLog& GetSocketNetLog() const override {
+ const NetLogWithSource& GetSocketNetLog() const override {
return socket_lease_->socket()->NetLog();
}
@@ -334,7 +334,7 @@
return (resp != NULL && resp->IsValid()) ? resp : NULL;
}
- const BoundNetLog& GetSocketNetLog() const override {
+ const NetLogWithSource& GetSocketNetLog() const override {
return socket_->NetLog();
}
@@ -563,7 +563,7 @@
const std::string& hostname,
uint16_t qtype,
const DnsTransactionFactory::CallbackType& callback,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: session_(session),
hostname_(hostname),
qtype_(qtype),
@@ -950,7 +950,7 @@
// Cleared in DoCallback.
DnsTransactionFactory::CallbackType callback_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// Search list of fully-qualified DNS names to query next (in DNS format).
std::deque<std::string> qnames_;
@@ -984,7 +984,7 @@
const std::string& hostname,
uint16_t qtype,
const CallbackType& callback,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return std::unique_ptr<DnsTransaction>(new DnsTransactionImpl(
session_.get(), hostname, qtype, callback, net_log));
}
diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
index fdd0542..7588205 100644
--- a/net/dns/dns_transaction.h
+++ b/net/dns/dns_transaction.h
@@ -16,7 +16,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class DnsResponse;
class DnsSession;
@@ -66,7 +66,7 @@
const std::string& hostname,
uint16_t qtype,
const CallbackType& callback,
- const BoundNetLog& net_log) WARN_UNUSED_RESULT = 0;
+ const NetLogWithSource& net_log) WARN_UNUSED_RESULT = 0;
// Creates a DnsTransactionFactory which creates DnsTransactionImpl using the
// |session|.
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index 89a7dac..10151f3 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -252,11 +252,9 @@
void StartTransaction(DnsTransactionFactory* factory) {
EXPECT_EQ(NULL, transaction_.get());
transaction_ = factory->CreateTransaction(
- hostname_,
- qtype_,
- base::Bind(&TransactionHelper::OnTransactionComplete,
- base::Unretained(this)),
- BoundNetLog());
+ hostname_, qtype_, base::Bind(&TransactionHelper::OnTransactionComplete,
+ base::Unretained(this)),
+ NetLogWithSource());
EXPECT_EQ(hostname_, transaction_->GetHostname());
EXPECT_EQ(qtype_, transaction_->GetType());
transaction_->Start();
diff --git a/net/dns/fuzzed_host_resolver.cc b/net/dns/fuzzed_host_resolver.cc
index 8fa6f0b7..d8e0232 100644
--- a/net/dns/fuzzed_host_resolver.cc
+++ b/net/dns/fuzzed_host_resolver.cc
@@ -223,7 +223,7 @@
SetDnsClient(std::move(dns_client));
}
-bool FuzzedHostResolver::IsIPv6Reachable(const BoundNetLog& net_log) {
+bool FuzzedHostResolver::IsIPv6Reachable(const NetLogWithSource& net_log) {
return is_ipv6_reachable_;
}
diff --git a/net/dns/fuzzed_host_resolver.h b/net/dns/fuzzed_host_resolver.h
index 511c511..945225b 100644
--- a/net/dns/fuzzed_host_resolver.h
+++ b/net/dns/fuzzed_host_resolver.h
@@ -60,7 +60,7 @@
private:
// HostResolverImpl implementation:
- bool IsIPv6Reachable(const BoundNetLog& net_log) override;
+ bool IsIPv6Reachable(const NetLogWithSource& net_log) override;
void RunLoopbackProbeJob() override;
base::FuzzedDataProvider* data_provider_;
diff --git a/net/dns/host_resolver.h b/net/dns/host_resolver.h
index b478b17..db82b109 100644
--- a/net/dns/host_resolver.h
+++ b/net/dns/host_resolver.h
@@ -27,7 +27,7 @@
namespace net {
class AddressList;
-class BoundNetLog;
+class NetLogWithSource;
class HostResolverImpl;
class HostResolverProc;
class NetLog;
@@ -182,7 +182,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Resolves the given hostname (or IP address literal) out of cache or HOSTS
// file (if enabled) only. This is guaranteed to complete synchronously.
@@ -190,7 +190,7 @@
// or HOSTS entry exists. Otherwise, ERR_DNS_CACHE_MISS is returned.
virtual int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Enable or disable the built-in asynchronous DnsClient.
virtual void SetDnsClientEnabled(bool enabled);
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index 5fa03af6..ef374d4 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -204,7 +204,8 @@
}
// Attempts to connect a UDP socket to |dest|:53.
-bool IsGloballyReachable(const IPAddress& dest, const BoundNetLog& net_log) {
+bool IsGloballyReachable(const IPAddress& dest,
+ const NetLogWithSource& net_log) {
// TODO(eroman): Remove ScopedTracker below once crbug.com/455942 is fixed.
tracked_objects::ScopedTracker tracking_profile_1(
FROM_HERE_WITH_EXPLICIT_FUNCTION("455942 IsGloballyReachable"));
@@ -426,14 +427,14 @@
// without a Request object.
// Logs when a request has just been started.
-void LogStartRequest(const BoundNetLog& source_net_log,
+void LogStartRequest(const NetLogWithSource& source_net_log,
const HostResolver::RequestInfo& info) {
source_net_log.BeginEvent(NetLogEventType::HOST_RESOLVER_IMPL_REQUEST,
base::Bind(&NetLogRequestInfoCallback, &info));
}
// Logs when a request has just completed (before its callback is run).
-void LogFinishRequest(const BoundNetLog& source_net_log,
+void LogFinishRequest(const NetLogWithSource& source_net_log,
const HostResolver::RequestInfo& info,
int net_error) {
source_net_log.EndEventWithNetErrorCode(
@@ -441,7 +442,7 @@
}
// Logs when a request has been cancelled.
-void LogCancelRequest(const BoundNetLog& source_net_log,
+void LogCancelRequest(const NetLogWithSource& source_net_log,
const HostResolverImpl::RequestInfo& info) {
source_net_log.AddEvent(NetLogEventType::CANCELLED);
source_net_log.EndEvent(NetLogEventType::HOST_RESOLVER_IMPL_REQUEST);
@@ -532,7 +533,7 @@
// than removed from the Job's |requests_| list.
class HostResolverImpl::RequestImpl : public HostResolver::Request {
public:
- RequestImpl(const BoundNetLog& source_net_log,
+ RequestImpl(const NetLogWithSource& source_net_log,
const RequestInfo& info,
RequestPriority priority,
const CompletionCallback& callback,
@@ -572,9 +573,7 @@
}
// NetLog for the source, passed in HostResolver::Resolve.
- const BoundNetLog& source_net_log() {
- return source_net_log_;
- }
+ const NetLogWithSource& source_net_log() { return source_net_log_; }
const RequestInfo& info() const {
return info_;
@@ -586,7 +585,7 @@
base::TimeTicks request_time() const { return request_time_; }
private:
- const BoundNetLog source_net_log_;
+ const NetLogWithSource source_net_log_;
// The request info that started the request.
const RequestInfo info_;
@@ -630,7 +629,7 @@
const ProcTaskParams& params,
const Callback& callback,
scoped_refptr<base::TaskRunner> worker_task_runner,
- const BoundNetLog& job_net_log)
+ const NetLogWithSource& job_net_log)
: key_(key),
params_(params),
callback_(callback),
@@ -989,7 +988,7 @@
AddressList results_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(ProcTask);
};
@@ -1067,7 +1066,7 @@
DnsTask(DnsClient* client,
const Key& key,
Delegate* delegate,
- const BoundNetLog& job_net_log)
+ const NetLogWithSource& job_net_log)
: client_(client),
key_(key),
delegate_(delegate),
@@ -1250,7 +1249,7 @@
// The listener to the results of this DnsTask.
Delegate* delegate_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
std::unique_ptr<DnsTransaction> transaction_a_;
std::unique_ptr<DnsTransaction> transaction_aaaa_;
@@ -1279,7 +1278,7 @@
const Key& key,
RequestPriority priority,
scoped_refptr<base::TaskRunner> worker_task_runner,
- const BoundNetLog& source_net_log)
+ const NetLogWithSource& source_net_log)
: resolver_(resolver),
key_(key),
priority_tracker_(priority),
@@ -1290,7 +1289,8 @@
dns_task_error_(OK),
creation_time_(base::TimeTicks::Now()),
priority_change_time_(creation_time_),
- net_log_(BoundNetLog::Make(source_net_log.net_log(),
+ net_log_(
+ NetLogWithSource::Make(source_net_log.net_log(),
NetLogSourceType::HOST_RESOLVER_IMPL_JOB)) {
source_net_log.AddEvent(NetLogEventType::HOST_RESOLVER_IMPL_CREATE_JOB);
@@ -1846,7 +1846,7 @@
const base::TimeTicks creation_time_;
base::TimeTicks priority_change_time_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// Resolves the host using a HostResolverProc.
scoped_refptr<ProcTask> proc_task_;
@@ -1911,7 +1911,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& source_net_log) {
+ const NetLogWithSource& source_net_log) {
DCHECK(addresses);
DCHECK(CalledOnValidThread());
DCHECK_EQ(false, callback.is_null());
@@ -2045,7 +2045,7 @@
AddressList* addresses,
bool allow_stale,
HostCache::EntryStaleness* stale_info,
- const BoundNetLog& source_net_log) {
+ const NetLogWithSource& source_net_log) {
DCHECK(allow_stale == !!stale_info);
// The result of |getaddrinfo| for empty hosts is inconsistent across systems.
// On Windows it gives the default interface's address, whereas on Linux it
@@ -2085,7 +2085,7 @@
int HostResolverImpl::ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& source_net_log) {
+ const NetLogWithSource& source_net_log) {
DCHECK(CalledOnValidThread());
DCHECK(addresses);
@@ -2138,7 +2138,7 @@
const RequestInfo& info,
AddressList* addresses,
HostCache::EntryStaleness* stale_info,
- const BoundNetLog& source_net_log) {
+ const NetLogWithSource& source_net_log) {
DCHECK(CalledOnValidThread());
DCHECK(addresses);
DCHECK(stale_info);
@@ -2306,7 +2306,7 @@
HostResolverImpl::Key HostResolverImpl::GetEffectiveKeyForRequest(
const RequestInfo& info,
const IPAddress* ip_address,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
HostResolverFlags effective_flags =
info.host_resolver_flags() | additional_resolver_flags_;
AddressFamily effective_address_family = info.address_family();
@@ -2330,7 +2330,7 @@
return Key(info.hostname(), effective_address_family, effective_flags);
}
-bool HostResolverImpl::IsIPv6Reachable(const BoundNetLog& net_log) {
+bool HostResolverImpl::IsIPv6Reachable(const NetLogWithSource& net_log) {
base::TimeTicks now = base::TimeTicks::Now();
bool cached = true;
if ((now - last_ipv6_probe_time_).InMilliseconds() > kIPv6ProbePeriodMs) {
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h
index 2f2cca1..910478d 100644
--- a/net/dns/host_resolver_impl.h
+++ b/net/dns/host_resolver_impl.h
@@ -26,7 +26,7 @@
namespace net {
class AddressList;
-class BoundNetLog;
+class NetLogWithSource;
class DnsClient;
class IPAddress;
class NetLog;
@@ -138,10 +138,10 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& source_net_log) override;
+ const NetLogWithSource& source_net_log) override;
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& source_net_log) override;
+ const NetLogWithSource& source_net_log) override;
void SetDnsClientEnabled(bool enabled) override;
HostCache* GetHostCache() override;
std::unique_ptr<base::Value> GetDnsConfigAsValue() const override;
@@ -152,7 +152,7 @@
int ResolveStaleFromCache(const RequestInfo& info,
AddressList* addresses,
HostCache::EntryStaleness* stale_info,
- const BoundNetLog& source_net_log);
+ const NetLogWithSource& source_net_log);
void InitializePersistence(
const PersistCallback& persist_callback,
@@ -204,7 +204,7 @@
AddressList* addresses,
bool allow_stale,
HostCache::EntryStaleness* stale_info,
- const BoundNetLog& request_net_log);
+ const NetLogWithSource& request_net_log);
// Tries to resolve |key| as an IP, returns true and sets |net_error| if
// succeeds, returns false otherwise.
@@ -248,12 +248,12 @@
// family when the request leaves it unspecified.
Key GetEffectiveKeyForRequest(const RequestInfo& info,
const IPAddress* ip_address,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Probes IPv6 support and returns true if IPv6 support is enabled.
// Results are cached, i.e. when called repeatedly this method returns result
// from the first probe for some time before probing again.
- virtual bool IsIPv6Reachable(const BoundNetLog& net_log);
+ virtual bool IsIPv6Reachable(const NetLogWithSource& net_log);
// Asynchronously checks if only loopback IPs are available.
virtual void RunLoopbackProbeJob();
diff --git a/net/dns/host_resolver_impl_fuzzer.cc b/net/dns/host_resolver_impl_fuzzer.cc
index 5ec65d5..74d31b6d 100644
--- a/net/dns/host_resolver_impl_fuzzer.cc
+++ b/net/dns/host_resolver_impl_fuzzer.cc
@@ -146,14 +146,14 @@
// Decide if should be a cache-only resolution.
if (data_provider_->ConsumeBool()) {
return host_resolver_->ResolveFromCache(info, &address_list_,
- net::BoundNetLog());
+ net::NetLogWithSource());
}
info.set_allow_cached_response(data_provider_->ConsumeBool());
return host_resolver_->Resolve(
info, priority, &address_list_,
base::Bind(&DnsRequest::OnCallback, base::Unretained(this)), &request_,
- net::BoundNetLog());
+ net::NetLogWithSource());
}
// Waits until the request is done, if it isn't done already.
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index 099d60df..fa5258a0 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -235,7 +235,7 @@
result_ = resolver_->Resolve(
info_, priority_, &list_,
base::Bind(&Request::OnComplete, base::Unretained(this)), &request_,
- BoundNetLog());
+ NetLogWithSource());
if (!list_.empty())
EXPECT_THAT(result_, IsOk());
return result_;
@@ -244,14 +244,14 @@
int ResolveFromCache() {
DCHECK(resolver_);
DCHECK(!request_);
- return resolver_->ResolveFromCache(info_, &list_, BoundNetLog());
+ return resolver_->ResolveFromCache(info_, &list_, NetLogWithSource());
}
int ResolveStaleFromCache() {
DCHECK(resolver_);
DCHECK(!request_);
return resolver_->ResolveStaleFromCache(info_, &list_, &staleness_,
- BoundNetLog());
+ NetLogWithSource());
}
void ChangePriority(RequestPriority priority) {
@@ -461,7 +461,7 @@
private:
const bool ipv6_reachable_;
- bool IsIPv6Reachable(const BoundNetLog& net_log) override {
+ bool IsIPv6Reachable(const NetLogWithSource& net_log) override {
return ipv6_reachable_;
}
};
@@ -612,7 +612,7 @@
return HostResolverImpl::kMaximumDnsFailures;
}
- bool IsIPv6Reachable(const BoundNetLog& net_log) {
+ bool IsIPv6Reachable(const NetLogWithSource& net_log) {
return resolver_->IsIPv6Reachable(net_log);
}
@@ -1536,16 +1536,16 @@
resolver_.reset(new HostResolverImpl(DefaultOptions(), nullptr));
// Verify that two consecutive calls return the same value.
- TestNetLog net_log;
- BoundNetLog bound_net_log =
- BoundNetLog::Make(&net_log, NetLogSourceType::NONE);
- bool result1 = IsIPv6Reachable(bound_net_log);
- bool result2 = IsIPv6Reachable(bound_net_log);
+ TestNetLog test_net_log;
+ NetLogWithSource net_log =
+ NetLogWithSource::Make(&test_net_log, NetLogSourceType::NONE);
+ bool result1 = IsIPv6Reachable(net_log);
+ bool result2 = IsIPv6Reachable(net_log);
EXPECT_EQ(result1, result2);
// Filter reachability check events and verify that there are two of them.
TestNetLogEntry::List event_list;
- net_log.GetEntries(&event_list);
+ test_net_log.GetEntries(&event_list);
TestNetLogEntry::List probe_event_list;
for (const auto& event : event_list) {
if (event.type ==
diff --git a/net/dns/host_resolver_mojo.cc b/net/dns/host_resolver_mojo.cc
index 4f13daf8..106d4a24 100644
--- a/net/dns/host_resolver_mojo.cc
+++ b/net/dns/host_resolver_mojo.cc
@@ -77,7 +77,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& source_net_log) {
+ const NetLogWithSource& source_net_log) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(request);
DVLOG(1) << "Resolve " << info.host_port_pair().ToString();
@@ -103,7 +103,7 @@
int HostResolverMojo::ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& source_net_log) {
+ const NetLogWithSource& source_net_log) {
DCHECK(thread_checker_.CalledOnValidThread());
DVLOG(1) << "ResolveFromCache " << info.host_port_pair().ToString();
return ResolveFromCacheInternal(info, CacheKeyForRequest(info), addresses);
diff --git a/net/dns/host_resolver_mojo.h b/net/dns/host_resolver_mojo.h
index 35732bc..de67499 100644
--- a/net/dns/host_resolver_mojo.h
+++ b/net/dns/host_resolver_mojo.h
@@ -14,7 +14,7 @@
namespace net {
class AddressList;
-class BoundNetLog;
+class NetLogWithSource;
// A HostResolver implementation that converts requests to mojo types and
// forwards them to a mojo Impl interface.
@@ -38,10 +38,10 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& source_net_log) override;
+ const NetLogWithSource& source_net_log) override;
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& source_net_log) override;
+ const NetLogWithSource& source_net_log) override;
HostCache* GetHostCache() override;
private:
diff --git a/net/dns/host_resolver_mojo_unittest.cc b/net/dns/host_resolver_mojo_unittest.cc
index 1c14a24..baa1679 100644
--- a/net/dns/host_resolver_mojo_unittest.cc
+++ b/net/dns/host_resolver_mojo_unittest.cc
@@ -167,9 +167,9 @@
int Resolve(const HostResolver::RequestInfo& request_info,
AddressList* result) {
TestCompletionCallback callback;
- return callback.GetResult(resolver_->Resolve(request_info, DEFAULT_PRIORITY,
- result, callback.callback(),
- &request_, BoundNetLog()));
+ return callback.GetResult(
+ resolver_->Resolve(request_info, DEFAULT_PRIORITY, result,
+ callback.callback(), &request_, NetLogWithSource()));
}
std::unique_ptr<MockMojoHostResolver> mock_resolver_;
@@ -259,12 +259,12 @@
std::unique_ptr<HostResolver::Request> request2;
TestCompletionCallback callback1;
TestCompletionCallback callback2;
- ASSERT_EQ(ERR_IO_PENDING,
- resolver_->Resolve(request_info1, DEFAULT_PRIORITY, &result1,
- callback1.callback(), &request1, BoundNetLog()));
- ASSERT_EQ(ERR_IO_PENDING,
- resolver_->Resolve(request_info2, DEFAULT_PRIORITY, &result2,
- callback2.callback(), &request2, BoundNetLog()));
+ ASSERT_EQ(ERR_IO_PENDING, resolver_->Resolve(request_info1, DEFAULT_PRIORITY,
+ &result1, callback1.callback(),
+ &request1, NetLogWithSource()));
+ ASSERT_EQ(ERR_IO_PENDING, resolver_->Resolve(request_info2, DEFAULT_PRIORITY,
+ &result2, callback2.callback(),
+ &request2, NetLogWithSource()));
EXPECT_THAT(callback1.GetResult(ERR_IO_PENDING), IsOk());
EXPECT_THAT(callback2.GetResult(ERR_IO_PENDING),
IsError(ERR_NAME_NOT_RESOLVED));
@@ -322,7 +322,7 @@
AddressList result;
std::unique_ptr<HostResolver::Request> request;
resolver_->Resolve(request_info, DEFAULT_PRIORITY, &result, base::Bind(&Fail),
- &request, BoundNetLog());
+ &request, NetLogWithSource());
request.reset();
waiter_.WaitForEvent(ConnectionErrorSource::REQUEST);
EXPECT_TRUE(result.empty());
@@ -355,8 +355,8 @@
HostResolver::RequestInfo request_info(
HostPortPair::FromString("example.com:8080"));
AddressList result;
- EXPECT_EQ(ERR_DNS_CACHE_MISS,
- resolver_->ResolveFromCache(request_info, &result, BoundNetLog()));
+ EXPECT_EQ(ERR_DNS_CACHE_MISS, resolver_->ResolveFromCache(
+ request_info, &result, NetLogWithSource()));
EXPECT_TRUE(result.empty());
}
@@ -374,8 +374,8 @@
EXPECT_EQ(1u, mock_resolver_->requests().size());
result.clear();
- EXPECT_EQ(OK,
- resolver_->ResolveFromCache(request_info, &result, BoundNetLog()));
+ EXPECT_EQ(OK, resolver_->ResolveFromCache(request_info, &result,
+ NetLogWithSource()));
ASSERT_EQ(2u, result.size());
EXPECT_EQ(address_list[0], result[0]);
EXPECT_EQ(address_list[1], result[1]);
@@ -397,8 +397,8 @@
result.clear();
request_info.set_allow_cached_response(false);
- EXPECT_EQ(ERR_DNS_CACHE_MISS,
- resolver_->ResolveFromCache(request_info, &result, BoundNetLog()));
+ EXPECT_EQ(ERR_DNS_CACHE_MISS, resolver_->ResolveFromCache(
+ request_info, &result, NetLogWithSource()));
EXPECT_TRUE(result.empty());
}
diff --git a/net/dns/mapped_host_resolver.cc b/net/dns/mapped_host_resolver.cc
index 43ad71a..e29c85e 100644
--- a/net/dns/mapped_host_resolver.cc
+++ b/net/dns/mapped_host_resolver.cc
@@ -24,7 +24,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
RequestInfo info = original_info;
int rv = ApplyRules(&info);
if (rv != OK)
@@ -35,7 +35,7 @@
int MappedHostResolver::ResolveFromCache(const RequestInfo& original_info,
AddressList* addresses,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
RequestInfo info = original_info;
int rv = ApplyRules(&info);
if (rv != OK)
diff --git a/net/dns/mapped_host_resolver.h b/net/dns/mapped_host_resolver.h
index 30ddc52..ddc753be 100644
--- a/net/dns/mapped_host_resolver.h
+++ b/net/dns/mapped_host_resolver.h
@@ -50,10 +50,10 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void SetDnsClientEnabled(bool enabled) override;
HostCache* GetHostCache() override;
std::unique_ptr<base::Value> GetDnsConfigAsValue() const override;
diff --git a/net/dns/mapped_host_resolver_unittest.cc b/net/dns/mapped_host_resolver_unittest.cc
index 3c3b479..59411ebe 100644
--- a/net/dns/mapped_host_resolver_unittest.cc
+++ b/net/dns/mapped_host_resolver_unittest.cc
@@ -51,7 +51,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.google.com", 80)),
DEFAULT_PRIORITY, &address_list, callback.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsError(ERR_NAME_NOT_RESOLVED));
@@ -64,7 +64,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.google.com", 80)),
DEFAULT_PRIORITY, &address_list, callback.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -75,7 +75,7 @@
// is "foo.com:77".
rv = resolver->Resolve(HostResolver::RequestInfo(HostPortPair("foo.com", 77)),
DEFAULT_PRIORITY, &address_list, callback.callback(),
- &request, BoundNetLog());
+ &request, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -89,7 +89,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("chromium.org", 61)),
DEFAULT_PRIORITY, &address_list, callback.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -123,7 +123,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.google.com", 80)),
DEFAULT_PRIORITY, &address_list, callback.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -134,7 +134,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("chrome.com", 80)),
DEFAULT_PRIORITY, &address_list, callback.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -164,7 +164,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.google.com", 80)),
DEFAULT_PRIORITY, &address_list, callback.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -175,7 +175,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("chrome.net", 80)),
DEFAULT_PRIORITY, &address_list, callback.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -218,7 +218,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.google.com", 80)),
DEFAULT_PRIORITY, &address_list, callback1.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_NAME_NOT_RESOLVED));
request.reset();
@@ -227,7 +227,7 @@
rv = resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.foo.com", 80)),
DEFAULT_PRIORITY, &address_list, callback2.callback(), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback2.WaitForResult();
EXPECT_THAT(rv, IsOk());
diff --git a/net/dns/mock_host_resolver.cc b/net/dns/mock_host_resolver.cc
index 08fe463c..10258b3 100644
--- a/net/dns/mock_host_resolver.cc
+++ b/net/dns/mock_host_resolver.cc
@@ -106,7 +106,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(CalledOnValidThread());
DCHECK(request);
last_request_priority_ = priority;
@@ -140,7 +140,7 @@
int MockHostResolverBase::ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
num_resolve_from_cache_++;
DCHECK(CalledOnValidThread());
next_request_id_++;
@@ -452,13 +452,13 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
return ERR_IO_PENDING;
}
int HangingHostResolver::ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
return ERR_DNS_CACHE_MISS;
}
diff --git a/net/dns/mock_host_resolver.h b/net/dns/mock_host_resolver.h
index 175c7c2..cca300ac 100644
--- a/net/dns/mock_host_resolver.h
+++ b/net/dns/mock_host_resolver.h
@@ -86,10 +86,10 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
HostCache* GetHostCache() override;
// Detach cancelled request.
@@ -244,10 +244,10 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
};
// This class sets the default HostResolverProc for a particular scope. The
diff --git a/net/dns/mock_mdns_socket_factory.h b/net/dns/mock_mdns_socket_factory.h
index 339ecc88..77d47be 100644
--- a/net/dns/mock_mdns_socket_factory.h
+++ b/net/dns/mock_mdns_socket_factory.h
@@ -50,7 +50,7 @@
MOCK_CONST_METHOD1(GetPeerAddress, int(IPEndPoint* address));
int GetLocalAddress(IPEndPoint* address) const override;
MOCK_METHOD0(UseNonBlockingIO, void());
- MOCK_CONST_METHOD0(NetLog, const BoundNetLog&());
+ MOCK_CONST_METHOD0(NetLog, const NetLogWithSource&());
MOCK_METHOD0(AllowAddressReuse, void());
MOCK_METHOD0(AllowBroadcast, void());
diff --git a/net/dns/mojo_host_resolver_impl.cc b/net/dns/mojo_host_resolver_impl.cc
index e503570..1e32639 100644
--- a/net/dns/mojo_host_resolver_impl.cc
+++ b/net/dns/mojo_host_resolver_impl.cc
@@ -23,7 +23,7 @@
Job(MojoHostResolverImpl* resolver_service,
net::HostResolver* resolver,
const net::HostResolver::RequestInfo& request_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
interfaces::HostResolverRequestClientPtr client);
~Job();
@@ -39,7 +39,7 @@
MojoHostResolverImpl* resolver_service_;
net::HostResolver* resolver_;
net::HostResolver::RequestInfo request_info_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
interfaces::HostResolverRequestClientPtr client_;
std::unique_ptr<net::HostResolver::Request> request_;
AddressList result_;
@@ -47,9 +47,8 @@
};
MojoHostResolverImpl::MojoHostResolverImpl(net::HostResolver* resolver,
- const BoundNetLog& net_log)
- : resolver_(resolver), net_log_(net_log) {
-}
+ const NetLogWithSource& net_log)
+ : resolver_(resolver), net_log_(net_log) {}
MojoHostResolverImpl::~MojoHostResolverImpl() {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -85,7 +84,7 @@
MojoHostResolverImpl* resolver_service,
net::HostResolver* resolver,
const net::HostResolver::RequestInfo& request_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
interfaces::HostResolverRequestClientPtr client)
: resolver_service_(resolver_service),
resolver_(resolver),
diff --git a/net/dns/mojo_host_resolver_impl.h b/net/dns/mojo_host_resolver_impl.h
index b0b11ab..de2e354 100644
--- a/net/dns/mojo_host_resolver_impl.h
+++ b/net/dns/mojo_host_resolver_impl.h
@@ -24,7 +24,8 @@
class MojoHostResolverImpl {
public:
// |resolver| is expected to outlive |this|.
- MojoHostResolverImpl(net::HostResolver* resolver, const BoundNetLog& net_log);
+ MojoHostResolverImpl(net::HostResolver* resolver,
+ const NetLogWithSource& net_log);
~MojoHostResolverImpl();
void Resolve(interfaces::HostResolverRequestInfoPtr request_info,
@@ -41,8 +42,8 @@
// Resolver for resolving incoming requests. Not owned.
net::HostResolver* resolver_;
- // The BoundNetLog to be passed to |resolver_| for all requests.
- const BoundNetLog net_log_;
+ // The NetLogWithSource to be passed to |resolver_| for all requests.
+ const NetLogWithSource net_log_;
// All pending jobs, so they can be cancelled when this service is destroyed.
// Owns all jobs.
diff --git a/net/dns/mojo_host_resolver_impl_unittest.cc b/net/dns/mojo_host_resolver_impl_unittest.cc
index 0ffb50db..dd5e49d9 100644
--- a/net/dns/mojo_host_resolver_impl_unittest.cc
+++ b/net/dns/mojo_host_resolver_impl_unittest.cc
@@ -106,7 +106,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
private:
base::Closure resolve_callback_;
@@ -117,7 +117,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
int result = MockHostResolver::Resolve(info, priority, addresses, callback,
request, net_log);
if (!resolve_callback_.is_null()) {
@@ -137,7 +137,7 @@
mock_host_resolver_.rules()->AddSimulatedFailure("failure.fail");
resolver_service_.reset(
- new MojoHostResolverImpl(&mock_host_resolver_, BoundNetLog()));
+ new MojoHostResolverImpl(&mock_host_resolver_, NetLogWithSource()));
}
interfaces::HostResolverRequestInfoPtr CreateRequest(const std::string& host,
diff --git a/net/docs/crash-course-in-net-internals.md b/net/docs/crash-course-in-net-internals.md
index fa2094c..529c7d2c 100644
--- a/net/docs/crash-course-in-net-internals.md
+++ b/net/docs/crash-course-in-net-internals.md
@@ -34,7 +34,7 @@
The Event View shows events logged by the NetLog. The NetLog model is that
long-lived network stack objects, called sources, emit events over their
-lifetime. When looking at the code, a "BoundNetLog" object contains a source
+lifetime. When looking at the code, a "NetLogWithSource" object contains a source
ID, and a pointer to the NetLog the source emits events to. Some events have a
beginning and end point (during which other subevents may occur), and some only
occur at a single point in time. Generally only one event can be occuring for a
diff --git a/net/filter/filter.h b/net/filter/filter.h
index 1940399e..05a314b 100644
--- a/net/filter/filter.h
+++ b/net/filter/filter.h
@@ -63,7 +63,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class IOBuffer;
class URLRequestContext;
@@ -128,8 +128,8 @@
// statistics as selected by the argument.
virtual void RecordPacketStats(StatisticSelector statistic) const = 0;
- // The BoundNetLog of the associated request.
- virtual const BoundNetLog& GetNetLog() const = 0;
+ // The NetLogWithSource of the associated request.
+ virtual const NetLogWithSource& GetNetLog() const = 0;
};
//------------------------------------------------------------------------------
diff --git a/net/filter/mock_filter_context.cc b/net/filter/mock_filter_context.cc
index 2165aa05..c31140d 100644
--- a/net/filter/mock_filter_context.cc
+++ b/net/filter/mock_filter_context.cc
@@ -58,7 +58,7 @@
return context_.get();
}
-const BoundNetLog& MockFilterContext::GetNetLog() const {
+const NetLogWithSource& MockFilterContext::GetNetLog() const {
return net_log_;
}
diff --git a/net/filter/mock_filter_context.h b/net/filter/mock_filter_context.h
index 3237829..858509da 100644
--- a/net/filter/mock_filter_context.h
+++ b/net/filter/mock_filter_context.h
@@ -68,7 +68,7 @@
void RecordPacketStats(StatisticSelector statistic) const override {}
- const BoundNetLog& GetNetLog() const override;
+ const NetLogWithSource& GetNetLog() const override;
private:
std::string mime_type_;
@@ -79,7 +79,7 @@
bool ok_to_call_get_url_;
int response_code_;
std::unique_ptr<URLRequestContext> context_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(MockFilterContext);
};
diff --git a/net/ftp/ftp_ctrl_response_buffer.cc b/net/ftp/ftp_ctrl_response_buffer.cc
index 419eda6f..f2cc5f5 100644
--- a/net/ftp/ftp_ctrl_response_buffer.cc
+++ b/net/ftp/ftp_ctrl_response_buffer.cc
@@ -25,10 +25,8 @@
FtpCtrlResponse::~FtpCtrlResponse() {}
-FtpCtrlResponseBuffer::FtpCtrlResponseBuffer(const BoundNetLog& net_log)
- : multiline_(false),
- net_log_(net_log) {
-}
+FtpCtrlResponseBuffer::FtpCtrlResponseBuffer(const NetLogWithSource& net_log)
+ : multiline_(false), net_log_(net_log) {}
FtpCtrlResponseBuffer::~FtpCtrlResponseBuffer() {}
diff --git a/net/ftp/ftp_ctrl_response_buffer.h b/net/ftp/ftp_ctrl_response_buffer.h
index b53b7a91..ae96c28 100644
--- a/net/ftp/ftp_ctrl_response_buffer.h
+++ b/net/ftp/ftp_ctrl_response_buffer.h
@@ -28,7 +28,7 @@
class NET_EXPORT_PRIVATE FtpCtrlResponseBuffer {
public:
- FtpCtrlResponseBuffer(const BoundNetLog& net_log);
+ FtpCtrlResponseBuffer(const NetLogWithSource& net_log);
~FtpCtrlResponseBuffer();
// Called when data is received from the control socket. Returns error code.
@@ -92,7 +92,7 @@
// As we read full responses (possibly multiline), we add them to the queue.
std::queue<FtpCtrlResponse> responses_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(FtpCtrlResponseBuffer);
};
diff --git a/net/ftp/ftp_ctrl_response_buffer_unittest.cc b/net/ftp/ftp_ctrl_response_buffer_unittest.cc
index b0eae98b..a133aa44 100644
--- a/net/ftp/ftp_ctrl_response_buffer_unittest.cc
+++ b/net/ftp/ftp_ctrl_response_buffer_unittest.cc
@@ -20,7 +20,7 @@
class FtpCtrlResponseBufferTest : public testing::Test {
public:
- FtpCtrlResponseBufferTest() : buffer_(BoundNetLog()) {}
+ FtpCtrlResponseBufferTest() : buffer_(NetLogWithSource()) {}
protected:
int PushDataToBuffer(const char* data) {
diff --git a/net/ftp/ftp_ctrl_response_fuzzer.cc b/net/ftp/ftp_ctrl_response_fuzzer.cc
index 227cfa28..b1a4880b 100644
--- a/net/ftp/ftp_ctrl_response_fuzzer.cc
+++ b/net/ftp/ftp_ctrl_response_fuzzer.cc
@@ -10,7 +10,7 @@
// Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- const net::BoundNetLog log;
+ const net::NetLogWithSource log;
net::FtpCtrlResponseBuffer buffer(log);
if (!buffer.ConsumeData(reinterpret_cast<const char*>(data), size)) {
return 0;
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc
index 03290d62..8fa984d 100644
--- a/net/ftp/ftp_network_transaction.cc
+++ b/net/ftp/ftp_network_transaction.cc
@@ -238,7 +238,7 @@
int FtpNetworkTransaction::Start(const FtpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
net_log_ = net_log;
request_ = request_info;
diff --git a/net/ftp/ftp_network_transaction.h b/net/ftp/ftp_network_transaction.h
index df6487bc..b95f7b3 100644
--- a/net/ftp/ftp_network_transaction.h
+++ b/net/ftp/ftp_network_transaction.h
@@ -38,7 +38,7 @@
// FtpTransaction methods:
int Start(const FtpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
int RestartWithAuth(const AuthCredentials& credentials,
const CompletionCallback& callback) override;
int Read(IOBuffer* buf,
@@ -201,7 +201,7 @@
CompletionCallback io_callback_;
CompletionCallback user_callback_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
const FtpRequestInfo* request_;
FtpResponseInfo response_;
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index 8bb0ad6..3c75f42 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -897,7 +897,7 @@
EXPECT_EQ(LOAD_STATE_IDLE, transaction_.GetLoadState());
ASSERT_EQ(ERR_IO_PENDING,
transaction_.Start(&request_info, callback_.callback(),
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_NE(LOAD_STATE_IDLE, transaction_.GetLoadState());
ASSERT_EQ(expected_result, callback_.WaitForResult());
if (expected_result == OK) {
@@ -949,7 +949,7 @@
EXPECT_EQ(LOAD_STATE_IDLE, transaction_.GetLoadState());
ASSERT_EQ(ERR_IO_PENDING,
transaction_.Start(&request_info, callback_.callback(),
- BoundNetLog()));
+ NetLogWithSource()));
ASSERT_THAT(callback_.WaitForResult(), IsError(ERR_NAME_NOT_RESOLVED));
EXPECT_EQ(LOAD_STATE_IDLE, transaction_.GetLoadState());
}
@@ -1180,7 +1180,7 @@
// Start the transaction.
ASSERT_EQ(ERR_IO_PENDING,
transaction_.Start(&request_info, callback_.callback(),
- BoundNetLog()));
+ NetLogWithSource()));
ASSERT_THAT(callback_.WaitForResult(), IsOk());
// The transaction fires the callback when we can start reading data. That
@@ -1365,7 +1365,7 @@
ASSERT_EQ(ERR_IO_PENDING,
transaction_.Start(&request_info, callback_.callback(),
- BoundNetLog()));
+ NetLogWithSource()));
ASSERT_THAT(callback_.WaitForResult(), IsError(ERR_FTP_FAILED));
MockRead ctrl_reads[] = {
@@ -1399,7 +1399,7 @@
ASSERT_EQ(ERR_IO_PENDING,
transaction_.Start(&request_info, callback_.callback(),
- BoundNetLog()));
+ NetLogWithSource()));
ASSERT_THAT(callback_.WaitForResult(), IsError(ERR_FTP_FAILED));
MockRead ctrl_reads[] = {
diff --git a/net/ftp/ftp_transaction.h b/net/ftp/ftp_transaction.h
index 0740189..1da3aef 100644
--- a/net/ftp/ftp_transaction.h
+++ b/net/ftp/ftp_transaction.h
@@ -17,7 +17,7 @@
class AuthCredentials;
class FtpResponseInfo;
class FtpRequestInfo;
-class BoundNetLog;
+class NetLogWithSource;
// Represents a single FTP transaction.
class NET_EXPORT_PRIVATE FtpTransaction {
@@ -42,7 +42,7 @@
// Profiling information for the request is saved to |net_log| if non-NULL.
virtual int Start(const FtpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Restarts the FTP transaction with authentication credentials.
virtual int RestartWithAuth(const AuthCredentials& credentials,
diff --git a/net/http/bidirectional_stream.cc b/net/http/bidirectional_stream.cc
index 93e28f1d..e4260e2 100644
--- a/net/http/bidirectional_stream.cc
+++ b/net/http/bidirectional_stream.cc
@@ -81,8 +81,8 @@
Delegate* delegate,
std::unique_ptr<base::Timer> timer)
: request_info_(std::move(request_info)),
- net_log_(BoundNetLog::Make(session->net_log(),
- NetLogSourceType::BIDIRECTIONAL_STREAM)),
+ net_log_(NetLogWithSource::Make(session->net_log(),
+ NetLogSourceType::BIDIRECTIONAL_STREAM)),
session_(session),
send_request_headers_automatically_(send_request_headers_automatically),
request_headers_sent_(false),
diff --git a/net/http/bidirectional_stream.h b/net/http/bidirectional_stream.h
index c7fa97c..c8ddff2f 100644
--- a/net/http/bidirectional_stream.h
+++ b/net/http/bidirectional_stream.h
@@ -218,7 +218,7 @@
// BidirectionalStreamRequestInfo used when requesting the stream.
std::unique_ptr<BidirectionalStreamRequestInfo> request_info_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
HttpNetworkSession* session_;
diff --git a/net/http/bidirectional_stream_impl.h b/net/http/bidirectional_stream_impl.h
index d88c596..bb4a517 100644
--- a/net/http/bidirectional_stream_impl.h
+++ b/net/http/bidirectional_stream_impl.h
@@ -22,7 +22,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class IOBuffer;
class SpdyHeaderBlock;
struct BidirectionalStreamRequestInfo;
@@ -99,7 +99,7 @@
// sent only when SendRequestHeaders() is invoked or with next
// SendData/SendvData.
virtual void Start(const BidirectionalStreamRequestInfo* request_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool send_request_headers_automatically,
BidirectionalStreamImpl::Delegate* delegate,
std::unique_ptr<base::Timer> timer) = 0;
diff --git a/net/http/failing_http_transaction_factory.cc b/net/http/failing_http_transaction_factory.cc
index 6003353..2b4fe66 100644
--- a/net/http/failing_http_transaction_factory.cc
+++ b/net/http/failing_http_transaction_factory.cc
@@ -20,7 +20,7 @@
namespace net {
class AuthCredentials;
-class BoundNetLog;
+class NetLogWithSource;
class HttpRequestHeaders;
class IOBuffer;
class SSLPrivateKey;
@@ -39,7 +39,7 @@
// HttpTransaction
int Start(const HttpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
int RestartIgnoringLastError(const CompletionCallback& callback) override;
int RestartWithCertificate(X509Certificate* client_cert,
SSLPrivateKey* client_private_key,
@@ -84,7 +84,7 @@
int FailingHttpTransaction::Start(const HttpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
base::Bind(callback, error_));
return ERR_IO_PENDING;
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index 738c1b8d..bd8f9228 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -29,7 +29,7 @@
Target target,
const GURL& origin,
const std::set<Scheme>& disabled_schemes,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
DCHECK(http_auth_handler_factory);
DCHECK(handler->get() == NULL);
diff --git a/net/http/http_auth.h b/net/http/http_auth.h
index 464a39e..619b6894 100644
--- a/net/http/http_auth.h
+++ b/net/http/http_auth.h
@@ -17,7 +17,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class HttpAuthHandler;
class HttpAuthHandlerFactory;
class HttpResponseHeaders;
@@ -142,7 +142,7 @@
Target target,
const GURL& origin,
const std::set<Scheme>& disabled_schemes,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler);
// Handle a 401/407 response from a server/proxy after a previous
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index d5c0c891..15725b4 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -142,8 +142,9 @@
}
int HttpAuthController::MaybeGenerateAuthToken(
- const HttpRequestInfo* request, const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ const NetLogWithSource& net_log) {
DCHECK(CalledOnValidThread());
bool needs_auth = HaveAuth() || SelectPreemptiveAuth(net_log);
if (!needs_auth)
@@ -166,7 +167,7 @@
return rv;
}
-bool HttpAuthController::SelectPreemptiveAuth(const BoundNetLog& net_log) {
+bool HttpAuthController::SelectPreemptiveAuth(const NetLogWithSource& net_log) {
DCHECK(CalledOnValidThread());
DCHECK(!HaveAuth());
DCHECK(identity_.invalid);
@@ -221,7 +222,7 @@
const SSLInfo& ssl_info,
bool do_not_send_server_auth,
bool establishing_tunnel,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(CalledOnValidThread());
DCHECK(headers.get());
DCHECK(auth_origin_.is_valid());
diff --git a/net/http/http_auth_controller.h b/net/http/http_auth_controller.h
index 04f3264..f00232416 100644
--- a/net/http/http_auth_controller.h
+++ b/net/http/http_auth_controller.h
@@ -45,7 +45,7 @@
// were necessary.
virtual int MaybeGenerateAuthToken(const HttpRequestInfo* request,
const CompletionCallback& callback,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Adds either the proxy auth header, or the origin server auth header,
// as specified by |target_|.
@@ -59,7 +59,7 @@
const SSLInfo& ssl_info,
bool do_not_send_server_auth,
bool establishing_tunnel,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Store the supplied credentials and prepare to restart the auth.
virtual void ResetAuth(const AuthCredentials& credentials);
@@ -90,7 +90,7 @@
// Searches the auth cache for an entry that encompasses the request's path.
// If such an entry is found, updates |identity_| and |handler_| with the
// cache entry's data and returns true.
- bool SelectPreemptiveAuth(const BoundNetLog& net_log);
+ bool SelectPreemptiveAuth(const NetLogWithSource& net_log);
// Invalidates the current handler. If |action| is
// INVALIDATE_HANDLER_AND_CACHED_CREDENTIALS, then also invalidate
diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc
index b3d1ca3..fb42ebf5 100644
--- a/net/http/http_auth_controller_unittest.cc
+++ b/net/http/http_auth_controller_unittest.cc
@@ -50,7 +50,7 @@
int handler_rv,
int expected_controller_rv,
SchemeState scheme_state) {
- BoundNetLog dummy_log;
+ NetLogWithSource dummy_log;
HttpAuthCache dummy_auth_cache;
HttpRequestInfo request;
@@ -164,7 +164,7 @@
HttpAuth::Scheme expected_scheme_;
};
- BoundNetLog dummy_log;
+ NetLogWithSource dummy_log;
HttpAuthCache dummy_auth_cache;
HttpRequestInfo request;
request.method = "GET";
diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
index 3a9db41..265309e 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -27,7 +27,7 @@
HttpAuth::Target target,
const SSLInfo& ssl_info,
const GURL& origin,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
origin_ = origin;
target_ = target;
score_ = -1;
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h
index 4a6cb79e..3f95517 100644
--- a/net/http/http_auth_handler.h
+++ b/net/http/http_auth_handler.h
@@ -35,7 +35,7 @@
HttpAuth::Target target,
const SSLInfo& ssl_info,
const GURL& origin,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Determines how the previous authorization attempt was received.
//
@@ -190,7 +190,7 @@
// A bitmask of the properties of the authentication scheme.
int properties_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
private:
void OnGenerateAuthTokenComplete(int rv);
diff --git a/net/http/http_auth_handler_basic.cc b/net/http/http_auth_handler_basic.cc
index 276c128..f756f05 100644
--- a/net/http/http_auth_handler_basic.cc
+++ b/net/http/http_auth_handler_basic.cc
@@ -114,7 +114,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
// TODO(cbentzel): Move towards model of parsing in the factory
// method and only constructing when valid.
diff --git a/net/http/http_auth_handler_basic.h b/net/http/http_auth_handler_basic.h
index 98415f1..970e99f 100644
--- a/net/http/http_auth_handler_basic.h
+++ b/net/http/http_auth_handler_basic.h
@@ -27,7 +27,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override;
};
diff --git a/net/http/http_auth_handler_basic_unittest.cc b/net/http/http_auth_handler_basic_unittest.cc
index 72db6ef..3ea61a1 100644
--- a/net/http/http_auth_handler_basic_unittest.cc
+++ b/net/http/http_auth_handler_basic_unittest.cc
@@ -44,7 +44,7 @@
std::unique_ptr<HttpAuthHandler> basic;
EXPECT_EQ(OK, factory.CreateAuthHandlerFromString(
challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin,
- BoundNetLog(), &basic));
+ NetLogWithSource(), &basic));
AuthCredentials credentials(base::ASCIIToUTF16(tests[i].username),
base::ASCIIToUTF16(tests[i].password));
HttpRequestInfo request_info;
@@ -98,7 +98,7 @@
std::unique_ptr<HttpAuthHandler> basic;
EXPECT_EQ(OK, factory.CreateAuthHandlerFromString(
tests[0].challenge, HttpAuth::AUTH_SERVER, null_ssl_info,
- origin, BoundNetLog(), &basic));
+ origin, NetLogWithSource(), &basic));
for (size_t i = 0; i < arraysize(tests); ++i) {
std::string challenge(tests[i].challenge);
@@ -198,8 +198,8 @@
SSLInfo null_ssl_info;
std::unique_ptr<HttpAuthHandler> basic;
int rv = factory.CreateAuthHandlerFromString(
- challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin, BoundNetLog(),
- &basic);
+ challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin,
+ NetLogWithSource(), &basic);
EXPECT_EQ(tests[i].expected_rv, rv);
if (rv == OK)
EXPECT_EQ(tests[i].expected_realm, basic->realm());
diff --git a/net/http/http_auth_handler_digest.cc b/net/http/http_auth_handler_digest.cc
index e4c8c16f..39015ae7 100644
--- a/net/http/http_auth_handler_digest.cc
+++ b/net/http/http_auth_handler_digest.cc
@@ -97,7 +97,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
// TODO(cbentzel): Move towards model of parsing in the factory
// method and only constructing when valid.
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h
index c5c172a..d196f2f 100644
--- a/net/http/http_auth_handler_digest.h
+++ b/net/http/http_auth_handler_digest.h
@@ -71,7 +71,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override;
private:
diff --git a/net/http/http_auth_handler_digest_unittest.cc b/net/http/http_auth_handler_digest_unittest.cc
index 9e2a47a..97a197a4 100644
--- a/net/http/http_auth_handler_digest_unittest.cc
+++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -60,8 +60,8 @@
SSLInfo null_ssl_info;
GURL url_origin(target == HttpAuth::AUTH_SERVER ? request_url : proxy_name);
int rv_create = factory->CreateAuthHandlerFromString(
- challenge, target, null_ssl_info, url_origin.GetOrigin(), BoundNetLog(),
- &handler);
+ challenge, target, null_ssl_info, url_origin.GetOrigin(),
+ NetLogWithSource(), &handler);
if (rv_create != OK || handler.get() == NULL) {
ADD_FAILURE() << "Unable to create auth handler.";
return false;
@@ -362,7 +362,7 @@
std::unique_ptr<HttpAuthHandler> handler;
int rv = factory->CreateAuthHandlerFromString(
tests[i].challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin,
- BoundNetLog(), &handler);
+ NetLogWithSource(), &handler);
if (tests[i].parsed_success) {
EXPECT_THAT(rv, IsOk());
} else {
@@ -526,7 +526,7 @@
std::unique_ptr<HttpAuthHandler> handler;
int rv = factory->CreateAuthHandlerFromString(
tests[i].challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin,
- BoundNetLog(), &handler);
+ NetLogWithSource(), &handler);
EXPECT_THAT(rv, IsOk());
ASSERT_TRUE(handler != NULL);
@@ -555,7 +555,7 @@
SSLInfo null_ssl_info;
int rv = factory->CreateAuthHandlerFromString(
default_challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin,
- BoundNetLog(), &handler);
+ NetLogWithSource(), &handler);
EXPECT_THAT(rv, IsOk());
ASSERT_TRUE(handler.get() != NULL);
HttpAuthChallengeTokenizer tok_default(default_challenge.begin(),
diff --git a/net/http/http_auth_handler_factory.cc b/net/http/http_auth_handler_factory.cc
index 8f71562..5a48aa22 100644
--- a/net/http/http_auth_handler_factory.cc
+++ b/net/http/http_auth_handler_factory.cc
@@ -28,7 +28,7 @@
HttpAuth::Target target,
const SSLInfo& ssl_info,
const GURL& origin,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
HttpAuthChallengeTokenizer props(challenge.begin(), challenge.end());
return CreateAuthHandler(&props, target, ssl_info, origin, CREATE_CHALLENGE,
@@ -40,7 +40,7 @@
HttpAuth::Target target,
const GURL& origin,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
HttpAuthChallengeTokenizer props(challenge.begin(), challenge.end());
SSLInfo null_ssl_info;
@@ -170,7 +170,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
std::string scheme = challenge->scheme();
if (scheme.empty()) {
diff --git a/net/http/http_auth_handler_factory.h b/net/http/http_auth_handler_factory.h
index f17adc57..97275ea 100644
--- a/net/http/http_auth_handler_factory.h
+++ b/net/http/http_auth_handler_factory.h
@@ -19,7 +19,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class HttpAuthPreferences;
class HostResolver;
class HttpAuthChallengeTokenizer;
@@ -88,7 +88,7 @@
const GURL& origin,
CreateReason create_reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) = 0;
// Creates an HTTP authentication handler based on the authentication
@@ -100,7 +100,7 @@
HttpAuth::Target target,
const SSLInfo& ssl_info,
const GURL& origin,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler);
// Creates an HTTP authentication handler based on the authentication
@@ -113,7 +113,7 @@
HttpAuth::Target target,
const GURL& origin,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler);
// Creates a standard HttpAuthHandlerRegistryFactory. The caller is
@@ -186,7 +186,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override;
private:
diff --git a/net/http/http_auth_handler_factory_unittest.cc b/net/http/http_auth_handler_factory_unittest.cc
index 3c52b2d..683234f 100644
--- a/net/http/http_auth_handler_factory_unittest.cc
+++ b/net/http/http_auth_handler_factory_unittest.cc
@@ -36,7 +36,7 @@
const GURL& origin,
CreateReason reason,
int nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override {
handler->reset();
return return_code_;
@@ -70,42 +70,42 @@
EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME,
registry_factory.CreateAuthHandlerFromString(
"Basic", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
- BoundNetLog(), &handler));
+ NetLogWithSource(), &handler));
// Test what happens with a single scheme.
registry_factory.RegisterSchemeFactory("Basic", mock_factory_basic);
EXPECT_EQ(kBasicReturnCode, registry_factory.CreateAuthHandlerFromString(
"Basic", HttpAuth::AUTH_SERVER, null_ssl_info,
- gurl, BoundNetLog(), &handler));
+ gurl, NetLogWithSource(), &handler));
EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME,
registry_factory.CreateAuthHandlerFromString(
"Digest", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
- BoundNetLog(), &handler));
+ NetLogWithSource(), &handler));
// Test multiple schemes
registry_factory.RegisterSchemeFactory("Digest", mock_factory_digest);
EXPECT_EQ(kBasicReturnCode, registry_factory.CreateAuthHandlerFromString(
"Basic", HttpAuth::AUTH_SERVER, null_ssl_info,
- gurl, BoundNetLog(), &handler));
+ gurl, NetLogWithSource(), &handler));
EXPECT_EQ(kDigestReturnCode,
registry_factory.CreateAuthHandlerFromString(
"Digest", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
- BoundNetLog(), &handler));
+ NetLogWithSource(), &handler));
// Test case-insensitivity
EXPECT_EQ(kBasicReturnCode, registry_factory.CreateAuthHandlerFromString(
"basic", HttpAuth::AUTH_SERVER, null_ssl_info,
- gurl, BoundNetLog(), &handler));
+ gurl, NetLogWithSource(), &handler));
// Test replacement of existing auth scheme
registry_factory.RegisterSchemeFactory("Digest", mock_factory_digest_replace);
EXPECT_EQ(kBasicReturnCode, registry_factory.CreateAuthHandlerFromString(
"Basic", HttpAuth::AUTH_SERVER, null_ssl_info,
- gurl, BoundNetLog(), &handler));
+ gurl, NetLogWithSource(), &handler));
EXPECT_EQ(kDigestReturnCodeReplace,
registry_factory.CreateAuthHandlerFromString(
"Digest", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
- BoundNetLog(), &handler));
+ NetLogWithSource(), &handler));
}
TEST(HttpAuthHandlerFactoryTest, DefaultFactory) {
@@ -122,7 +122,7 @@
std::unique_ptr<HttpAuthHandler> handler;
int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
"Basic realm=\"FooBar\"", HttpAuth::AUTH_SERVER, null_ssl_info,
- server_origin, BoundNetLog(), &handler);
+ server_origin, NetLogWithSource(), &handler);
EXPECT_THAT(rv, IsOk());
ASSERT_FALSE(handler.get() == NULL);
EXPECT_EQ(HttpAuth::AUTH_SCHEME_BASIC, handler->auth_scheme());
@@ -135,7 +135,7 @@
std::unique_ptr<HttpAuthHandler> handler;
int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
"UNSUPPORTED realm=\"FooBar\"", HttpAuth::AUTH_SERVER, null_ssl_info,
- server_origin, BoundNetLog(), &handler);
+ server_origin, NetLogWithSource(), &handler);
EXPECT_THAT(rv, IsError(ERR_UNSUPPORTED_AUTH_SCHEME));
EXPECT_TRUE(handler.get() == NULL);
}
@@ -143,7 +143,7 @@
std::unique_ptr<HttpAuthHandler> handler;
int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
"Digest realm=\"FooBar\", nonce=\"xyz\"", HttpAuth::AUTH_PROXY,
- null_ssl_info, proxy_origin, BoundNetLog(), &handler);
+ null_ssl_info, proxy_origin, NetLogWithSource(), &handler);
EXPECT_THAT(rv, IsOk());
ASSERT_FALSE(handler.get() == NULL);
EXPECT_EQ(HttpAuth::AUTH_SCHEME_DIGEST, handler->auth_scheme());
@@ -156,7 +156,7 @@
std::unique_ptr<HttpAuthHandler> handler;
int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
"NTLM", HttpAuth::AUTH_SERVER, null_ssl_info, server_origin,
- BoundNetLog(), &handler);
+ NetLogWithSource(), &handler);
EXPECT_THAT(rv, IsOk());
ASSERT_FALSE(handler.get() == NULL);
EXPECT_EQ(HttpAuth::AUTH_SCHEME_NTLM, handler->auth_scheme());
@@ -169,7 +169,7 @@
std::unique_ptr<HttpAuthHandler> handler;
int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
"Negotiate", HttpAuth::AUTH_SERVER, null_ssl_info, server_origin,
- BoundNetLog(), &handler);
+ NetLogWithSource(), &handler);
// Note the default factory doesn't support Kerberos on Android
#if defined(USE_KERBEROS) && !defined(OS_ANDROID)
EXPECT_THAT(rv, IsOk());
diff --git a/net/http/http_auth_handler_mock.cc b/net/http/http_auth_handler_mock.cc
index 073e71c..ba0f68a 100644
--- a/net/http/http_auth_handler_mock.cc
+++ b/net/http/http_auth_handler_mock.cc
@@ -173,7 +173,7 @@
const GURL& origin,
CreateReason reason,
int nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
if (handlers_[target].empty())
return ERR_UNEXPECTED;
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h
index 06546af..049b880 100644
--- a/net/http/http_auth_handler_mock.h
+++ b/net/http/http_auth_handler_mock.h
@@ -49,7 +49,7 @@
const GURL& origin,
CreateReason reason,
int nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override;
private:
diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc
index dd43eb3..514527b0 100644
--- a/net/http/http_auth_handler_negotiate.cc
+++ b/net/http/http_auth_handler_negotiate.cc
@@ -63,7 +63,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
#if defined(OS_WIN)
if (is_unsupported_ || reason == CREATE_PREEMPTIVE)
diff --git a/net/http/http_auth_handler_negotiate.h b/net/http/http_auth_handler_negotiate.h
index 957b218..17c7d51 100644
--- a/net/http/http_auth_handler_negotiate.h
+++ b/net/http/http_auth_handler_negotiate.h
@@ -66,7 +66,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override;
private:
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc
index 4c26a9b..190771e 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -216,8 +216,8 @@
std::unique_ptr<HttpAuthHandler> generic_handler;
SSLInfo null_ssl_info;
int rv = factory_->CreateAuthHandlerFromString(
- "Negotiate", HttpAuth::AUTH_SERVER, null_ssl_info, gurl, BoundNetLog(),
- &generic_handler);
+ "Negotiate", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
+ NetLogWithSource(), &generic_handler);
if (rv != OK)
return rv;
HttpAuthHandlerNegotiate* negotiate_handler =
@@ -381,10 +381,7 @@
GURL gurl("http://www.example.com");
std::unique_ptr<HttpAuthHandler> generic_handler;
int rv = negotiate_factory->CreateAuthHandlerFromString(
- "Negotiate",
- HttpAuth::AUTH_SERVER,
- gurl,
- BoundNetLog(),
+ "Negotiate", HttpAuth::AUTH_SERVER, gurl, NetLogWithSource(),
&generic_handler);
EXPECT_THAT(rv, IsError(ERR_UNSUPPORTED_AUTH_SCHEME));
EXPECT_TRUE(generic_handler.get() == NULL);
diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h
index d1d2314f..df5e098 100644
--- a/net/http/http_auth_handler_ntlm.h
+++ b/net/http/http_auth_handler_ntlm.h
@@ -49,7 +49,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override;
#if defined(NTLM_SSPI)
// Set the SSPILibrary to use. Typically the only callers which need to use
diff --git a/net/http/http_auth_handler_ntlm_portable.cc b/net/http/http_auth_handler_ntlm_portable.cc
index 5c4e0100..487e89cc 100644
--- a/net/http/http_auth_handler_ntlm_portable.cc
+++ b/net/http/http_auth_handler_ntlm_portable.cc
@@ -718,7 +718,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
if (reason == CREATE_PREEMPTIVE)
return ERR_UNSUPPORTED_AUTH_SCHEME;
diff --git a/net/http/http_auth_handler_ntlm_win.cc b/net/http/http_auth_handler_ntlm_win.cc
index c069f736..70f8d317 100644
--- a/net/http/http_auth_handler_ntlm_win.cc
+++ b/net/http/http_auth_handler_ntlm_win.cc
@@ -54,7 +54,7 @@
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) {
if (is_unsupported_ || reason == CREATE_PREEMPTIVE)
return ERR_UNSUPPORTED_AUTH_SCHEME;
diff --git a/net/http/http_auth_handler_unittest.cc b/net/http/http_auth_handler_unittest.cc
index 2055032..b684cb2 100644
--- a/net/http/http_auth_handler_unittest.cc
+++ b/net/http/http_auth_handler_unittest.cc
@@ -43,12 +43,12 @@
challenge.begin(), challenge.end());
HttpAuthHandlerMock mock_handler;
TestNetLog test_net_log;
- BoundNetLog bound_net_log(
- BoundNetLog::Make(&test_net_log, NetLogSourceType::NONE));
+ NetLogWithSource net_log(
+ NetLogWithSource::Make(&test_net_log, NetLogSourceType::NONE));
SSLInfo empty_ssl_info;
mock_handler.InitFromChallenge(&tokenizer, target, empty_ssl_info,
- origin, bound_net_log);
+ origin, net_log);
mock_handler.SetGenerateExpectation(async, rv);
mock_handler.GenerateAuthToken(&credentials, &request,
test_callback.callback(), &auth_token);
diff --git a/net/http/http_auth_unittest.cc b/net/http/http_auth_unittest.cc
index ca9410f..e093588 100644
--- a/net/http/http_auth_unittest.cc
+++ b/net/http/http_auth_unittest.cc
@@ -36,8 +36,9 @@
challenge_text.end());
GURL origin("www.example.com");
SSLInfo null_ssl_info;
- EXPECT_TRUE(auth_handler->InitFromChallenge(
- &challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin, BoundNetLog()));
+ EXPECT_TRUE(auth_handler->InitFromChallenge(&challenge, HttpAuth::AUTH_SERVER,
+ null_ssl_info, origin,
+ NetLogWithSource()));
return auth_handler;
}
@@ -138,7 +139,8 @@
std::unique_ptr<HttpAuthHandler> handler;
HttpAuth::ChooseBestChallenge(http_auth_handler_factory.get(), *headers,
null_ssl_info, HttpAuth::AUTH_SERVER, origin,
- disabled_schemes, BoundNetLog(), &handler);
+ disabled_schemes, NetLogWithSource(),
+ &handler);
if (handler.get()) {
EXPECT_EQ(tests[i].challenge_scheme, handler->auth_scheme());
diff --git a/net/http/http_basic_state.cc b/net/http/http_basic_state.cc
index 598b0d9..3e7b63e 100644
--- a/net/http/http_basic_state.cc
+++ b/net/http/http_basic_state.cc
@@ -31,7 +31,7 @@
int HttpBasicState::Initialize(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) {
DCHECK(!parser_.get());
request_info_ = request_info;
diff --git a/net/http/http_basic_state.h b/net/http/http_basic_state.h
index f8f1ca5..ddba1122 100644
--- a/net/http/http_basic_state.h
+++ b/net/http/http_basic_state.h
@@ -19,7 +19,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class ClientSocketHandle;
class GrowableIOBuffer;
class HttpStreamParser;
@@ -35,7 +35,7 @@
// Initialize() must be called before using any of the other methods.
int Initialize(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback);
HttpStreamParser* parser() const { return parser_.get(); }
diff --git a/net/http/http_basic_state_unittest.cc b/net/http/http_basic_state_unittest.cc
index cf0fcde..5c4c8e4 100644
--- a/net/http/http_basic_state_unittest.cc
+++ b/net/http/http_basic_state_unittest.cc
@@ -45,16 +45,16 @@
TEST(HttpBasicStateTest, InitializeWorks) {
HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false, false);
const HttpRequestInfo request_info;
- EXPECT_EQ(OK,
- state.Initialize(
- &request_info, LOW, BoundNetLog(), CompletionCallback()));
+ EXPECT_EQ(OK, state.Initialize(&request_info, LOW, NetLogWithSource(),
+ CompletionCallback()));
EXPECT_TRUE(state.parser());
}
TEST(HttpBasicStateTest, DeleteParser) {
HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false, false);
const HttpRequestInfo request_info;
- state.Initialize(&request_info, LOW, BoundNetLog(), CompletionCallback());
+ state.Initialize(&request_info, LOW, NetLogWithSource(),
+ CompletionCallback());
EXPECT_TRUE(state.parser());
state.DeleteParser();
EXPECT_EQ(NULL, state.parser());
@@ -67,7 +67,8 @@
HttpRequestInfo request_info;
request_info.url = GURL("http://www.example.com/path?foo=bar#hoge");
request_info.method = "PUT";
- state.Initialize(&request_info, LOW, BoundNetLog(), CompletionCallback());
+ state.Initialize(&request_info, LOW, NetLogWithSource(),
+ CompletionCallback());
EXPECT_EQ("PUT /path?foo=bar HTTP/1.1\r\n", state.GenerateRequestLine());
}
@@ -78,7 +79,8 @@
HttpRequestInfo request_info;
request_info.url = GURL("http://www.example.com/path?foo=bar#hoge");
request_info.method = "PUT";
- state.Initialize(&request_info, LOW, BoundNetLog(), CompletionCallback());
+ state.Initialize(&request_info, LOW, NetLogWithSource(),
+ CompletionCallback());
EXPECT_EQ("PUT http://www.example.com/path?foo=bar HTTP/1.1\r\n",
state.GenerateRequestLine());
}
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc
index fb31dc4a..c805d7c 100644
--- a/net/http/http_basic_stream.cc
+++ b/net/http/http_basic_stream.cc
@@ -24,7 +24,7 @@
int HttpBasicStream::InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) {
state_.Initialize(request_info, priority, net_log, callback);
return OK;
diff --git a/net/http/http_basic_stream.h b/net/http/http_basic_stream.h
index 1f3c419..d99c023 100644
--- a/net/http/http_basic_stream.h
+++ b/net/http/http_basic_stream.h
@@ -21,7 +21,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class ClientSocketHandle;
class HttpResponseInfo;
struct HttpRequestInfo;
@@ -41,7 +41,7 @@
// HttpStream methods:
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override;
int SendRequest(const HttpRequestHeaders& headers,
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 31f4d2a5..d417a4a 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -240,7 +240,7 @@
int rv = transaction_->Start(
&request_info_,
base::Bind(&MetadataWriter::OnIOComplete, base::Unretained(this)),
- BoundNetLog());
+ NetLogWithSource());
if (rv != ERR_IO_PENDING)
VerifyResponse(rv);
}
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 8e846dd..1109432 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -249,13 +249,13 @@
return LOAD_STATE_WAITING_FOR_CACHE;
}
-const BoundNetLog& HttpCache::Transaction::net_log() const {
+const NetLogWithSource& HttpCache::Transaction::net_log() const {
return net_log_;
}
int HttpCache::Transaction::Start(const HttpRequestInfo* request,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(request);
DCHECK(!callback.is_null());
@@ -1836,7 +1836,7 @@
//-----------------------------------------------------------------------------
-void HttpCache::Transaction::SetRequest(const BoundNetLog& net_log,
+void HttpCache::Transaction::SetRequest(const NetLogWithSource& net_log,
const HttpRequestInfo* request) {
net_log_ = net_log;
request_ = request;
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index 5be7b52..1ce2be9 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -117,7 +117,7 @@
const CompletionCallback& io_callback() { return io_callback_; }
- const BoundNetLog& net_log() const;
+ const NetLogWithSource& net_log() const;
// Bypasses the cache lock whenever there is lock contention.
void BypassLockForTest() {
@@ -132,7 +132,7 @@
// HttpTransaction methods:
int Start(const HttpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
int RestartIgnoringLastError(const CompletionCallback& callback) override;
int RestartWithCertificate(X509Certificate* client_cert,
SSLPrivateKey* client_private_key,
@@ -293,7 +293,8 @@
int DoCacheWriteTruncatedResponseComplete(int result);
// Sets request_ and fields derived from it.
- void SetRequest(const BoundNetLog& net_log, const HttpRequestInfo* request);
+ void SetRequest(const NetLogWithSource& net_log,
+ const HttpRequestInfo* request);
// Returns true if the request should be handled exclusively by the network
// layer (skipping the cache entirely).
@@ -431,7 +432,7 @@
State next_state_;
const HttpRequestInfo* request_;
RequestPriority priority_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
std::unique_ptr<HttpRequestInfo> custom_request_;
HttpRequestHeaders request_headers_copy_;
// If extra_headers specified a "if-modified-since" or "if-none-match",
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index ab585d1..022b233 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -150,7 +150,7 @@
const MockTransaction& trans_info,
const MockHttpRequest& request,
HttpResponseInfo* response_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
LoadTimingInfo* load_timing_info,
int64_t* sent_bytes,
int64_t* received_bytes,
@@ -202,12 +202,13 @@
const MockHttpRequest& request,
HttpResponseInfo* response_info) {
RunTransactionTestBase(cache, trans_info, request, response_info,
- BoundNetLog(), nullptr, nullptr, nullptr, nullptr);
+ NetLogWithSource(), nullptr, nullptr, nullptr,
+ nullptr);
}
void RunTransactionTestAndGetTiming(HttpCache* cache,
const MockTransaction& trans_info,
- const BoundNetLog& log,
+ const NetLogWithSource& log,
LoadTimingInfo* load_timing_info) {
RunTransactionTestBase(cache, trans_info, MockHttpRequest(trans_info),
nullptr, log, load_timing_info, nullptr, nullptr,
@@ -217,7 +218,7 @@
void RunTransactionTestAndGetTimingAndConnectedSocketAddress(
HttpCache* cache,
const MockTransaction& trans_info,
- const BoundNetLog& log,
+ const NetLogWithSource& log,
LoadTimingInfo* load_timing_info,
IPEndPoint* remote_endpoint) {
RunTransactionTestBase(cache, trans_info, MockHttpRequest(trans_info),
@@ -226,12 +227,13 @@
}
void RunTransactionTest(HttpCache* cache, const MockTransaction& trans_info) {
- RunTransactionTestAndGetTiming(cache, trans_info, BoundNetLog(), nullptr);
+ RunTransactionTestAndGetTiming(cache, trans_info, NetLogWithSource(),
+ nullptr);
}
void RunTransactionTestWithLog(HttpCache* cache,
const MockTransaction& trans_info,
- const BoundNetLog& log) {
+ const NetLogWithSource& log) {
RunTransactionTestAndGetTiming(cache, trans_info, log, nullptr);
}
@@ -246,7 +248,7 @@
HttpCache* cache,
const MockTransaction& trans_info,
HttpResponseInfo* response,
- const BoundNetLog& log,
+ const NetLogWithSource& log,
LoadTimingInfo* load_timing_info) {
RunTransactionTestBase(cache, trans_info, MockHttpRequest(trans_info),
response, log, load_timing_info, nullptr, nullptr,
@@ -265,7 +267,7 @@
HttpCache* cache,
const MockTransaction& trans_info,
std::string* response_headers,
- const BoundNetLog& log,
+ const NetLogWithSource& log,
LoadTimingInfo* load_timing_info) {
HttpResponseInfo response;
RunTransactionTestBase(cache, trans_info, MockHttpRequest(trans_info),
@@ -735,7 +737,7 @@
scoped_refptr<IOBuffer> buffer(new IOBuffer(kBufferSize));
ReleaseBufferCompletionCallback cb(buffer.get());
- int rv = trans->Start(&request, cb.callback(), BoundNetLog());
+ int rv = trans->Start(&request, cb.callback(), NetLogWithSource());
EXPECT_THAT(cb.GetResult(rv), IsOk());
rv = trans->Read(buffer.get(), kBufferSize, cb.callback());
@@ -773,7 +775,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = c->callback.WaitForResult();
@@ -819,7 +821,7 @@
ASSERT_THAT(rv, IsOk());
MockHttpRequest request(kSimpleGET_Transaction);
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(c->callback.GetResult(rv), IsOk());
// Now verify that the entry was removed from the cache.
@@ -921,7 +923,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsError(ERR_CACHE_MISS));
@@ -1039,7 +1041,7 @@
int rv = cache.http_cache()->CreateTransaction(DEFAULT_PRIORITY, &trans);
EXPECT_THAT(rv, IsOk());
ASSERT_TRUE(trans.get());
- rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsError(ERR_FAILED));
const HttpResponseInfo* response_info = trans->GetResponseInfo();
@@ -1282,7 +1284,7 @@
EXPECT_EQ(LOAD_STATE_IDLE, c->trans->GetLoadState());
c->result =
- c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
}
// All requests are waiting for the active entry.
@@ -1352,8 +1354,8 @@
if (i == 1 || i == 2)
this_request = &reader_request;
- c->result =
- c->trans->Start(this_request, c->callback.callback(), BoundNetLog());
+ c->result = c->trans->Start(this_request, c->callback.callback(),
+ NetLogWithSource());
}
// Allow all requests to move from the Create queue to the active entry.
@@ -1436,8 +1438,8 @@
if (i == 3)
this_request = &writer_request;
- c->result =
- c->trans->Start(this_request, c->callback.callback(), BoundNetLog());
+ c->result = c->trans->Start(this_request, c->callback.callback(),
+ NetLogWithSource());
}
// The first request should be a writer at this point, and the two subsequent
@@ -1480,7 +1482,7 @@
ASSERT_THAT(c->result, IsOk());
c->result =
- c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
}
// Allow all requests to move from the Create queue to the active entry.
@@ -1527,7 +1529,7 @@
ASSERT_THAT(c->result, IsOk());
c->result =
- c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
}
// Allow all requests to move from the Create queue to the active entry.
@@ -1587,7 +1589,7 @@
ASSERT_THAT(c->result, IsOk());
c->result =
- c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
}
// The first request should be creating the disk cache entry and the others
@@ -1637,7 +1639,8 @@
c->result = cache.CreateTransaction(&c->trans);
ASSERT_THAT(c->result, IsOk());
- c->result = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->result =
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(c->result, IsError(ERR_IO_PENDING));
// Release the reference that the mock disk cache keeps for this entry, so
@@ -1667,7 +1670,7 @@
ASSERT_THAT(c->result, IsOk());
c->result =
- c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
}
// The first request should be deleting the disk cache entry and the others
@@ -1704,11 +1707,11 @@
MockHttpRequest request(kSimpleGET_Transaction);
Context c1, c2;
ASSERT_THAT(cache.CreateTransaction(&c1.trans), IsOk());
- ASSERT_EQ(ERR_IO_PENDING,
- c1.trans->Start(&request, c1.callback.callback(), BoundNetLog()));
+ ASSERT_EQ(ERR_IO_PENDING, c1.trans->Start(&request, c1.callback.callback(),
+ NetLogWithSource()));
ASSERT_THAT(cache.CreateTransaction(&c2.trans), IsOk());
- ASSERT_EQ(ERR_IO_PENDING,
- c2.trans->Start(&request, c2.callback.callback(), BoundNetLog()));
+ ASSERT_EQ(ERR_IO_PENDING, c2.trans->Start(&request, c2.callback.callback(),
+ NetLogWithSource()));
// The second request is queued after the first one.
@@ -1731,7 +1734,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsOk());
@@ -1768,7 +1771,7 @@
ASSERT_THAT(c->result, IsOk());
c->result =
- c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
}
// The first request should be creating the disk cache entry and the others
@@ -1808,11 +1811,11 @@
}
context_list[0]->result = context_list[0]->trans->Start(
- &request0, context_list[0]->callback.callback(), BoundNetLog());
+ &request0, context_list[0]->callback.callback(), NetLogWithSource());
context_list[1]->result = context_list[1]->trans->Start(
- &request1, context_list[1]->callback.callback(), BoundNetLog());
+ &request1, context_list[1]->callback.callback(), NetLogWithSource());
context_list[2]->result = context_list[2]->trans->Start(
- &request2, context_list[2]->callback.callback(), BoundNetLog());
+ &request2, context_list[2]->callback.callback(), NetLogWithSource());
// Just to make sure that everything is still pending.
base::RunLoop().RunUntilIdle();
@@ -1854,11 +1857,11 @@
}
context_list[0]->result = context_list[0]->trans->Start(
- &request0, context_list[0]->callback.callback(), BoundNetLog());
+ &request0, context_list[0]->callback.callback(), NetLogWithSource());
context_list[1]->result = context_list[1]->trans->Start(
- &request1, context_list[1]->callback.callback(), BoundNetLog());
+ &request1, context_list[1]->callback.callback(), NetLogWithSource());
context_list[2]->result = context_list[2]->trans->Start(
- &request2, context_list[2]->callback.callback(), BoundNetLog());
+ &request2, context_list[2]->callback.callback(), NetLogWithSource());
// Just to make sure that everything is still pending.
base::RunLoop().RunUntilIdle();
@@ -1899,7 +1902,7 @@
c->result = cache->CreateTransaction(&c->trans);
ASSERT_THAT(c->result, IsOk());
- c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
// Just to make sure that everything is still pending.
base::RunLoop().RunUntilIdle();
@@ -1937,7 +1940,7 @@
c->result = cache->CreateTransaction(&c->trans);
ASSERT_THAT(c->result, IsOk());
- c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
// And another direct backend request.
TestCompletionCallback cb2;
@@ -2915,7 +2918,7 @@
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
ASSERT_TRUE(trans.get());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
ASSERT_THAT(callback.GetResult(rv), IsError(ERR_CACHE_MISS));
trans.reset();
@@ -3170,7 +3173,7 @@
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
ASSERT_TRUE(trans.get());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
ASSERT_THAT(callback.GetResult(rv), IsError(ERR_CACHE_MISS));
trans.reset();
@@ -5173,7 +5176,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = c->callback.WaitForResult();
@@ -5218,7 +5221,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = c->callback.WaitForResult();
@@ -5263,7 +5266,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = c->callback.WaitForResult();
@@ -5290,7 +5293,7 @@
rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
MockDiskEntry::IgnoreCallbacks(true);
@@ -5566,7 +5569,7 @@
EXPECT_THAT(rv, IsOk());
ASSERT_TRUE(trans.get());
- rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsError(ERR_CACHE_MISS));
@@ -5643,7 +5646,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
c->result = c->callback.WaitForResult();
@@ -5673,7 +5676,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = c->callback.WaitForResult();
@@ -5716,7 +5719,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = c->callback.WaitForResult();
@@ -5759,7 +5762,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = c->callback.WaitForResult();
@@ -5811,7 +5814,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(c->callback.GetResult(rv), IsOk());
// Read everything.
@@ -5840,7 +5843,7 @@
EXPECT_THAT(rv, IsOk());
TestCompletionCallback cb;
- rv = trans->Start(request.get(), cb.callback(), BoundNetLog());
+ rv = trans->Start(request.get(), cb.callback(), NetLogWithSource());
EXPECT_EQ(0, cb.GetResult(rv));
scoped_refptr<IOBuffer> buf(new IOBuffer(10));
@@ -5867,7 +5870,7 @@
EXPECT_THAT(rv, IsOk());
TestCompletionCallback cb;
- rv = trans->Start(request.get(), cb.callback(), BoundNetLog());
+ rv = trans->Start(request.get(), cb.callback(), NetLogWithSource());
EXPECT_EQ(0, cb.GetResult(rv));
scoped_refptr<IOBuffer> buf(new IOBuffer(10));
@@ -5994,10 +5997,10 @@
Context* pending = new Context();
ASSERT_THAT(cache.CreateTransaction(&pending->trans), IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_EQ(ERR_IO_PENDING,
pending->trans->Start(&request, pending->callback.callback(),
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_THAT(c->callback.GetResult(rv), IsOk());
// Make sure that the entry has some data stored.
@@ -6079,7 +6082,7 @@
ASSERT_THAT(rv, IsOk());
MockHttpRequest request(transaction);
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(c->callback.GetResult(rv), IsOk());
// We should have checked with the server before finishing Start().
@@ -6114,7 +6117,7 @@
ASSERT_THAT(rv, IsOk());
MockHttpRequest request(transaction);
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(c->callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = c->trans->GetResponseInfo();
@@ -6166,7 +6169,7 @@
MockHttpRequest request(transaction);
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = c->callback.WaitForResult();
std::string content;
@@ -6223,7 +6226,7 @@
int rv = cache.CreateTransaction(&c->trans);
ASSERT_THAT(rv, IsOk());
- rv = c->trans->Start(&request, c->callback.callback(), BoundNetLog());
+ rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
EXPECT_THAT(c->callback.GetResult(rv), IsOk());
// Read 20 bytes from the cache, and 10 from the net.
@@ -6290,13 +6293,13 @@
c2(DEFAULT_PRIORITY, cache.http_cache()),
c3(DEFAULT_PRIORITY, cache.http_cache());
- c1.Start(&r1, BoundNetLog());
+ c1.Start(&r1, NetLogWithSource());
r2.load_flags |= LOAD_ONLY_FROM_CACHE;
- c2.Start(&r2, BoundNetLog());
+ c2.Start(&r2, NetLogWithSource());
r3.load_flags |= LOAD_ONLY_FROM_CACHE;
- c3.Start(&r3, BoundNetLog());
+ c3.Start(&r3, NetLogWithSource());
base::RunLoop().Run();
@@ -6342,7 +6345,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsOk());
@@ -6376,7 +6379,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsOk());
@@ -6557,7 +6560,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsError(ERR_CACHE_MISS));
@@ -6812,7 +6815,7 @@
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
MockHttpRequest request(kSimpleGET_Transaction);
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
scoped_refptr<IOBuffer> buf(new IOBuffer(256));
@@ -6848,7 +6851,7 @@
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
MockHttpRequest request(transaction);
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
trans->DoneReading();
@@ -6875,7 +6878,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
scoped_refptr<IOBuffer> buf(new IOBuffer(256));
@@ -6913,7 +6916,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
scoped_refptr<IOBuffer> buf(new IOBuffer(256));
@@ -6956,7 +6959,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
trans->StopCaching();
@@ -6995,7 +6998,7 @@
"Content-Length: 42\n"
"Etag: \"foo\"\n";
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
scoped_refptr<IOBuffer> buf(new IOBuffer(256));
@@ -7036,7 +7039,7 @@
std::unique_ptr<HttpTransaction> trans;
ASSERT_THAT(cache.CreateTransaction(&trans), IsOk());
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
scoped_refptr<IOBuffer> buf(new IOBuffer(256));
@@ -7291,7 +7294,7 @@
}
rv = http_transaction->Start(&request, callback.callback(),
- net::BoundNetLog());
+ NetLogWithSource());
rv = callback.GetResult(rv);
ASSERT_EQ(net::OK, rv);
@@ -7389,7 +7392,7 @@
info.url = GURL(kSimpleGET_Transaction.url);
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans->Start(&info, callback.callback(), BoundNetLog()));
+ trans->Start(&info, callback.callback(), NetLogWithSource()));
EXPECT_TRUE(cache.network_layer()->last_transaction());
if (cache.network_layer()->last_transaction()) {
@@ -7422,7 +7425,7 @@
info.url = GURL(kSimpleGET_Transaction.url);
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans->Start(&info, callback.callback(), BoundNetLog()));
+ trans->Start(&info, callback.callback(), NetLogWithSource()));
ASSERT_TRUE(cache.network_layer()->last_transaction());
EXPECT_FALSE(cache.network_layer()->last_transaction()->
@@ -7461,7 +7464,7 @@
MockHttpRequest info(transaction);
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans->Start(&info, callback.callback(), BoundNetLog()));
+ trans->Start(&info, callback.callback(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
EXPECT_EQ(MEDIUM, cache.network_layer()->last_create_transaction_priority());
@@ -7482,9 +7485,9 @@
const MockTransaction& trans_info,
int64_t* sent_bytes,
int64_t* received_bytes) {
- RunTransactionTestBase(cache.http_cache(), trans_info,
- MockHttpRequest(trans_info), nullptr, BoundNetLog(),
- nullptr, sent_bytes, received_bytes, nullptr);
+ RunTransactionTestBase(
+ cache.http_cache(), trans_info, MockHttpRequest(trans_info), nullptr,
+ NetLogWithSource(), nullptr, sent_bytes, received_bytes, nullptr);
}
} // namespace
@@ -7852,7 +7855,7 @@
ASSERT_TRUE(trans.get());
// Start our transaction.
- trans->Start(&request, callback.callback(), BoundNetLog());
+ trans->Start(&request, callback.callback(), NetLogWithSource());
// A second transaction on a different part of the file (the default
// kRangeGET_TransactionOK requests 40-49) should not be blocked by
@@ -7879,8 +7882,8 @@
first->result = cache.CreateTransaction(&first->trans);
ASSERT_THAT(first->result, IsOk());
EXPECT_EQ(LOAD_STATE_IDLE, first->trans->GetLoadState());
- first->result =
- first->trans->Start(&request, first->callback.callback(), BoundNetLog());
+ first->result = first->trans->Start(&request, first->callback.callback(),
+ NetLogWithSource());
EXPECT_EQ(LOAD_STATE_WAITING_FOR_CACHE, first->trans->GetLoadState());
base::RunLoop().RunUntilIdle();
@@ -7896,7 +7899,7 @@
ASSERT_THAT(second->result, IsOk());
EXPECT_EQ(LOAD_STATE_IDLE, second->trans->GetLoadState());
second->result = second->trans->Start(&request, second->callback.callback(),
- BoundNetLog());
+ NetLogWithSource());
// Here the second transaction proceeds without reading the first body.
EXPECT_EQ(LOAD_STATE_WAITING_FOR_CACHE, second->trans->GetLoadState());
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc
index 3e27483..a7840c80 100644
--- a/net/http/http_network_layer_unittest.cc
+++ b/net/http/http_network_layer_unittest.cc
@@ -73,7 +73,7 @@
int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
EXPECT_THAT(rv, IsOk());
- rv = trans->Start(&request_info, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request_info, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsOk());
@@ -331,7 +331,7 @@
int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
EXPECT_THAT(rv, IsOk());
- rv = trans->Start(&request_info, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request_info, callback.callback(), NetLogWithSource());
rv = callback.GetResult(rv);
ASSERT_THAT(rv, IsOk());
@@ -370,7 +370,7 @@
int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
EXPECT_THAT(rv, IsOk());
- rv = trans->Start(&request_info, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request_info, callback.callback(), NetLogWithSource());
ASSERT_THAT(callback.GetResult(rv), IsOk());
EXPECT_TRUE(trans->GetResponseInfo()->network_accessed);
@@ -403,7 +403,7 @@
int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
EXPECT_THAT(rv, IsOk());
- rv = trans->Start(&request_info, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request_info, callback.callback(), NetLogWithSource());
ASSERT_THAT(callback.GetResult(rv), IsError(ERR_CONNECTION_RESET));
// network_accessed is true; the HTTP stack did try to make a connection.
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 7bf66239..b90930a 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -128,7 +128,7 @@
int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
net_log_ = net_log;
request_ = request_info;
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index cab2701f..7c20642 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -59,7 +59,7 @@
// HttpTransaction methods:
int Start(const HttpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
int RestartIgnoringLastError(const CompletionCallback& callback) override;
int RestartWithCertificate(X509Certificate* client_cert,
SSLPrivateKey* client_private_key,
@@ -310,7 +310,7 @@
HttpNetworkSession* session_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
const HttpRequestInfo* request_;
RequestPriority priority_;
HttpResponseInfo response_;
diff --git a/net/http/http_network_transaction_ssl_unittest.cc b/net/http/http_network_transaction_ssl_unittest.cc
index c0ca5f4..ba430b4 100644
--- a/net/http/http_network_transaction_ssl_unittest.cc
+++ b/net/http/http_network_transaction_ssl_unittest.cc
@@ -149,7 +149,7 @@
TestCompletionCallback callback;
int rv = callback.GetResult(
trans1.Start(GetRequestInfo("https://www.example.com/"),
- callback.callback(), BoundNetLog()));
+ callback.callback(), NetLogWithSource()));
EXPECT_THAT(rv, IsOk());
HttpRequestHeaders headers1;
@@ -167,7 +167,7 @@
rv = callback.GetResult(
trans2.Start(GetRequestInfo("https://www.example.com/"),
- callback.callback(), BoundNetLog()));
+ callback.callback(), NetLogWithSource()));
EXPECT_THAT(rv, IsOk());
HttpRequestHeaders headers2;
@@ -201,7 +201,7 @@
TestCompletionCallback callback;
int rv =
callback.GetResult(trans.Start(GetRequestInfo("http://www.example.com/"),
- callback.callback(), BoundNetLog()));
+ callback.callback(), NetLogWithSource()));
EXPECT_THAT(rv, IsOk());
HttpRequestHeaders headers;
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 2e726eda..c2e5c72 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -544,7 +544,7 @@
ClientSocketPool::RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
last_group_name_ = group_name;
return ERR_IO_PENDING;
}
@@ -726,7 +726,7 @@
request.method = "GET";
request.url = GURL("http://www.example.com:2000/");
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsError(ERR_INVALID_HTTP_RESPONSE));
}
@@ -749,7 +749,7 @@
request.method = "GET";
request.url = GURL("http://www.example.com:2000/");
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* info = trans->GetResponseInfo();
@@ -1051,7 +1051,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -1114,7 +1114,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -1173,7 +1173,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1224,7 +1224,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1265,7 +1265,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1301,7 +1301,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1330,7 +1330,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1396,7 +1396,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1516,7 +1516,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1642,7 +1642,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1700,7 +1700,7 @@
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1740,7 +1740,7 @@
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -1837,7 +1837,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
LoadTimingInfo load_timing_info;
@@ -1882,7 +1882,7 @@
TestCompletionCallback callback;
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = trans.GetResponseInfo();
ASSERT_TRUE(response);
@@ -1936,7 +1936,7 @@
std::unique_ptr<HttpNetworkTransaction> trans1(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans1->Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response1 = trans1->GetResponseInfo();
@@ -1958,7 +1958,7 @@
std::unique_ptr<HttpNetworkTransaction> trans2(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans2->Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2->Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response2 = trans2->GetResponseInfo();
@@ -2012,7 +2012,7 @@
std::unique_ptr<HttpNetworkTransaction> trans1(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans1->Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response1 = trans1->GetResponseInfo();
@@ -2034,7 +2034,7 @@
std::unique_ptr<HttpNetworkTransaction> trans2(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans2->Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2->Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response2 = trans2->GetResponseInfo();
@@ -2088,7 +2088,7 @@
std::unique_ptr<HttpNetworkTransaction> trans1(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans1->Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response1 = trans1->GetResponseInfo();
@@ -2110,7 +2110,7 @@
std::unique_ptr<HttpNetworkTransaction> trans2(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans2->Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2->Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response2 = trans2->GetResponseInfo();
@@ -2153,7 +2153,7 @@
std::unique_ptr<HttpNetworkTransaction> trans1(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans1->Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response1 = trans1->GetResponseInfo();
@@ -2234,7 +2234,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -2344,7 +2344,7 @@
TestCompletionCallback callback1;
EXPECT_EQ(OK, callback1.GetResult(trans.Start(&request, callback1.callback(),
- BoundNetLog())));
+ NetLogWithSource())));
LoadTimingInfo load_timing_info1;
EXPECT_TRUE(trans.GetLoadTimingInfo(&load_timing_info1));
@@ -2426,7 +2426,7 @@
session_deps_.socket_factory->AddSocketDataProvider(&data);
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -2495,7 +2495,7 @@
TestCompletionCallback callback1;
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
ASSERT_THAT(callback1.GetResult(rv), IsOk());
LoadTimingInfo load_timing_info1;
@@ -2586,7 +2586,7 @@
TestCompletionCallback callback1;
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -2668,7 +2668,7 @@
TestCompletionCallback callback1;
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -2755,7 +2755,7 @@
TestCompletionCallback callback1;
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -3440,7 +3440,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = trans.GetResponseInfo();
@@ -3500,7 +3500,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -3559,7 +3559,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -3615,7 +3615,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -3764,7 +3764,7 @@
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = trans->GetResponseInfo();
@@ -3884,7 +3884,7 @@
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = trans->GetResponseInfo();
@@ -3999,7 +3999,7 @@
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = trans->GetResponseInfo();
@@ -4098,7 +4098,7 @@
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = trans->GetResponseInfo();
@@ -4919,7 +4919,7 @@
TestCompletionCallback callback;
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
LoadTimingInfo load_timing_info;
@@ -4937,7 +4937,7 @@
EXPECT_EQ(1, callback.GetResult(rv));
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- rv = trans2.Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
LoadTimingInfo load_timing_info2;
@@ -5038,7 +5038,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -5060,7 +5060,7 @@
std::unique_ptr<HttpNetworkTransaction> trans2(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans2->Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2->Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -5138,7 +5138,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
LoadTimingInfo load_timing_info;
@@ -5159,7 +5159,7 @@
trans.reset();
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- rv = trans2.Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
LoadTimingInfo load_timing_info2;
@@ -5301,7 +5301,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -5571,7 +5571,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -5705,7 +5705,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -5884,7 +5884,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -5972,7 +5972,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -6018,7 +6018,7 @@
TestCompletionCallback callback1;
- int rv = trans->Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -6063,7 +6063,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -6125,7 +6125,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -6191,7 +6191,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -6219,7 +6219,7 @@
trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -6269,7 +6269,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.GetResult(rv), IsOk());
@@ -6340,7 +6340,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
EXPECT_EQ(0, GetIdleSocketCountInSSLSocketPool(session.get()));
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
@@ -6408,7 +6408,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -6506,7 +6506,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request[i], callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request[i], callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -6579,7 +6579,7 @@
session_deps_.socket_factory->AddSocketDataProvider(&data2);
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -6678,7 +6678,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -6767,7 +6767,7 @@
session_deps_.socket_factory->AddSocketDataProvider(&data3);
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -6847,7 +6847,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -6928,7 +6928,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -6993,7 +6993,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -7057,7 +7057,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -7149,7 +7149,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -7244,7 +7244,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -7307,7 +7307,7 @@
TestCompletionCallback callback1;
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -7398,7 +7398,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -7475,7 +7475,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -7538,7 +7538,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -7595,7 +7595,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -7674,7 +7674,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -7723,7 +7723,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -7775,7 +7775,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8262,7 +8262,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8312,7 +8312,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8350,7 +8350,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8390,7 +8390,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8427,7 +8427,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8464,7 +8464,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8499,7 +8499,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8538,7 +8538,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8576,7 +8576,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8614,7 +8614,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8656,7 +8656,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8701,7 +8701,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8764,7 +8764,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8822,7 +8822,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8893,7 +8893,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -8969,7 +8969,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -9028,7 +9028,7 @@
TestCompletionCallback callback;
// We do not complete this request, the dtor will clean the transaction up.
- return trans.Start(&request, callback.callback(), BoundNetLog());
+ return trans.Start(&request, callback.callback(), NetLogWithSource());
}
} // namespace
@@ -9247,7 +9247,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -9277,7 +9277,7 @@
int rv = session_deps_.host_resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.example.org", 80)),
DEFAULT_PRIORITY, &addrlist, callback.callback(), &request1,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -9288,7 +9288,7 @@
rv = session_deps_.host_resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.example.org", 80)),
DEFAULT_PRIORITY, &addrlist, callback.callback(), &request2,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_THAT(rv, IsOk());
// Inject a failure the next time that "www.example.org" is resolved. This way
@@ -9303,7 +9303,7 @@
session_deps_.socket_factory->AddSocketDataProvider(&data);
// Run the request.
- rv = trans.Start(&request_info, callback.callback(), BoundNetLog());
+ rv = trans.Start(&request_info, callback.callback(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -9345,7 +9345,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -9376,7 +9376,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -9453,7 +9453,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
@@ -9504,7 +9504,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -9530,7 +9530,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -9578,7 +9578,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -9621,7 +9621,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -9674,7 +9674,7 @@
session_deps_.socket_factory->AddSocketDataProvider(&data);
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
base::RunLoop().RunUntilIdle();
@@ -9779,7 +9779,7 @@
// Issue the first request with Authorize headers. There should be a
// password prompt for first_realm waiting to be filled in after the
// transaction completes.
- int rv = trans.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback1.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -9866,7 +9866,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
url::SchemeHostPort test_server(request.url);
@@ -9929,7 +9929,7 @@
http_server_properties->GetAlternativeServices(test_server);
EXPECT_TRUE(alternative_service_vector.empty());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -9991,7 +9991,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
// Alternative service is not used, request fails.
EXPECT_THAT(callback.GetResult(rv), IsError(ERR_CONNECTION_REFUSED));
}
@@ -10031,7 +10031,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
// Alternative service is not used, request fails.
EXPECT_THAT(callback.GetResult(rv), IsError(ERR_CONNECTION_REFUSED));
}
@@ -10073,7 +10073,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = trans.GetResponseInfo();
@@ -10117,7 +10117,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
url::SchemeHostPort test_server("https", "www.example.org", 443);
@@ -10205,7 +10205,7 @@
NetErrorDetails details;
EXPECT_FALSE(details.quic_broken);
- trans.Start(&request, callback.callback(), BoundNetLog());
+ trans.Start(&request, callback.callback(), NetLogWithSource());
trans.PopulateNetErrorDetails(&details);
EXPECT_TRUE(details.quic_broken);
}
@@ -10279,7 +10279,7 @@
NetErrorDetails details;
EXPECT_FALSE(details.quic_broken);
- trans.Start(&request, callback.callback(), BoundNetLog());
+ trans.Start(&request, callback.callback(), NetLogWithSource());
trans.PopulateNetErrorDetails(&details);
EXPECT_FALSE(details.quic_broken);
}
@@ -10324,7 +10324,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10388,8 +10388,8 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv =
- trans.Start(&restricted_port_request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&restricted_port_request, callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Invalid change to unrestricted port should fail.
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_CONNECTION_REFUSED));
@@ -10439,8 +10439,9 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- EXPECT_EQ(ERR_IO_PENDING, trans.Start(&restricted_port_request,
- callback.callback(), BoundNetLog()));
+ EXPECT_EQ(ERR_IO_PENDING,
+ trans.Start(&restricted_port_request, callback.callback(),
+ NetLogWithSource()));
// Change to unrestricted port should succeed.
EXPECT_THAT(callback.WaitForResult(), IsOk());
}
@@ -10488,8 +10489,8 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv =
- trans.Start(&restricted_port_request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&restricted_port_request, callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Valid change to restricted port should pass.
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10539,7 +10540,7 @@
TestCompletionCallback callback;
int rv = trans.Start(&unrestricted_port_request, callback.callback(),
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Valid change to restricted port should pass.
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10589,7 +10590,7 @@
TestCompletionCallback callback;
int rv = trans.Start(&unrestricted_port_request, callback.callback(),
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Valid change to an unrestricted port should pass.
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10630,7 +10631,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The HTTP request should succeed.
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10701,7 +10702,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10716,7 +10717,7 @@
trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10804,7 +10805,7 @@
TestCompletionCallback callback1;
HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get());
- int rv = trans1.Start(&request, callback1.callback(), BoundNetLog());
+ int rv = trans1.Start(&request, callback1.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback1.WaitForResult(), IsOk());
@@ -10819,12 +10820,12 @@
TestCompletionCallback callback2;
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- rv = trans2.Start(&request, callback2.callback(), BoundNetLog());
+ rv = trans2.Start(&request, callback2.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestCompletionCallback callback3;
HttpNetworkTransaction trans3(DEFAULT_PRIORITY, session.get());
- rv = trans3.Start(&request, callback3.callback(), BoundNetLog());
+ rv = trans3.Start(&request, callback3.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback2.WaitForResult(), IsOk());
@@ -10891,7 +10892,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10906,7 +10907,7 @@
trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -10930,7 +10931,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
ProxyServer proxy_server(ProxyServer::SCHEME_HTTP,
HostPortPair("myproxy", 80));
results->UseProxyServer(proxy_server);
@@ -11045,7 +11046,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
const HttpResponseInfo* response = trans.GetResponseInfo();
@@ -11142,7 +11143,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -11159,7 +11160,7 @@
trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -11234,7 +11235,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -11252,11 +11253,11 @@
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> spdy_session =
- CreateSecureSpdySession(session.get(), key, BoundNetLog());
+ CreateSecureSpdySession(session.get(), key, NetLogWithSource());
trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -11590,7 +11591,8 @@
HttpAuthChallengeTokenizer tokenizer(auth_challenge.begin(),
auth_challenge.end());
auth_handler->InitFromChallenge(&tokenizer, HttpAuth::AUTH_PROXY,
- empty_ssl_info, origin, BoundNetLog());
+ empty_ssl_info, origin,
+ NetLogWithSource());
auth_handler->SetGenerateExpectation(
test_config.proxy_auth_timing == AUTH_ASYNC,
test_config.proxy_auth_rv);
@@ -11604,7 +11606,8 @@
HttpAuthChallengeTokenizer tokenizer(auth_challenge.begin(),
auth_challenge.end());
auth_handler->InitFromChallenge(&tokenizer, HttpAuth::AUTH_SERVER,
- empty_ssl_info, origin, BoundNetLog());
+ empty_ssl_info, origin,
+ NetLogWithSource());
auth_handler->SetGenerateExpectation(
test_config.server_auth_timing == AUTH_ASYNC,
test_config.server_auth_rv);
@@ -11674,7 +11677,7 @@
TestCompletionCallback callback;
int rv;
if (round == 0) {
- rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ rv = trans.Start(&request, callback.callback(), NetLogWithSource());
} else {
rv = trans.RestartWithAuth(
AuthCredentials(kFoo, kBar), callback.callback());
@@ -11715,7 +11718,7 @@
auth_challenge.end());
SSLInfo empty_ssl_info;
auth_handler->InitFromChallenge(&tokenizer, HttpAuth::AUTH_SERVER,
- empty_ssl_info, origin, BoundNetLog());
+ empty_ssl_info, origin, NetLogWithSource());
auth_factory->AddMockHandler(auth_handler, HttpAuth::AUTH_SERVER);
int rv = OK;
@@ -11798,7 +11801,7 @@
// First round of authentication.
auth_handler->SetGenerateExpectation(false, OK);
- rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ rv = trans.Start(&request, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -11812,8 +11815,8 @@
// claimed.
HttpNetworkTransaction trans_compete(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback_compete;
- rv =
- trans_compete.Start(&request, callback_compete.callback(), BoundNetLog());
+ rv = trans_compete.Start(&request, callback_compete.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// callback_compete.WaitForResult at this point would stall forever,
// since the HttpNetworkTransaction does not release the request back to
@@ -11917,7 +11920,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -11965,7 +11968,7 @@
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_CONNECTION_CLOSED));
}
@@ -12063,7 +12066,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
callback.WaitForResult();
@@ -12384,7 +12387,7 @@
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> spdy_session =
- CreateInsecureSpdySession(session.get(), key, BoundNetLog());
+ CreateInsecureSpdySession(session.get(), key, NetLogWithSource());
HttpRequestInfo request;
request.method = "GET";
@@ -12397,7 +12400,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
}
@@ -12423,7 +12426,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
- int rv = trans.Start(&request_info, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request_info, callback.callback(), NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
ASSERT_EQ(error, rv);
@@ -12509,7 +12512,7 @@
// Begin the SSL handshake with the peer. This consumes ssl_data1.
TestCompletionCallback callback;
- int rv = trans.Start(&request_info, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request_info, callback.callback(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
// Complete the SSL handshake, which should abort due to requiring a
@@ -12625,7 +12628,7 @@
// Begin the initial SSL handshake.
TestCompletionCallback callback;
- int rv = trans.Start(&request_info, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request_info, callback.callback(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
// Complete the SSL handshake, which should abort due to requiring a
@@ -12717,7 +12720,7 @@
// Begin the SSL handshake with the proxy.
TestCompletionCallback callback;
- int rv = trans.Start(&requests[i], callback.callback(), BoundNetLog());
+ int rv = trans.Start(&requests[i], callback.callback(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
// Complete the SSL handshake, which should abort due to requiring a
@@ -12805,7 +12808,7 @@
request1.load_flags = 0;
HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get());
- int rv = trans1.Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans1.Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -12825,7 +12828,7 @@
std::unique_ptr<HostResolver::Request> request;
rv = session_deps_.host_resolver->Resolve(resolve_info, DEFAULT_PRIORITY,
&ignored, callback.callback(),
- &request, BoundNetLog());
+ &request, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -12836,7 +12839,7 @@
request2.load_flags = 0;
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- rv = trans2.Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -12894,7 +12897,7 @@
request1.load_flags = 0;
HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get());
- int rv = trans1.Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans1.Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -12913,7 +12916,7 @@
request2.load_flags = 0;
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- rv = trans2.Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -12941,14 +12944,14 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return host_resolver_.Resolve(
info, priority, addresses, callback, out_req, net_log);
}
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
int rv = host_resolver_.ResolveFromCache(info, addresses, net_log);
if (rv == OK && info.host_port_pair().Equals(host_port_))
host_resolver_.GetHostCache()->clear();
@@ -13012,7 +13015,7 @@
request1.load_flags = 0;
HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get());
- int rv = trans1.Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans1.Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -13030,7 +13033,7 @@
AddressList ignored;
std::unique_ptr<HostResolver::Request> request;
rv = host_resolver.Resolve(resolve_info, DEFAULT_PRIORITY, &ignored,
- callback.callback(), &request, BoundNetLog());
+ callback.callback(), &request, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -13041,7 +13044,7 @@
request2.load_flags = 0;
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- rv = trans2.Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -13110,7 +13113,7 @@
HttpNetworkTransaction trans1(LOWEST, session.get());
TestCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING,
- trans1.Start(&request1, callback1.callback(), BoundNetLog()));
+ trans1.Start(&request1, callback1.callback(), NetLogWithSource()));
base::RunLoop().RunUntilIdle();
EXPECT_THAT(callback1.WaitForResult(), IsOk());
@@ -13124,7 +13127,7 @@
HttpNetworkTransaction trans2(MEDIUM, session.get());
TestCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING,
- trans2.Start(&request2, callback2.callback(), BoundNetLog()));
+ trans2.Start(&request2, callback2.callback(), NetLogWithSource()));
base::RunLoop().RunUntilIdle();
EXPECT_THAT(callback2.WaitForResult(), IsOk());
@@ -13173,7 +13176,7 @@
// HTTP/2 (or SPDY) is required for alternative service, if HTTP/1.1 is
// negotiated, the alternate Job should fail with ERR_ALPN_NEGOTIATION_FAILED.
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsError(ERR_ALPN_NEGOTIATION_FAILED));
}
@@ -13240,7 +13243,7 @@
request1.load_flags = 0;
TestCompletionCallback callback1;
- int rv = trans1.Start(&request1, callback1.callback(), BoundNetLog());
+ int rv = trans1.Start(&request1, callback1.callback(), NetLogWithSource());
rv = callback1.GetResult(rv);
EXPECT_THAT(rv, IsOk());
@@ -13268,7 +13271,7 @@
request2.load_flags = 0;
TestCompletionCallback callback2;
- rv = trans2.Start(&request2, callback2.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback2.callback(), NetLogWithSource());
rv = callback2.GetResult(rv);
EXPECT_THAT(rv, IsOk());
@@ -13349,7 +13352,7 @@
request1.load_flags = 0;
TestCompletionCallback callback1;
- int rv = trans1.Start(&request1, callback1.callback(), BoundNetLog());
+ int rv = trans1.Start(&request1, callback1.callback(), NetLogWithSource());
EXPECT_THAT(callback1.GetResult(rv), IsOk());
const HttpResponseInfo* response1 = trans1.GetResponseInfo();
ASSERT_TRUE(response1);
@@ -13373,7 +13376,7 @@
request2.load_flags = 0;
TestCompletionCallback callback2;
- rv = trans2.Start(&request2, callback2.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback2.callback(), NetLogWithSource());
EXPECT_THAT(callback2.GetResult(rv), IsError(ERR_CONNECTION_REFUSED));
// Another transaction to alternative. This is to test that the HTTP/1.1
@@ -13385,7 +13388,7 @@
request3.load_flags = 0;
TestCompletionCallback callback3;
- rv = trans3.Start(&request3, callback3.callback(), BoundNetLog());
+ rv = trans3.Start(&request3, callback3.callback(), NetLogWithSource());
EXPECT_THAT(callback3.GetResult(rv), IsOk());
const HttpResponseInfo* response3 = trans3.GetResponseInfo();
ASSERT_TRUE(response3);
@@ -13476,7 +13479,7 @@
request1.load_flags = 0;
HttpNetworkTransaction trans1(LOWEST, session.get());
TestCompletionCallback callback1;
- int rv = trans1.Start(&request1, callback1.callback(), BoundNetLog());
+ int rv = trans1.Start(&request1, callback1.callback(), NetLogWithSource());
// This pause is a hack to avoid running into https://crbug.com/497228.
data1.RunUntilPaused();
@@ -13497,7 +13500,7 @@
request2.load_flags = 0;
HttpNetworkTransaction trans2(MEDIUM, session.get());
TestCompletionCallback callback2;
- rv = trans2.Start(&request2, callback2.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback2.callback(), NetLogWithSource());
// This pause is a hack to avoid running into https://crbug.com/497228.
data1.RunUntilPaused();
@@ -13609,7 +13612,7 @@
HttpNetworkTransaction trans1(LOWEST, session.get());
TestCompletionCallback callback1;
ASSERT_EQ(ERR_IO_PENDING,
- trans1.Start(&request1, callback1.callback(), BoundNetLog()));
+ trans1.Start(&request1, callback1.callback(), NetLogWithSource()));
// This pause is a hack to avoid running into https://crbug.com/497228.
data1.RunUntilPaused();
base::RunLoop().RunUntilIdle();
@@ -13626,7 +13629,7 @@
HttpNetworkTransaction trans2(MEDIUM, session.get());
TestCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING,
- trans2.Start(&request2, callback2.callback(), BoundNetLog()));
+ trans2.Start(&request2, callback2.callback(), NetLogWithSource()));
base::RunLoop().RunUntilIdle();
ASSERT_TRUE(callback2.have_result());
@@ -13685,7 +13688,7 @@
HttpNetworkTransaction trans1(MEDIUM, session.get());
TestCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING,
- trans1.Start(&request1, callback1.callback(), BoundNetLog()));
+ trans1.Start(&request1, callback1.callback(), NetLogWithSource()));
EXPECT_THAT(callback1.WaitForResult(), IsError(ERR_CONNECTION_CLOSED));
// Now, start the second request and make sure it succeeds.
@@ -13696,7 +13699,7 @@
HttpNetworkTransaction trans2(MEDIUM, session.get());
TestCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING,
- trans2.Start(&request2, callback2.callback(), BoundNetLog()));
+ trans2.Start(&request2, callback2.callback(), NetLogWithSource()));
ASSERT_THAT(callback2.WaitForResult(), IsOk());
EXPECT_TRUE(trans2.GetResponseInfo()->was_fetched_via_spdy);
@@ -13789,7 +13792,7 @@
std::unique_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans->Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -13818,7 +13821,7 @@
request2.load_flags = 0;
trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans->Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -13846,7 +13849,7 @@
request3.load_flags = 0;
trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- rv = trans->Start(&request3, callback.callback(), BoundNetLog());
+ rv = trans->Start(&request3, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -13880,7 +13883,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -13916,7 +13919,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -13958,7 +13961,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -13991,7 +13994,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -14027,7 +14030,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -14063,7 +14066,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -14104,7 +14107,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -14130,7 +14133,7 @@
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
@@ -14300,7 +14303,7 @@
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate);
last_stream_request_ = fake_request->AsWeakPtr();
return fake_request;
@@ -14312,7 +14315,7 @@
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
NOTREACHED();
return nullptr;
}
@@ -14324,7 +14327,7 @@
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper* create_helper,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
FakeStreamRequest* fake_request =
new FakeStreamRequest(priority, delegate, create_helper);
last_stream_request_ = fake_request->AsWeakPtr();
@@ -14363,7 +14366,7 @@
// difficult.
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override {
state_.Initialize(request_info, priority, net_log, callback);
return OK;
@@ -14503,7 +14506,7 @@
HttpRequestInfo request;
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans.Start(&request, callback.callback(), BoundNetLog()));
+ trans.Start(&request, callback.callback(), NetLogWithSource()));
base::WeakPtr<FakeStreamRequest> fake_request =
fake_factory->last_stream_request();
@@ -14524,7 +14527,7 @@
HttpRequestInfo request;
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans.Start(&request, callback.callback(), BoundNetLog()));
+ trans.Start(&request, callback.callback(), NetLogWithSource()));
base::WeakPtr<FakeStreamRequest> fake_request =
fake_factory->last_stream_request();
@@ -14549,7 +14552,7 @@
HttpRequestInfo request;
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans.Start(&request, callback.callback(), BoundNetLog()));
+ trans.Start(&request, callback.callback(), NetLogWithSource()));
base::WeakPtr<FakeStreamRequest> fake_request =
fake_factory->last_stream_request();
@@ -14586,7 +14589,7 @@
request.url = GURL(test_cases[i]);
EXPECT_EQ(ERR_IO_PENDING,
- trans.Start(&request, callback.callback(), BoundNetLog()));
+ trans.Start(&request, callback.callback(), NetLogWithSource()));
base::WeakPtr<FakeStreamRequest> fake_request =
fake_factory->last_stream_request();
@@ -14656,16 +14659,16 @@
// Start the SSL request.
TestCompletionCallback ssl_callback;
HttpNetworkTransaction ssl_trans(DEFAULT_PRIORITY, session.get());
- ASSERT_EQ(
- ERR_IO_PENDING,
- ssl_trans.Start(&ssl_request, ssl_callback.callback(), BoundNetLog()));
+ ASSERT_EQ(ERR_IO_PENDING,
+ ssl_trans.Start(&ssl_request, ssl_callback.callback(),
+ NetLogWithSource()));
// Start the HTTP request. Pool should stall.
TestCompletionCallback http_callback;
HttpNetworkTransaction http_trans(DEFAULT_PRIORITY, session.get());
- ASSERT_EQ(
- ERR_IO_PENDING,
- http_trans.Start(&http_request, http_callback.callback(), BoundNetLog()));
+ ASSERT_EQ(ERR_IO_PENDING,
+ http_trans.Start(&http_request, http_callback.callback(),
+ NetLogWithSource()));
EXPECT_TRUE(IsTransportSocketPoolStalled(session.get()));
// Wait for response from SSL request.
@@ -14742,9 +14745,9 @@
// Start the HTTP request. Pool should stall.
TestCompletionCallback http_callback;
HttpNetworkTransaction http_trans(DEFAULT_PRIORITY, session.get());
- ASSERT_EQ(
- ERR_IO_PENDING,
- http_trans.Start(&http_request, http_callback.callback(), BoundNetLog()));
+ ASSERT_EQ(ERR_IO_PENDING,
+ http_trans.Start(&http_request, http_callback.callback(),
+ NetLogWithSource()));
EXPECT_TRUE(IsTransportSocketPoolStalled(session.get()));
// The SSL connection will automatically be closed once the connection is
@@ -14791,7 +14794,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -14846,7 +14849,7 @@
std::unique_ptr<HttpNetworkTransaction> trans1(
new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
- int rv = trans1->Start(&request1, callback.callback(), BoundNetLog());
+ int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -14877,7 +14880,7 @@
request2.load_flags = 0;
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- rv = trans2.Start(&request2, callback.callback(), BoundNetLog());
+ rv = trans2.Start(&request2, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -14931,7 +14934,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -14982,7 +14985,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Make sure the headers are sent before adding a chunk. This ensures that
// they can't be merged with the body in a single send. Not currently
@@ -15042,7 +15045,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -15094,7 +15097,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -15138,7 +15141,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -15178,7 +15181,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -15218,7 +15221,7 @@
TestCompletionCallback callback;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -15293,7 +15296,7 @@
{
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -15391,7 +15394,7 @@
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -15439,7 +15442,7 @@
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans.Start(&request, callback.callback(), BoundNetLog()));
+ trans.Start(&request, callback.callback(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
std::string response_data;
@@ -15484,7 +15487,7 @@
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans.Start(&request, callback.callback(), BoundNetLog()));
+ trans.Start(&request, callback.callback(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
std::string response_data;
@@ -15526,7 +15529,7 @@
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans.Start(&request, callback.callback(), BoundNetLog()));
+ trans.Start(&request, callback.callback(), NetLogWithSource()));
base::RunLoop().RunUntilIdle();
upload_data_stream.AppendData("f", 1, false);
@@ -15571,7 +15574,7 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
- trans.Start(&request, callback.callback(), BoundNetLog()));
+ trans.Start(&request, callback.callback(), NetLogWithSource()));
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(trans.GetResponseInfo()->was_fetched_via_spdy);
diff --git a/net/http/http_proxy_client_socket.cc b/net/http/http_proxy_client_socket.cc
index 1d920ee..82538dff 100644
--- a/net/http/http_proxy_client_socket.cc
+++ b/net/http/http_proxy_client_socket.cc
@@ -147,7 +147,7 @@
transport_->socket()->IsConnectedAndIdle();
}
-const BoundNetLog& HttpProxyClientSocket::NetLog() const {
+const NetLogWithSource& HttpProxyClientSocket::NetLog() const {
return net_log_;
}
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h
index 3cb0a2b..4ff04d3 100644
--- a/net/http/http_proxy_client_socket.h
+++ b/net/http/http_proxy_client_socket.h
@@ -65,7 +65,7 @@
void Disconnect() override;
bool IsConnected() const override;
bool IsConnectedAndIdle() const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -166,7 +166,7 @@
// This delegate must outlive this proxy client socket.
ProxyDelegate* proxy_delegate_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket);
};
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index 56bd169..dc4113d 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -84,12 +84,13 @@
SSLClientSocketPool* ssl_pool,
Delegate* delegate,
NetLog* net_log)
- : ConnectJob(group_name,
- base::TimeDelta() /* The socket takes care of timeouts */,
- priority,
- respect_limits,
- delegate,
- BoundNetLog::Make(net_log, NetLogSourceType::CONNECT_JOB)),
+ : ConnectJob(
+ group_name,
+ base::TimeDelta() /* The socket takes care of timeouts */,
+ priority,
+ respect_limits,
+ delegate,
+ NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)),
client_socket_(new HttpProxyClientSocketWrapper(
group_name,
priority,
@@ -217,7 +218,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
const scoped_refptr<HttpProxySocketParams>* casted_socket_params =
static_cast<const scoped_refptr<HttpProxySocketParams>*>(socket_params);
@@ -229,7 +230,7 @@
const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
const scoped_refptr<HttpProxySocketParams>* casted_params =
static_cast<const scoped_refptr<HttpProxySocketParams>*>(params);
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index 167aa615..8840239 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -154,12 +154,12 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void RequestSockets(const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(const std::string& group_name,
ClientSocketHandle* handle) override;
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index 88849a0..3e70735 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -71,7 +71,7 @@
NULL,
NULL,
session_deps_.ssl_config_service.get(),
- BoundNetLog().net_log()),
+ NetLogWithSource().net_log()),
pool_(kMaxSockets,
kMaxSocketsPerGroup,
&transport_socket_pool_,
@@ -221,7 +221,7 @@
std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
int rv = handle_.Init("a", CreateNoTunnelParams(proxy_delegate.get()), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, BoundNetLog());
+ CompletionCallback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(handle_.is_initialized());
ASSERT_TRUE(handle_.socket());
@@ -237,7 +237,7 @@
Initialize(NULL, 0, NULL, 0, NULL, 0, NULL, 0);
EXPECT_EQ(OK, handle_.Init("a", CreateNoTunnelParams(NULL), HIGHEST,
ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, BoundNetLog()));
+ CompletionCallback(), &pool_, NetLogWithSource()));
EXPECT_EQ(HIGHEST, GetLastTransportRequestPriority());
}
@@ -277,7 +277,7 @@
int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -326,7 +326,7 @@
std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
int rv = handle_.Init("a", CreateTunnelParams(proxy_delegate.get()), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(handle_.is_initialized());
ASSERT_TRUE(handle_.socket());
@@ -377,7 +377,7 @@
std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
int rv = handle_.Init("a", CreateTunnelParams(proxy_delegate.get()), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -414,7 +414,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle_.Init("a", CreateTunnelParams(NULL), MEDIUM,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog()));
+ callback_.callback(), &pool_, NetLogWithSource()));
EXPECT_EQ(MEDIUM, GetLastTransportRequestPriority());
EXPECT_THAT(callback_.WaitForResult(), IsOk());
@@ -430,7 +430,7 @@
int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -457,7 +457,7 @@
int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -485,7 +485,7 @@
int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -524,7 +524,7 @@
int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -564,7 +564,7 @@
int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -603,7 +603,7 @@
int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -660,7 +660,7 @@
int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), &pool_, BoundNetLog());
+ callback_.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
diff --git a/net/http/http_proxy_client_socket_wrapper.cc b/net/http/http_proxy_client_socket_wrapper.cc
index 5f8c937..0d299c8 100644
--- a/net/http/http_proxy_client_socket_wrapper.cc
+++ b/net/http/http_proxy_client_socket_wrapper.cc
@@ -44,7 +44,7 @@
SpdySessionPool* spdy_session_pool,
bool tunnel,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: next_state_(STATE_NONE),
group_name_(group_name),
priority_(priority),
@@ -69,9 +69,9 @@
http_auth_cache,
http_auth_handler_factory)
: nullptr),
- net_log_(
- BoundNetLog::Make(net_log.net_log(),
- NetLogSourceType::PROXY_CLIENT_SOCKET_WRAPPER)) {
+ net_log_(NetLogWithSource::Make(
+ net_log.net_log(),
+ NetLogSourceType::PROXY_CLIENT_SOCKET_WRAPPER)) {
net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE,
net_log.source().ToEventParametersCallback());
DCHECK(transport_params || ssl_params);
@@ -207,7 +207,7 @@
return false;
}
-const BoundNetLog& HttpProxyClientSocketWrapper::NetLog() const {
+const NetLogWithSource& HttpProxyClientSocketWrapper::NetLog() const {
return net_log_;
}
diff --git a/net/http/http_proxy_client_socket_wrapper.h b/net/http/http_proxy_client_socket_wrapper.h
index 7ecc561b..6f43e31 100644
--- a/net/http/http_proxy_client_socket_wrapper.h
+++ b/net/http/http_proxy_client_socket_wrapper.h
@@ -69,7 +69,7 @@
SpdySessionPool* spdy_session_pool,
bool tunnel,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// On destruction Disconnect() is called.
~HttpProxyClientSocketWrapper() override;
@@ -93,7 +93,7 @@
void Disconnect() override;
bool IsConnected() const override;
bool IsConnectedAndIdle() const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -201,7 +201,7 @@
scoped_refptr<HttpAuthController> http_auth_controller_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
base::OneShotTimer connect_timer_;
diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc
index 1788d02..6b725da 100644
--- a/net/http/http_response_body_drainer_unittest.cc
+++ b/net/http/http_response_body_drainer_unittest.cc
@@ -90,7 +90,7 @@
// HttpStream implementation.
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override {
return ERR_UNEXPECTED;
}
diff --git a/net/http/http_stream.h b/net/http/http_stream.h
index 0b8a037..1e62abf 100644
--- a/net/http/http_stream.h
+++ b/net/http/http_stream.h
@@ -30,7 +30,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class HttpNetworkSession;
class HttpRequestHeaders;
struct HttpRequestInfo;
@@ -51,7 +51,7 @@
// Returns a net error code, possibly ERR_IO_PENDING.
virtual int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) = 0;
// Writes the headers and uploads body data to the underlying socket.
diff --git a/net/http/http_stream_factory.h b/net/http/http_stream_factory.h
index 68f9032..cbec46b 100644
--- a/net/http/http_stream_factory.h
+++ b/net/http/http_stream_factory.h
@@ -31,7 +31,7 @@
namespace net {
class AuthCredentials;
-class BoundNetLog;
+class NetLogWithSource;
class BidirectionalStreamImpl;
class HostMappingRules;
class HostPortPair;
@@ -212,7 +212,7 @@
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Request a WebSocket handshake stream.
// Will call delegate->OnWebSocketHandshakeStreamReady on successful
@@ -224,7 +224,7 @@
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper* create_helper,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Request a BidirectionalStreamImpl.
// Will call delegate->OnBidirectionalStreamImplReady on successful
@@ -235,7 +235,7 @@
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Requests that enough connections for |num_streams| be opened.
virtual void PreconnectStreams(int num_streams,
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index 59066c2..e0bf489f 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -103,7 +103,7 @@
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(!for_websockets_);
return RequestStreamInternal(request_info, priority, server_ssl_config,
proxy_ssl_config, delegate, nullptr,
@@ -117,7 +117,7 @@
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper* create_helper,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(for_websockets_);
DCHECK(create_helper);
return RequestStreamInternal(request_info, priority, server_ssl_config,
@@ -131,7 +131,7 @@
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(!for_websockets_);
DCHECK(request_info.url.SchemeIs(url::kHttpsScheme));
@@ -149,7 +149,7 @@
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
HttpStreamRequest::StreamType stream_type,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
JobController* job_controller =
new JobController(this, delegate, session_, job_factory_.get());
job_controller_set_.insert(base::WrapUnique(job_controller));
@@ -192,7 +192,7 @@
bool was_alpn_negotiated,
NextProto negotiated_protocol,
bool using_spdy,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
while (true) {
if (!spdy_session)
break;
diff --git a/net/http/http_stream_factory_impl.h b/net/http/http_stream_factory_impl.h
index 1930466..5b66e45 100644
--- a/net/http/http_stream_factory_impl.h
+++ b/net/http/http_stream_factory_impl.h
@@ -44,7 +44,7 @@
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
HttpStreamRequest* RequestWebSocketHandshakeStream(
const HttpRequestInfo& info,
@@ -53,7 +53,7 @@
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper* create_helper,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
HttpStreamRequest* RequestBidirectionalStreamImpl(
const HttpRequestInfo& info,
@@ -61,7 +61,7 @@
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void PreconnectStreams(int num_streams, const HttpRequestInfo& info) override;
const HostMappingRules* GetHostMappingRules() const override;
@@ -101,7 +101,7 @@
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper* create_helper,
HttpStreamRequest::StreamType stream_type,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Called when a SpdySession is ready. It will find appropriate Requests and
// fulfill them. |direct| indicates whether or not |spdy_session| uses a
@@ -113,7 +113,7 @@
bool was_alpn_negotiated,
NextProto negotiated_protocol,
bool using_spdy,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Called when the Job detects that the endpoint indicated by the
// Alternate-Protocol does not work. Lets the factory update
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index b4c7ed5..bc49745 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -183,7 +183,8 @@
priority_(priority),
server_ssl_config_(server_ssl_config),
proxy_ssl_config_(proxy_ssl_config),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::HTTP_STREAM_JOB)),
+ net_log_(
+ NetLogWithSource::Make(net_log, NetLogSourceType::HTTP_STREAM_JOB)),
io_callback_(base::Bind(&Job::OnIOComplete, base::Unretained(this))),
connection_(new ClientSocketHandle),
session_(session),
@@ -490,7 +491,7 @@
const SpdySessionKey& spdy_session_key,
const GURL& origin_url,
const AddressList& addresses,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
// It is OK to dereference spdy_session_pool, because the
// ClientSocketPoolManager will be destroyed in the same callback that
// destroys the SpdySessionPool.
@@ -683,7 +684,7 @@
}
int HttpStreamFactoryImpl::Job::DoStart() {
- const BoundNetLog* net_log = delegate_->GetNetLog(this);
+ const NetLogWithSource* net_log = delegate_->GetNetLog(this);
if (net_log) {
net_log_.BeginEvent(
diff --git a/net/http/http_stream_factory_impl_job.h b/net/http/http_stream_factory_impl_job.h
index c5f5be97..d04cc510 100644
--- a/net/http/http_stream_factory_impl_job.h
+++ b/net/http/http_stream_factory_impl_job.h
@@ -144,7 +144,7 @@
// Remove session from the SpdySessionRequestMap.
virtual void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) = 0;
- virtual const BoundNetLog* GetNetLog(Job* job) const = 0;
+ virtual const NetLogWithSource* GetNetLog(Job* job) const = 0;
virtual WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper() = 0;
@@ -215,7 +215,7 @@
bool was_alpn_negotiated() const;
NextProto negotiated_protocol() const;
bool using_spdy() const;
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
HttpStreamRequest::StreamType stream_type() const { return stream_type_; }
std::unique_ptr<HttpStream> ReleaseStream() { return std::move(stream_); }
@@ -397,14 +397,14 @@
const SpdySessionKey& spdy_session_key,
const GURL& origin_url,
const AddressList& addresses,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
const HttpRequestInfo request_info_;
RequestPriority priority_;
ProxyInfo proxy_info_;
SSLConfig server_ssl_config_;
SSLConfig proxy_ssl_config_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
CompletionCallback io_callback_;
std::unique_ptr<ClientSocketHandle> connection_;
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index e6367ab..2ce5c9b5 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -62,7 +62,7 @@
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
HttpStreamRequest::StreamType stream_type,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -414,7 +414,7 @@
const bool was_alpn_negotiated = job->was_alpn_negotiated();
const NextProto negotiated_protocol = job->negotiated_protocol();
const bool using_spdy = job->using_spdy();
- const BoundNetLog net_log = job->net_log();
+ const NetLogWithSource net_log = job->net_log();
// Cache this so we can still use it if the JobController is deleted.
HttpStreamFactoryImpl* factory = factory_;
@@ -594,7 +594,7 @@
}
}
-const BoundNetLog* HttpStreamFactoryImpl::JobController::GetNetLog(
+const NetLogWithSource* HttpStreamFactoryImpl::JobController::GetNetLog(
Job* job) const {
if (is_preconnect_ || (job_bound_ && bound_job_ != job))
return nullptr;
@@ -621,7 +621,7 @@
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
HttpStreamRequest::StreamType stream_type,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(!main_job_);
DCHECK(!alternative_job_);
HostPortPair destination(HostPortPair::FromURL(request_info.url));
diff --git a/net/http/http_stream_factory_impl_job_controller.h b/net/http/http_stream_factory_impl_job_controller.h
index 59dd56af3..da887dbb 100644
--- a/net/http/http_stream_factory_impl_job_controller.h
+++ b/net/http/http_stream_factory_impl_job_controller.h
@@ -38,7 +38,7 @@
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
HttpStreamRequest::StreamType stream_type,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -158,7 +158,7 @@
// Remove session from the SpdySessionRequestMap.
void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) override;
- const BoundNetLog* GetNetLog(Job* job) const override;
+ const NetLogWithSource* GetNetLog(Job* job) const override;
void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) override;
@@ -175,7 +175,7 @@
const SSLConfig& proxy_ssl_config,
HttpStreamRequest::Delegate* delegate,
HttpStreamRequest::StreamType stream_type,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Attaches |job| to |request_|. Does not mean that |request_| will use |job|.
void AttachJob(Job* job);
diff --git a/net/http/http_stream_factory_impl_job_controller_unittest.cc b/net/http/http_stream_factory_impl_job_controller_unittest.cc
index aa51276..2dd37fef 100644
--- a/net/http/http_stream_factory_impl_job_controller_unittest.cc
+++ b/net/http/http_stream_factory_impl_job_controller_unittest.cc
@@ -62,7 +62,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ERR_NAME_NOT_RESOLVED;
}
};
@@ -77,7 +77,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ERR_IO_PENDING;
}
};
@@ -197,7 +197,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
@@ -227,7 +227,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
// There's no other alternative job. Thus when a stream is ready, it should
@@ -265,7 +265,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -299,7 +299,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -343,7 +343,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -394,7 +394,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -439,7 +439,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -486,7 +486,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -535,7 +535,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -560,7 +560,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_factory_.main_job()->is_waiting());
@@ -605,7 +605,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
// Both jobs should be created but stalled as proxy resolution not completed.
EXPECT_TRUE(job_controller_->main_job());
@@ -667,7 +667,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -726,7 +726,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -758,7 +758,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_FALSE(job_controller_->main_job()->is_waiting());
@@ -785,7 +785,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_FALSE(job_controller_->main_job()->is_waiting());
@@ -822,7 +822,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->main_job()->is_waiting());
@@ -883,7 +883,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job()->is_waiting());
EXPECT_TRUE(job_controller_->alternative_job());
@@ -920,7 +920,7 @@
request_.reset(
job_controller_->Start(request_info, &request_delegate_, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
diff --git a/net/http/http_stream_factory_impl_request.cc b/net/http/http_stream_factory_impl_request.cc
index 6578659..e6bcbe4 100644
--- a/net/http/http_stream_factory_impl_request.cc
+++ b/net/http/http_stream_factory_impl_request.cc
@@ -21,7 +21,7 @@
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
StreamType stream_type)
: url_(url),
helper_(helper),
diff --git a/net/http/http_stream_factory_impl_request.h b/net/http/http_stream_factory_impl_request.h
index 80948fd..2d85218e 100644
--- a/net/http/http_stream_factory_impl_request.h
+++ b/net/http/http_stream_factory_impl_request.h
@@ -52,7 +52,7 @@
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
StreamType stream_type);
~Request() override;
@@ -60,7 +60,7 @@
// The GURL from the HttpRequestInfo the started the Request.
const GURL& url() const { return url_; }
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
// Called when the |helper_| determines the appropriate |spdy_session_key|
// for the Request. Note that this does not mean that SPDY is necessarily
@@ -137,7 +137,7 @@
WebSocketHandshakeStreamBase::CreateHelper* const
websocket_handshake_stream_create_helper_;
HttpStreamRequest::Delegate* const delegate_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
std::unique_ptr<const SpdySessionKey> spdy_session_key_;
diff --git a/net/http/http_stream_factory_impl_request_unittest.cc b/net/http/http_stream_factory_impl_request_unittest.cc
index e7065af..6de0bab 100644
--- a/net/http/http_stream_factory_impl_request_unittest.cc
+++ b/net/http/http_stream_factory_impl_request_unittest.cc
@@ -39,7 +39,7 @@
HttpRequestInfo request_info;
std::unique_ptr<HttpStreamFactoryImpl::Request> request(
job_controller->Start(request_info, &request_delegate, nullptr,
- BoundNetLog(), HttpStreamRequest::HTTP_STREAM,
+ NetLogWithSource(), HttpStreamRequest::HTTP_STREAM,
DEFAULT_PRIORITY, SSLConfig(), SSLConfig()));
EXPECT_TRUE(job_controller->main_job());
EXPECT_EQ(DEFAULT_PRIORITY, job_controller->main_job()->priority());
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index 39e4199..151677d 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -89,7 +89,7 @@
// HttpStream methods
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
@@ -384,7 +384,7 @@
ClientSocketPool::RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
@@ -392,7 +392,7 @@
void RequestSockets(const std::string& group_name,
const void* socket_params,
int num_sockets,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
last_num_streams_ = num_sockets;
}
@@ -674,7 +674,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
// The proxy that failed should now be known to the proxy_service as bad.
@@ -759,7 +759,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
// The proxy that failed should now be known to the proxy_service as bad.
@@ -962,7 +962,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
// The proxy that failed should now be known to the proxy_service as
@@ -1065,7 +1065,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
// The proxy that failed should now be known to the proxy_service as
@@ -1231,7 +1231,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
// The stream shouldn't come from spdy as we are using different privacy mode
@@ -1307,7 +1307,7 @@
std::unique_ptr<HttpStreamRequest> request1(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 1);
@@ -1315,7 +1315,7 @@
std::unique_ptr<HttpStreamRequest> request2(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 1);
@@ -1324,7 +1324,7 @@
std::unique_ptr<HttpStreamRequest> request3(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 2);
@@ -1353,7 +1353,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(LOAD_STATE_RESOLVING_HOST, request->GetLoadState());
@@ -1382,7 +1382,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
ASSERT_TRUE(nullptr != waiter.stream());
@@ -1426,7 +1426,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
ASSERT_TRUE(nullptr != waiter.stream());
@@ -1468,7 +1468,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
ASSERT_TRUE(nullptr != waiter.stream());
@@ -1515,9 +1515,9 @@
WebSocketStreamCreateHelper create_helper;
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory_for_websocket()
- ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
- ssl_config, ssl_config, &waiter,
- &create_helper, BoundNetLog()));
+ ->RequestWebSocketHandshakeStream(
+ request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+ &create_helper, NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
EXPECT_TRUE(nullptr == waiter.stream());
@@ -1558,9 +1558,9 @@
WebSocketStreamCreateHelper create_helper;
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory_for_websocket()
- ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
- ssl_config, ssl_config, &waiter,
- &create_helper, BoundNetLog()));
+ ->RequestWebSocketHandshakeStream(
+ request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+ &create_helper, NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
EXPECT_TRUE(nullptr == waiter.stream());
@@ -1599,9 +1599,9 @@
WebSocketStreamCreateHelper create_helper;
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory_for_websocket()
- ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
- ssl_config, ssl_config, &waiter,
- &create_helper, BoundNetLog()));
+ ->RequestWebSocketHandshakeStream(
+ request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+ &create_helper, NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
EXPECT_TRUE(nullptr == waiter.stream());
@@ -1655,7 +1655,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
EXPECT_TRUE(nullptr == waiter.websocket_stream());
@@ -1701,7 +1701,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestBidirectionalStreamImpl(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
EXPECT_FALSE(waiter.websocket_stream());
@@ -1869,7 +1869,7 @@
std::unique_ptr<HttpStreamRequest> request(
session()->http_stream_factory()->RequestBidirectionalStreamImpl(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
@@ -1885,7 +1885,7 @@
bidi_request_info.priority = LOWEST;
TestBidirectionalDelegate delegate;
- stream_impl->Start(&bidi_request_info, BoundNetLog(),
+ stream_impl->Start(&bidi_request_info, NetLogWithSource(),
/*send_request_headers_automatically=*/true, &delegate,
nullptr);
delegate.WaitUntilDone();
@@ -1934,7 +1934,7 @@
std::unique_ptr<HttpStreamRequest> request(
session()->http_stream_factory()->RequestBidirectionalStreamImpl(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
@@ -1992,7 +1992,7 @@
std::unique_ptr<HttpStreamRequest> request(
session()->http_stream_factory()->RequestBidirectionalStreamImpl(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
@@ -2008,7 +2008,7 @@
bidi_request_info.priority = LOWEST;
TestBidirectionalDelegate delegate;
- stream_impl->Start(&bidi_request_info, BoundNetLog(),
+ stream_impl->Start(&bidi_request_info, NetLogWithSource(),
/*send_request_headers_automatically=*/true, &delegate,
nullptr);
delegate.WaitUntilDone();
@@ -2059,7 +2059,7 @@
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory()->RequestBidirectionalStreamImpl(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
- BoundNetLog()));
+ NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
ASSERT_THAT(waiter.error_status(), IsError(ERR_FAILED));
@@ -2105,9 +2105,9 @@
WebSocketStreamCreateHelper create_helper;
std::unique_ptr<HttpStreamRequest> request1(
session->http_stream_factory_for_websocket()
- ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
- ssl_config, ssl_config, &waiter1,
- &create_helper, BoundNetLog()));
+ ->RequestWebSocketHandshakeStream(
+ request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter1,
+ &create_helper, NetLogWithSource()));
waiter1.WaitForStream();
EXPECT_TRUE(waiter1.stream_done());
ASSERT_TRUE(nullptr != waiter1.websocket_stream());
@@ -2152,9 +2152,9 @@
WebSocketStreamCreateHelper create_helper;
std::unique_ptr<HttpStreamRequest> request1(
session->http_stream_factory_for_websocket()
- ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
- ssl_config, ssl_config, &waiter1,
- &create_helper, BoundNetLog()));
+ ->RequestWebSocketHandshakeStream(
+ request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter1,
+ &create_helper, NetLogWithSource()));
waiter1.WaitForStream();
EXPECT_TRUE(waiter1.stream_done());
ASSERT_TRUE(nullptr != waiter1.websocket_stream());
@@ -2165,9 +2165,9 @@
StreamRequestWaiter waiter2;
std::unique_ptr<HttpStreamRequest> request2(
session->http_stream_factory_for_websocket()
- ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
- ssl_config, ssl_config, &waiter2,
- &create_helper, BoundNetLog()));
+ ->RequestWebSocketHandshakeStream(
+ request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter2,
+ &create_helper, NetLogWithSource()));
waiter2.WaitForStream();
EXPECT_TRUE(waiter2.stream_done());
ASSERT_TRUE(nullptr != waiter2.websocket_stream());
@@ -2231,9 +2231,9 @@
WebSocketStreamCreateHelper create_helper;
std::unique_ptr<HttpStreamRequest> request(
session->http_stream_factory_for_websocket()
- ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
- ssl_config, ssl_config, &waiter,
- &create_helper, BoundNetLog()));
+ ->RequestWebSocketHandshakeStream(
+ request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+ &create_helper, NetLogWithSource()));
waiter.WaitForStream();
EXPECT_TRUE(waiter.stream_done());
EXPECT_TRUE(nullptr == waiter.stream());
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index bf5a41a..0a65fda5 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -204,7 +204,7 @@
HttpStreamParser::HttpStreamParser(ClientSocketHandle* connection,
const HttpRequestInfo* request,
GrowableIOBuffer* read_buffer,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: io_state_(STATE_NONE),
request_(request),
request_headers_(nullptr),
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h
index b07a63a..58818a6 100644
--- a/net/http/http_stream_parser.h
+++ b/net/http/http_stream_parser.h
@@ -47,7 +47,7 @@
HttpStreamParser(ClientSocketHandle* connection,
const HttpRequestInfo* request,
GrowableIOBuffer* read_buffer,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
virtual ~HttpStreamParser();
// Sets whether or not HTTP/0.9 is only allowed on default ports. It's not
@@ -273,7 +273,7 @@
// The underlying socket.
ClientSocketHandle* const connection_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// Callback to be used when doing IO.
CompletionCallback io_callback_;
diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc
index c53ec8d1..030adff 100644
--- a/net/http/http_stream_parser_unittest.cc
+++ b/net/http/http_stream_parser_unittest.cc
@@ -79,7 +79,7 @@
void CompleteRead() { UploadDataStream::OnReadCompleted(ERR_FAILED); }
// UploadDataStream implementation:
- int InitInternal(const BoundNetLog& net_log) override { return OK; }
+ int InitInternal(const NetLogWithSource& net_log) override { return OK; }
int ReadInternal(IOBuffer* buf, int buf_len) override {
if (async_ == FailureMode::ASYNC) {
@@ -119,7 +119,7 @@
EXPECT_EQ(0u, progress.position());
ASSERT_THAT(upload_data_stream.Init(TestCompletionCallback().callback(),
- BoundNetLog()),
+ NetLogWithSource()),
IsOk());
// Test upload progress after init.
@@ -134,7 +134,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders headers;
headers.SetHeader("Content-Length", "12");
@@ -165,7 +165,7 @@
ReadErrorUploadDataStream upload_data_stream(
ReadErrorUploadDataStream::FailureMode::ASYNC);
ASSERT_THAT(upload_data_stream.Init(TestCompletionCallback().callback(),
- BoundNetLog()),
+ NetLogWithSource()),
IsOk());
HttpRequestInfo request;
@@ -175,7 +175,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders headers;
headers.SetHeader("Content-Length", "12");
@@ -203,7 +203,7 @@
private:
void CompleteInit() { UploadDataStream::OnInitCompleted(OK); }
- int InitInternal(const BoundNetLog& net_log) override {
+ int InitInternal(const NetLogWithSource& net_log) override {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&InitAsyncUploadDataStream::CompleteInit,
weak_factory_.GetWeakPtr()));
@@ -219,7 +219,7 @@
InitAsyncUploadDataStream upload_data_stream(0);
TestCompletionCallback callback;
- int result = upload_data_stream.Init(callback.callback(), BoundNetLog());
+ int result = upload_data_stream.Init(callback.callback(), NetLogWithSource());
ASSERT_THAT(result, IsError(ERR_IO_PENDING));
// Should be empty progress while initialization is in progress.
@@ -251,7 +251,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders headers;
headers.SetHeader("Transfer-Encoding", "chunked");
@@ -345,7 +345,7 @@
std::unique_ptr<UploadDataStream> body(
base::MakeUnique<ElementsUploadDataStream>(std::move(element_readers),
0));
- ASSERT_THAT(body->Init(CompletionCallback(), BoundNetLog()), IsOk());
+ ASSERT_THAT(body->Init(CompletionCallback(), NetLogWithSource()), IsOk());
// Shouldn't be merged if upload data is empty.
ASSERT_FALSE(HttpStreamParser::ShouldMergeRequestHeadersAndBody(
"some header", body.get()));
@@ -355,8 +355,9 @@
const std::string payload = "123";
std::unique_ptr<ChunkedUploadDataStream> body(new ChunkedUploadDataStream(0));
body->AppendData(payload.data(), payload.size(), true);
- ASSERT_THAT(body->Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ body->Init(TestCompletionCallback().callback(), NetLogWithSource()),
+ IsOk());
// Shouldn't be merged if upload data carries chunked data.
ASSERT_FALSE(HttpStreamParser::ShouldMergeRequestHeadersAndBody(
"some header", body.get()));
@@ -380,7 +381,7 @@
std::unique_ptr<UploadDataStream> body(
new ElementsUploadDataStream(std::move(element_readers), 0));
TestCompletionCallback callback;
- ASSERT_THAT(body->Init(callback.callback(), BoundNetLog()),
+ ASSERT_THAT(body->Init(callback.callback(), NetLogWithSource()),
IsError(ERR_IO_PENDING));
ASSERT_THAT(callback.WaitForResult(), IsOk());
// Shouldn't be merged if upload data carries a file, as it's not in-memory.
@@ -400,7 +401,7 @@
std::unique_ptr<UploadDataStream> body(
new ElementsUploadDataStream(std::move(element_readers), 0));
- ASSERT_THAT(body->Init(CompletionCallback(), BoundNetLog()), IsOk());
+ ASSERT_THAT(body->Init(CompletionCallback(), NetLogWithSource()), IsOk());
// Yes, should be merged if the in-memory body is small here.
ASSERT_TRUE(HttpStreamParser::ShouldMergeRequestHeadersAndBody(
"some header", body.get()));
@@ -414,7 +415,7 @@
std::unique_ptr<UploadDataStream> body(
new ElementsUploadDataStream(std::move(element_readers), 0));
- ASSERT_THAT(body->Init(CompletionCallback(), BoundNetLog()), IsOk());
+ ASSERT_THAT(body->Init(CompletionCallback(), NetLogWithSource()), IsOk());
// Shouldn't be merged if the in-memory body is large here.
ASSERT_FALSE(HttpStreamParser::ShouldMergeRequestHeadersAndBody(
"some header", body.get()));
@@ -435,7 +436,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpResponseInfo response;
TestCompletionCallback callback;
@@ -463,7 +464,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders headers;
headers.SetHeader("Host", "localhost");
@@ -494,7 +495,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders headers;
headers.SetHeader("Host", "localhost");
@@ -526,7 +527,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders headers;
headers.SetHeader("Host", "localhost");
@@ -557,7 +558,7 @@
base::MakeUnique<UploadBytesElementReader>("hello world!", 12));
ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
ASSERT_THAT(upload_data_stream.Init(TestCompletionCallback().callback(),
- BoundNetLog()),
+ NetLogWithSource()),
IsOk());
HttpRequestInfo request;
@@ -567,7 +568,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders headers;
headers.SetHeader("Content-Length", "12");
@@ -600,7 +601,7 @@
ChunkedUploadDataStream upload_data_stream(0);
ASSERT_THAT(upload_data_stream.Init(TestCompletionCallback().callback(),
- BoundNetLog()),
+ NetLogWithSource()),
IsOk());
HttpRequestInfo request;
@@ -610,7 +611,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders headers;
headers.SetHeader("Transfer-Encoding", "chunked");
@@ -661,9 +662,9 @@
};
ChunkedUploadDataStream upload_stream(0);
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
std::unique_ptr<ClientSocketHandle> socket_handle =
@@ -676,7 +677,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request_info, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders request_headers;
request_headers.SetHeader("Transfer-Encoding", "chunked");
@@ -739,9 +740,9 @@
};
ChunkedUploadDataStream upload_stream(0);
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
// Append the only chunk.
upload_stream.AppendData(kChunk, arraysize(kChunk) - 1, true);
@@ -756,7 +757,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request_info, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders request_headers;
request_headers.SetHeader("Transfer-Encoding", "chunked");
@@ -821,9 +822,9 @@
ChunkedUploadDataStream upload_stream(0);
upload_stream.AppendData(kChunk1, arraysize(kChunk1) - 1, false);
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
std::unique_ptr<ClientSocketHandle> socket_handle =
@@ -835,8 +836,8 @@
request_info.upload_data_stream = &upload_stream;
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
- HttpStreamParser parser(
- socket_handle.get(), &request_info, read_buffer.get(), BoundNetLog());
+ HttpStreamParser parser(socket_handle.get(), &request_info, read_buffer.get(),
+ NetLogWithSource());
HttpRequestHeaders request_headers;
request_headers.SetHeader("Transfer-Encoding", "chunked");
@@ -905,9 +906,9 @@
};
ChunkedUploadDataStream upload_stream(0);
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
std::unique_ptr<ClientSocketHandle> socket_handle =
@@ -920,7 +921,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request_info, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders request_headers;
request_headers.SetHeader("Transfer-Encoding", "chunked");
@@ -978,9 +979,9 @@
};
ChunkedUploadDataStream upload_stream(0);
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
// Append final empty chunk.
upload_stream.AppendData(nullptr, 0, true);
@@ -995,7 +996,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), &request_info, read_buffer.get(),
- BoundNetLog());
+ NetLogWithSource());
HttpRequestHeaders request_headers;
request_headers.SetHeader("Transfer-Encoding", "chunked");
@@ -1096,8 +1097,8 @@
request_info.load_flags = LOAD_NORMAL;
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
- HttpStreamParser parser(
- socket_handle.get(), &request_info, read_buffer.get(), BoundNetLog());
+ HttpStreamParser parser(socket_handle.get(), &request_info,
+ read_buffer.get(), NetLogWithSource());
HttpRequestHeaders request_headers;
HttpResponseInfo response_info;
@@ -1153,8 +1154,8 @@
request_info.load_flags = LOAD_NORMAL;
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
- HttpStreamParser parser(
- socket_handle.get(), &request_info, read_buffer.get(), BoundNetLog());
+ HttpStreamParser parser(socket_handle.get(), &request_info, read_buffer.get(),
+ NetLogWithSource());
HttpRequestHeaders request_headers;
HttpResponseInfo response_info;
@@ -1224,8 +1225,8 @@
request_info_.url = url_;
request_info_.load_flags = LOAD_NORMAL;
- parser_.reset(new HttpStreamParser(
- socket_handle_.get(), &request_info_, read_buffer(), BoundNetLog()));
+ parser_.reset(new HttpStreamParser(socket_handle_.get(), &request_info_,
+ read_buffer(), NetLogWithSource()));
parser_->set_http_09_on_non_default_ports_enabled(
http_09_on_non_default_ports_enabled_);
@@ -1597,7 +1598,7 @@
scoped_refptr<GrowableIOBuffer> read_buffer(new GrowableIOBuffer);
HttpStreamParser parser(socket_handle.get(), request_info.get(),
- read_buffer.get(), BoundNetLog());
+ read_buffer.get(), NetLogWithSource());
std::unique_ptr<HttpRequestHeaders> request_headers(new HttpRequestHeaders());
std::unique_ptr<HttpResponseInfo> response_info(new HttpResponseInfo());
diff --git a/net/http/http_transaction.h b/net/http/http_transaction.h
index dae1090..f086564 100644
--- a/net/http/http_transaction.h
+++ b/net/http/http_transaction.h
@@ -19,7 +19,7 @@
namespace net {
class AuthCredentials;
-class BoundNetLog;
+class NetLogWithSource;
class HttpRequestHeaders;
struct HttpRequestInfo;
class HttpResponseInfo;
@@ -66,7 +66,7 @@
// Profiling information for the request is saved to |net_log| if non-NULL.
virtual int Start(const HttpRequestInfo* request_info,
const CompletionCallback& callback,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Restarts the HTTP transaction, ignoring the last error. This call can
// only be made after a call to Start (or RestartIgnoringLastError) failed.
diff --git a/net/http/http_transaction_test_util.cc b/net/http/http_transaction_test_util.cc
index c1db33d..335b92e 100644
--- a/net/http/http_transaction_test_util.cc
+++ b/net/http/http_transaction_test_util.cc
@@ -163,7 +163,7 @@
}
void TestTransactionConsumer::Start(const HttpRequestInfo* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
state_ = STARTING;
int result = trans_->Start(
request, base::Bind(&TestTransactionConsumer::OnIOComplete,
@@ -239,7 +239,7 @@
int MockNetworkTransaction::Start(const HttpRequestInfo* request,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
if (request_)
return ERR_FAILED;
@@ -271,7 +271,7 @@
// Let the MockTransactionHandler worry about this: the only way for this
// test to succeed is by using an explicit handler for the transaction so
// that server behavior can be simulated.
- return StartInternal(&auth_request_info, callback, BoundNetLog());
+ return StartInternal(&auth_request_info, callback, NetLogWithSource());
}
void MockNetworkTransaction::PopulateNetErrorDetails(
@@ -400,7 +400,7 @@
int MockNetworkTransaction::StartInternal(const HttpRequestInfo* request,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
const MockTransaction* t = FindMockTransaction(request->url);
if (!t)
return ERR_FAILED;
diff --git a/net/http/http_transaction_test_util.h b/net/http/http_transaction_test_util.h
index b702783..596c7ab 100644
--- a/net/http/http_transaction_test_util.h
+++ b/net/http/http_transaction_test_util.h
@@ -130,7 +130,7 @@
HttpTransactionFactory* factory);
virtual ~TestTransactionConsumer();
- void Start(const HttpRequestInfo* request, const BoundNetLog& net_log);
+ void Start(const HttpRequestInfo* request, const NetLogWithSource& net_log);
bool is_done() const { return state_ == DONE; }
int error() const { return error_; }
@@ -185,7 +185,7 @@
int Start(const HttpRequestInfo* request,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
int RestartIgnoringLastError(const CompletionCallback& callback) override;
@@ -254,7 +254,7 @@
private:
int StartInternal(const HttpRequestInfo* request,
const CompletionCallback& callback,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
void CallbackLater(const CompletionCallback& callback, int result);
void RunCallback(const CompletionCallback& callback, int result);
@@ -273,7 +273,8 @@
int64_t sent_bytes_;
// NetLog ID of the fake / non-existent underlying socket used by the
- // connection. Requires Start() be passed a BoundNetLog with a real NetLog to
+ // connection. Requires Start() be passed a NetLogWithSource with a real
+ // NetLog to
// be initialized.
unsigned int socket_log_id_;
diff --git a/net/http/proxy_client_socket.cc b/net/http/proxy_client_socket.cc
index ffdbec86..453b6d94 100644
--- a/net/http/proxy_client_socket.cc
+++ b/net/http/proxy_client_socket.cc
@@ -54,9 +54,10 @@
}
// static
-int ProxyClientSocket::HandleProxyAuthChallenge(HttpAuthController* auth,
- HttpResponseInfo* response,
- const BoundNetLog& net_log) {
+int ProxyClientSocket::HandleProxyAuthChallenge(
+ HttpAuthController* auth,
+ HttpResponseInfo* response,
+ const NetLogWithSource& net_log) {
DCHECK(response->headers.get());
int rv = auth->HandleAuthChallenge(response->headers, response->ssl_info,
false, true, net_log);
diff --git a/net/http/proxy_client_socket.h b/net/http/proxy_client_socket.h
index ce26719e..b2df31a 100644
--- a/net/http/proxy_client_socket.h
+++ b/net/http/proxy_client_socket.h
@@ -68,7 +68,7 @@
// construction/ this method should be called.
static int HandleProxyAuthChallenge(HttpAuthController* auth,
HttpResponseInfo* response,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Logs (to the log and in a histogram) a blocked CONNECT response.
static void LogBlockedTunnelResponse(int http_response_code,
diff --git a/net/http/proxy_connect_redirect_http_stream.cc b/net/http/proxy_connect_redirect_http_stream.cc
index 0cdd3b3..5b8a2bc 100644
--- a/net/http/proxy_connect_redirect_http_stream.cc
+++ b/net/http/proxy_connect_redirect_http_stream.cc
@@ -23,7 +23,7 @@
int ProxyConnectRedirectHttpStream::InitializeStream(
const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) {
NOTREACHED();
return OK;
diff --git a/net/http/proxy_connect_redirect_http_stream.h b/net/http/proxy_connect_redirect_http_stream.h
index 1a82a4c..74d9136 100644
--- a/net/http/proxy_connect_redirect_http_stream.h
+++ b/net/http/proxy_connect_redirect_http_stream.h
@@ -30,7 +30,7 @@
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override;
int SendRequest(const HttpRequestHeaders& request_headers,
HttpResponseInfo* response,
diff --git a/net/log/net_log.cc b/net/log/net_log.cc
index 8abaea4..69b51a3 100644
--- a/net/log/net_log.cc
+++ b/net/log/net_log.cc
@@ -410,11 +410,12 @@
FOR_EACH_OBSERVER(ThreadSafeObserver, observers_, OnAddEntryData(entry_data));
}
-BoundNetLog::~BoundNetLog() {
+NetLogWithSource::~NetLogWithSource() {
liveness_ = DEAD;
}
-void BoundNetLog::AddEntry(NetLogEventType type, NetLogEventPhase phase) const {
+void NetLogWithSource::AddEntry(NetLogEventType type,
+ NetLogEventPhase phase) const {
CrashIfInvalid();
if (!net_log_)
@@ -422,7 +423,7 @@
net_log_->AddEntry(type, source_, phase, NULL);
}
-void BoundNetLog::AddEntry(
+void NetLogWithSource::AddEntry(
NetLogEventType type,
NetLogEventPhase phase,
const NetLog::ParametersCallback& get_parameters) const {
@@ -433,38 +434,38 @@
net_log_->AddEntry(type, source_, phase, &get_parameters);
}
-void BoundNetLog::AddEvent(NetLogEventType type) const {
+void NetLogWithSource::AddEvent(NetLogEventType type) const {
AddEntry(type, NetLogEventPhase::NONE);
}
-void BoundNetLog::AddEvent(
+void NetLogWithSource::AddEvent(
NetLogEventType type,
const NetLog::ParametersCallback& get_parameters) const {
AddEntry(type, NetLogEventPhase::NONE, get_parameters);
}
-void BoundNetLog::BeginEvent(NetLogEventType type) const {
+void NetLogWithSource::BeginEvent(NetLogEventType type) const {
AddEntry(type, NetLogEventPhase::BEGIN);
}
-void BoundNetLog::BeginEvent(
+void NetLogWithSource::BeginEvent(
NetLogEventType type,
const NetLog::ParametersCallback& get_parameters) const {
AddEntry(type, NetLogEventPhase::BEGIN, get_parameters);
}
-void BoundNetLog::EndEvent(NetLogEventType type) const {
+void NetLogWithSource::EndEvent(NetLogEventType type) const {
AddEntry(type, NetLogEventPhase::END);
}
-void BoundNetLog::EndEvent(
+void NetLogWithSource::EndEvent(
NetLogEventType type,
const NetLog::ParametersCallback& get_parameters) const {
AddEntry(type, NetLogEventPhase::END, get_parameters);
}
-void BoundNetLog::AddEventWithNetErrorCode(NetLogEventType event_type,
- int net_error) const {
+void NetLogWithSource::AddEventWithNetErrorCode(NetLogEventType event_type,
+ int net_error) const {
DCHECK_NE(ERR_IO_PENDING, net_error);
if (net_error >= 0) {
AddEvent(event_type);
@@ -473,8 +474,8 @@
}
}
-void BoundNetLog::EndEventWithNetErrorCode(NetLogEventType event_type,
- int net_error) const {
+void NetLogWithSource::EndEventWithNetErrorCode(NetLogEventType event_type,
+ int net_error) const {
DCHECK_NE(ERR_IO_PENDING, net_error);
if (net_error >= 0) {
EndEvent(event_type);
@@ -483,27 +484,28 @@
}
}
-void BoundNetLog::AddByteTransferEvent(NetLogEventType event_type,
- int byte_count,
- const char* bytes) const {
+void NetLogWithSource::AddByteTransferEvent(NetLogEventType event_type,
+ int byte_count,
+ const char* bytes) const {
AddEvent(event_type, base::Bind(BytesTransferredCallback, byte_count, bytes));
}
-bool BoundNetLog::IsCapturing() const {
+bool NetLogWithSource::IsCapturing() const {
CrashIfInvalid();
return net_log_ && net_log_->IsCapturing();
}
// static
-BoundNetLog BoundNetLog::Make(NetLog* net_log, NetLogSourceType source_type) {
+NetLogWithSource NetLogWithSource::Make(NetLog* net_log,
+ NetLogSourceType source_type) {
if (!net_log)
- return BoundNetLog();
+ return NetLogWithSource();
NetLog::Source source(source_type, net_log->NextID());
- return BoundNetLog(source, net_log);
+ return NetLogWithSource(source, net_log);
}
-void BoundNetLog::CrashIfInvalid() const {
+void NetLogWithSource::CrashIfInvalid() const {
Liveness liveness = liveness_;
if (liveness == ALIVE)
diff --git a/net/log/net_log.h b/net/log/net_log.h
index 842116c..f637b98 100644
--- a/net/log/net_log.h
+++ b/net/log/net_log.h
@@ -37,7 +37,7 @@
// SpdySession).
//
// To avoid needing to pass in the "source ID" to the logging functions, NetLog
-// is usually accessed through a BoundNetLog, which will always pass in a
+// is usually accessed through a NetLogWithSource, which will always pass in a
// specific source ID.
//
// All methods are thread safe, with the exception that no NetLog or
@@ -275,7 +275,7 @@
const base::string16* value);
private:
- friend class BoundNetLog;
+ friend class NetLogWithSource;
void AddEntry(NetLogEventType type,
const Source& source,
@@ -305,10 +305,10 @@
// Helper that binds a Source to a NetLog, and exposes convenience methods to
// output log messages without needing to pass in the source.
-class NET_EXPORT BoundNetLog {
+class NET_EXPORT NetLogWithSource {
public:
- BoundNetLog() : net_log_(NULL) {}
- ~BoundNetLog();
+ NetLogWithSource() : net_log_(NULL) {}
+ ~NetLogWithSource();
// Add a log entry to the NetLog for the bound source.
void AddEntry(NetLogEventType type, NetLogEventPhase phase) const;
@@ -352,10 +352,10 @@
bool IsCapturing() const;
- // Helper to create a BoundNetLog given a NetLog and a NetLogSourceType.
+ // Helper to create a NetLogWithSource given a NetLog and a NetLogSourceType.
// Takes care of creating a unique source ID, and handles
// the case of NULL net_log.
- static BoundNetLog Make(NetLog* net_log, NetLogSourceType source_type);
+ static NetLogWithSource Make(NetLog* net_log, NetLogSourceType source_type);
const NetLog::Source& source() const { return source_; }
NetLog* net_log() const { return net_log_; }
@@ -367,7 +367,7 @@
DEAD = 0xDEADBEEF,
};
- BoundNetLog(const NetLog::Source& source, NetLog* net_log)
+ NetLogWithSource(const NetLog::Source& source, NetLog* net_log)
: source_(source), net_log_(net_log) {}
// TODO(eroman): Temporary until crbug.com/467797 is solved.
diff --git a/net/log/test_net_log.cc b/net/log/test_net_log.cc
index 1fc5a8b..1b8bb54 100644
--- a/net/log/test_net_log.cc
+++ b/net/log/test_net_log.cc
@@ -104,7 +104,8 @@
}
BoundTestNetLog::BoundTestNetLog()
- : net_log_(BoundNetLog::Make(&test_net_log_, NetLogSourceType::NONE)) {}
+ : net_log_(NetLogWithSource::Make(&test_net_log_, NetLogSourceType::NONE)) {
+}
BoundTestNetLog::~BoundTestNetLog() {
}
diff --git a/net/log/test_net_log.h b/net/log/test_net_log.h
index 6190ab87..7568c48 100644
--- a/net/log/test_net_log.h
+++ b/net/log/test_net_log.h
@@ -48,18 +48,18 @@
DISALLOW_COPY_AND_ASSIGN(TestNetLog);
};
-// Helper class that exposes a similar API as BoundNetLog, but uses a
+// Helper class that exposes a similar API as NetLogWithSource, but uses a
// TestNetLog rather than the more generic NetLog.
//
-// A BoundTestNetLog can easily be converted to a BoundNetLog using the
+// A BoundTestNetLog can easily be converted to a NetLogWithSource using the
// bound() method.
class BoundTestNetLog {
public:
BoundTestNetLog();
~BoundTestNetLog();
- // The returned BoundNetLog is only valid while |this| is alive.
- BoundNetLog bound() const { return net_log_; }
+ // The returned NetLogWithSource is only valid while |this| is alive.
+ NetLogWithSource bound() const { return net_log_; }
// Fills |entry_list| with all entries in the log.
void GetEntries(TestNetLogEntry::List* entry_list) const;
@@ -78,7 +78,7 @@
private:
TestNetLog test_net_log_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(BoundTestNetLog);
};
diff --git a/net/log/trace_net_log_observer_unittest.cc b/net/log/trace_net_log_observer_unittest.cc
index 363acc1..cb2c00b 100644
--- a/net/log/trace_net_log_observer_unittest.cc
+++ b/net/log/trace_net_log_observer_unittest.cc
@@ -167,11 +167,11 @@
trace_net_log_observer()->WatchForTraceStart(net_log());
EnableTraceLog();
- BoundNetLog bound_net_log =
- BoundNetLog::Make(net_log(), net::NetLogSourceType::NONE);
+ NetLogWithSource net_log_with_source =
+ NetLogWithSource::Make(net_log(), net::NetLogSourceType::NONE);
net_log()->AddGlobalEntry(NetLogEventType::CANCELLED);
- bound_net_log.BeginEvent(NetLogEventType::URL_REQUEST_START_JOB);
- bound_net_log.EndEvent(NetLogEventType::REQUEST_ALIVE);
+ net_log_with_source.BeginEvent(NetLogEventType::URL_REQUEST_START_JOB);
+ net_log_with_source.EndEvent(NetLogEventType::REQUEST_ALIVE);
net_log()->GetEntries(&entries);
EXPECT_EQ(3u, entries.size());
diff --git a/net/proxy/mock_proxy_resolver.cc b/net/proxy/mock_proxy_resolver.cc
index 60c0aa9..eace850 100644
--- a/net/proxy/mock_proxy_resolver.cc
+++ b/net/proxy/mock_proxy_resolver.cc
@@ -30,11 +30,12 @@
MockAsyncProxyResolver::~MockAsyncProxyResolver() {}
-int MockAsyncProxyResolver::GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request_handle,
- const BoundNetLog& /*net_log*/) {
+int MockAsyncProxyResolver::GetProxyForURL(
+ const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request_handle,
+ const NetLogWithSource& /*net_log*/) {
scoped_refptr<Request> request = new Request(this, url, results, callback);
pending_requests_.push_back(request);
@@ -160,7 +161,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
return impl_->GetProxyForURL(query_url, results, callback, request, net_log);
}
diff --git a/net/proxy/mock_proxy_resolver.h b/net/proxy/mock_proxy_resolver.h
index fceaa10..f705abd6 100644
--- a/net/proxy/mock_proxy_resolver.h
+++ b/net/proxy/mock_proxy_resolver.h
@@ -54,7 +54,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request_handle,
- const BoundNetLog& /*net_log*/) override;
+ const NetLogWithSource& /*net_log*/) override;
void CancelRequest(RequestHandle request_handle) override;
LoadState GetLoadState(RequestHandle request_handle) const override;
const RequestsList& pending_requests() const {
@@ -147,7 +147,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(RequestHandle request) override;
LoadState GetLoadState(RequestHandle request) const override;
diff --git a/net/proxy/mojo_proxy_resolver_v8_tracing_bindings.h b/net/proxy/mojo_proxy_resolver_v8_tracing_bindings.h
index e4b84bd..f96dbdb 100644
--- a/net/proxy/mojo_proxy_resolver_v8_tracing_bindings.h
+++ b/net/proxy/mojo_proxy_resolver_v8_tracing_bindings.h
@@ -18,7 +18,8 @@
// An implementation of ProxyResolverV8Tracing::Bindings that forwards requests
// onto a Client mojo interface. Alert() and OnError() may be called from any
// thread; when they are called from another thread, the calls are proxied to
-// the origin task runner. GetHostResolver() and GetBoundNetLog() may only be
+// the origin task runner. GetHostResolver() and GetNetLogWithSource() may only
+// be
// called from the origin task runner.
template <typename Client>
class MojoProxyResolverV8TracingBindings
@@ -46,9 +47,9 @@
return &host_resolver_;
}
- BoundNetLog GetBoundNetLog() override {
+ NetLogWithSource GetNetLogWithSource() override {
DCHECK(thread_checker_.CalledOnValidThread());
- return BoundNetLog();
+ return NetLogWithSource();
}
private:
diff --git a/net/proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc b/net/proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc
index 47d12486..b743d3e 100644
--- a/net/proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc
+++ b/net/proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc
@@ -51,7 +51,7 @@
bindings_->OnError(-1, base::ASCIIToUTF16("error"));
EXPECT_TRUE(bindings_->GetHostResolver());
- EXPECT_FALSE(bindings_->GetBoundNetLog().net_log());
+ EXPECT_FALSE(bindings_->GetNetLogWithSource().net_log());
ASSERT_EQ(1u, alerts_.size());
EXPECT_EQ("alert", alerts_[0]);
diff --git a/net/proxy/multi_threaded_proxy_resolver.cc b/net/proxy/multi_threaded_proxy_resolver.cc
index 94fddd1..04b0196 100644
--- a/net/proxy/multi_threaded_proxy_resolver.cc
+++ b/net/proxy/multi_threaded_proxy_resolver.cc
@@ -119,7 +119,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(RequestHandle request) override;
LoadState GetLoadState(RequestHandle request) const override;
@@ -282,7 +282,7 @@
GetProxyForURLJob(const GURL& url,
ProxyInfo* results,
const CompletionCallback& callback,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: Job(TYPE_GET_PROXY_FOR_URL, callback),
results_(results),
net_log_(net_log),
@@ -291,7 +291,7 @@
DCHECK(!callback.is_null());
}
- BoundNetLog* net_log() { return &net_log_; }
+ NetLogWithSource* net_log() { return &net_log_; }
void WaitingForThread() override {
was_waiting_for_thread_ = true;
@@ -342,7 +342,7 @@
ProxyInfo* results_;
// Can be used on either "origin" or worker thread.
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
const GURL url_;
// Usable from within DoQuery on the worker thread.
@@ -443,8 +443,11 @@
}
int MultiThreadedProxyResolver::GetProxyForURL(
- const GURL& url, ProxyInfo* results, const CompletionCallback& callback,
- RequestHandle* request, const BoundNetLog& net_log) {
+ const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const NetLogWithSource& net_log) {
DCHECK(CalledOnValidThread());
DCHECK(!callback.is_null());
diff --git a/net/proxy/multi_threaded_proxy_resolver_unittest.cc b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
index a806d47..4aff73e 100644
--- a/net/proxy/multi_threaded_proxy_resolver_unittest.cc
+++ b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
@@ -54,7 +54,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
if (!resolve_latency_.is_zero())
base::PlatformThread::Sleep(resolve_latency_);
@@ -129,7 +129,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
if (should_block_) {
blocked_.Signal();
unblocked_.Wait();
@@ -271,20 +271,23 @@
TestCompletionCallback callback1;
ProxyInfo results1;
- rv = resolver().GetProxyForURL(GURL("http://request1"), &results1,
- callback1.callback(), NULL, BoundNetLog());
+ rv =
+ resolver().GetProxyForURL(GURL("http://request1"), &results1,
+ callback1.callback(), NULL, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestCompletionCallback callback2;
ProxyInfo results2;
- rv = resolver().GetProxyForURL(GURL("http://request2"), &results2,
- callback2.callback(), NULL, BoundNetLog());
+ rv =
+ resolver().GetProxyForURL(GURL("http://request2"), &results2,
+ callback2.callback(), NULL, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestCompletionCallback callback3;
ProxyInfo results3;
- rv = resolver().GetProxyForURL(GURL("http://request3"), &results3,
- callback3.callback(), NULL, BoundNetLog());
+ rv =
+ resolver().GetProxyForURL(GURL("http://request3"), &results3,
+ callback3.callback(), NULL, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Wait for the requests to finish (they must finish in the order they were
@@ -399,9 +402,9 @@
ProxyResolver::RequestHandle request0;
TestCompletionCallback callback0;
ProxyInfo results0;
- rv =
- resolver().GetProxyForURL(GURL("http://request0"), &results0,
- callback0.callback(), &request0, BoundNetLog());
+ rv = resolver().GetProxyForURL(GURL("http://request0"), &results0,
+ callback0.callback(), &request0,
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Wait until requests 0 reaches the worker thread.
@@ -411,22 +414,24 @@
TestCompletionCallback callback1;
ProxyInfo results1;
- rv = resolver().GetProxyForURL(GURL("http://request1"), &results1,
- callback1.callback(), NULL, BoundNetLog());
+ rv =
+ resolver().GetProxyForURL(GURL("http://request1"), &results1,
+ callback1.callback(), NULL, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ProxyResolver::RequestHandle request2;
TestCompletionCallback callback2;
ProxyInfo results2;
- rv =
- resolver().GetProxyForURL(GURL("http://request2"), &results2,
- callback2.callback(), &request2, BoundNetLog());
+ rv = resolver().GetProxyForURL(GURL("http://request2"), &results2,
+ callback2.callback(), &request2,
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestCompletionCallback callback3;
ProxyInfo results3;
- rv = resolver().GetProxyForURL(GURL("http://request3"), &results3,
- callback3.callback(), NULL, BoundNetLog());
+ rv =
+ resolver().GetProxyForURL(GURL("http://request3"), &results3,
+ callback3.callback(), NULL, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Cancel request0 (inprogress) and request2 (pending).
@@ -470,20 +475,23 @@
TestCompletionCallback callback0;
ProxyInfo results0;
- rv = resolver().GetProxyForURL(GURL("http://request0"), &results0,
- callback0.callback(), NULL, BoundNetLog());
+ rv =
+ resolver().GetProxyForURL(GURL("http://request0"), &results0,
+ callback0.callback(), NULL, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestCompletionCallback callback1;
ProxyInfo results1;
- rv = resolver().GetProxyForURL(GURL("http://request1"), &results1,
- callback1.callback(), NULL, BoundNetLog());
+ rv =
+ resolver().GetProxyForURL(GURL("http://request1"), &results1,
+ callback1.callback(), NULL, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestCompletionCallback callback2;
ProxyInfo results2;
- rv = resolver().GetProxyForURL(GURL("http://request2"), &results2,
- callback2.callback(), NULL, BoundNetLog());
+ rv =
+ resolver().GetProxyForURL(GURL("http://request2"), &results2,
+ callback2.callback(), NULL, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Wait until request 0 reaches the worker thread.
@@ -531,7 +539,7 @@
// going on right now.
rv = resolver().GetProxyForURL(GURL("http://request0"), &results[0],
callback[0].callback(), &request[0],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Wait for request 0 to finish.
@@ -548,12 +556,12 @@
factory().resolvers()[0]->Block();
rv = resolver().GetProxyForURL(GURL("http://request1"), &results[1],
callback[1].callback(), &request[1],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
factory().resolvers()[0]->WaitUntilBlocked();
rv = resolver().GetProxyForURL(GURL("http://request2"), &results[2],
callback[2].callback(), &request[2],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(0, callback[2].WaitForResult());
ASSERT_EQ(2u, factory().resolvers().size());
@@ -563,12 +571,12 @@
factory().resolvers()[1]->Block();
rv = resolver().GetProxyForURL(GURL("http://request3"), &results[3],
callback[3].callback(), &request[3],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
factory().resolvers()[1]->WaitUntilBlocked();
rv = resolver().GetProxyForURL(GURL("http://request4"), &results[4],
callback[4].callback(), &request[4],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(0, callback[4].WaitForResult());
@@ -590,15 +598,15 @@
// the first request.
rv = resolver().GetProxyForURL(GURL("http://request5"), &results[5],
callback[5].callback(), &request[5],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = resolver().GetProxyForURL(GURL("http://request6"), &results[6],
callback[6].callback(), &request[6],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = resolver().GetProxyForURL(GURL("http://request7"), &results[7],
callback[7].callback(), &request[7],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
resolver().CancelRequest(request[5]);
resolver().CancelRequest(request[6]);
@@ -645,7 +653,7 @@
rv = resolver().GetProxyForURL(GURL("http://request0"), &results[0],
callback[0].callback(), &request[0],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
factory().resolvers()[0]->WaitUntilBlocked();
@@ -656,7 +664,7 @@
for (int i = 1; i < kNumRequests; ++i) {
rv = resolver().GetProxyForURL(
GURL(base::StringPrintf("http://request%d", i)), &results[i],
- callback[i].callback(), &request[i], BoundNetLog());
+ callback[i].callback(), &request[i], NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
}
diff --git a/net/proxy/proxy_info.cc b/net/proxy/proxy_info.cc
index 7500079..642a421 100644
--- a/net/proxy/proxy_info.cc
+++ b/net/proxy/proxy_info.cc
@@ -69,7 +69,7 @@
return proxy_list_.ToPacString();
}
-bool ProxyInfo::Fallback(int net_error, const BoundNetLog& net_log) {
+bool ProxyInfo::Fallback(int net_error, const NetLogWithSource& net_log) {
return proxy_list_.Fallback(&proxy_retry_info_, net_error, net_log);
}
diff --git a/net/proxy/proxy_info.h b/net/proxy/proxy_info.h
index 3d06a75..f109bc5 100644
--- a/net/proxy/proxy_info.h
+++ b/net/proxy/proxy_info.h
@@ -141,7 +141,7 @@
// is not because of a network error, then |OK| should be passed in (eg. for
// reasons such as local policy). Returns true if there is another proxy is
// available to try in proxy list_.
- bool Fallback(int net_error, const BoundNetLog& net_log);
+ bool Fallback(int net_error, const NetLogWithSource& net_log);
// De-prioritizes the proxies that we have cached as not working, by moving
// them to the end of the proxy list.
diff --git a/net/proxy/proxy_info_unittest.cc b/net/proxy/proxy_info_unittest.cc
index 06a0497e4..f85fd89 100644
--- a/net/proxy/proxy_info_unittest.cc
+++ b/net/proxy/proxy_info_unittest.cc
@@ -37,7 +37,7 @@
EXPECT_EQ(2u, info.proxy_list().size());
EXPECT_EQ("PROXY myproxy:80;DIRECT", info.proxy_list().ToPacString());
// After falling back to direct, we shouldn't consider it DIRECT only.
- EXPECT_TRUE(info.Fallback(ERR_PROXY_CONNECTION_FAILED, BoundNetLog()));
+ EXPECT_TRUE(info.Fallback(ERR_PROXY_CONNECTION_FAILED, NetLogWithSource()));
EXPECT_TRUE(info.is_direct());
EXPECT_FALSE(info.is_direct_only());
}
diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc
index 464f795..7e46134 100644
--- a/net/proxy/proxy_list.cc
+++ b/net/proxy/proxy_list.cc
@@ -154,7 +154,7 @@
bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
int net_error,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
// TODO(eroman): It would be good if instead of removing failed proxies
// from the list, we simply annotated them with the error code they failed
// with. Of course, ProxyService::ReconsiderProxyAfterError() would need to
@@ -187,7 +187,7 @@
bool try_while_bad,
const ProxyServer& proxy_to_retry,
int net_error,
- const BoundNetLog& net_log) const {
+ const NetLogWithSource& net_log) const {
// Mark this proxy as bad.
TimeTicks bad_until = TimeTicks::Now() + retry_delay;
std::string proxy_key = proxy_to_retry.ToURI();
@@ -210,7 +210,7 @@
bool reconsider,
const std::vector<ProxyServer>& additional_proxies_to_bypass,
int net_error,
- const BoundNetLog& net_log) const {
+ const NetLogWithSource& net_log) const {
DCHECK(!retry_delay.is_zero());
if (proxies_.empty()) {
diff --git a/net/proxy/proxy_list.h b/net/proxy/proxy_list.h
index 36cf938..2672fd7d 100644
--- a/net/proxy/proxy_list.h
+++ b/net/proxy/proxy_list.h
@@ -92,7 +92,7 @@
// is another server available in the list.
bool Fallback(ProxyRetryInfoMap* proxy_retry_info,
int net_error,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Updates |proxy_retry_info| to indicate that the first proxy in the list
// is bad. This is distinct from Fallback(), above, to allow updating proxy
@@ -109,7 +109,7 @@
bool reconsider,
const std::vector<ProxyServer>& additional_proxies_to_bypass,
int net_error,
- const BoundNetLog& net_log) const;
+ const NetLogWithSource& net_log) const;
private:
// Updates |proxy_retry_info| to indicate that the |proxy_to_retry| in
@@ -122,7 +122,7 @@
bool try_while_bad,
const ProxyServer& proxy_to_retry,
int net_error,
- const BoundNetLog& net_log) const;
+ const NetLogWithSource& net_log) const;
// List of proxies.
std::vector<ProxyServer> proxies_;
diff --git a/net/proxy/proxy_list_unittest.cc b/net/proxy/proxy_list_unittest.cc
index 6ba4de67..a5fc13d 100644
--- a/net/proxy/proxy_list_unittest.cc
+++ b/net/proxy/proxy_list_unittest.cc
@@ -178,7 +178,7 @@
{
ProxyList list;
ProxyRetryInfoMap retry_info_map;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
ProxyServer proxy_server(
ProxyServer::FromURI("foopy1:80", ProxyServer::SCHEME_HTTP));
std::vector<ProxyServer> bad_proxies;
@@ -198,7 +198,7 @@
{
ProxyList list;
ProxyRetryInfoMap retry_info_map;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
ProxyServer proxy_server(
ProxyServer::FromURI("foopy1:80", ProxyServer::SCHEME_HTTP));
std::vector<ProxyServer> bad_proxies;
@@ -217,7 +217,7 @@
{
ProxyList list;
ProxyRetryInfoMap retry_info_map;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
ProxyServer proxy_server = ProxyServer::FromURI("foopy3:80",
ProxyServer::SCHEME_HTTP);
std::vector<ProxyServer> bad_proxies;
@@ -237,7 +237,7 @@
{
ProxyList list;
ProxyRetryInfoMap retry_info_map;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
ProxyServer proxy_server = ProxyServer::FromURI("foopy2:80",
ProxyServer::SCHEME_HTTP);
std::vector<ProxyServer> bad_proxies;
@@ -255,7 +255,7 @@
{
ProxyList list;
ProxyRetryInfoMap retry_info_map;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
list.SetFromPacString("PROXY foopy1:80;PROXY foopy2:80;PROXY foopy3:80");
// First, mark the proxy as bad for 60 seconds.
@@ -285,7 +285,7 @@
{
ProxyList list;
ProxyRetryInfoMap retry_info_map;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
list.SetFromPacString("PROXY foopy1:80;PROXY foopy2:80;PROXY foopy3:80");
// First, mark the proxy as bad for 1 second.
diff --git a/net/proxy/proxy_resolver.h b/net/proxy/proxy_resolver.h
index 81efe05..b343c42 100644
--- a/net/proxy/proxy_resolver.h
+++ b/net/proxy/proxy_resolver.h
@@ -18,7 +18,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class ProxyInfo;
// Interface for "proxy resolvers". A ProxyResolver fills in a list of proxies
@@ -44,7 +44,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Cancels |request|.
virtual void CancelRequest(RequestHandle request) = 0;
diff --git a/net/proxy/proxy_resolver_factory_mojo.cc b/net/proxy/proxy_resolver_factory_mojo.cc
index 57504f0..ee3fa4c 100644
--- a/net/proxy/proxy_resolver_factory_mojo.cc
+++ b/net/proxy/proxy_resolver_factory_mojo.cc
@@ -51,17 +51,18 @@
ClientMixin(HostResolver* host_resolver,
ProxyResolverErrorObserver* error_observer,
NetLog* net_log,
- const BoundNetLog& bound_net_log)
- : host_resolver_(host_resolver, bound_net_log),
+ const NetLogWithSource& net_log_with_source)
+ : host_resolver_(host_resolver, net_log_with_source),
error_observer_(error_observer),
net_log_(net_log),
- bound_net_log_(bound_net_log) {}
+ net_log_with_source_(net_log_with_source) {}
// Overridden from ClientInterface:
void Alert(const mojo::String& message) override {
base::string16 message_str = message.To<base::string16>();
auto callback = NetLog::StringCallback("message", &message_str);
- bound_net_log_.AddEvent(NetLogEventType::PAC_JAVASCRIPT_ALERT, callback);
+ net_log_with_source_.AddEvent(NetLogEventType::PAC_JAVASCRIPT_ALERT,
+ callback);
if (net_log_)
net_log_->AddGlobalEntry(NetLogEventType::PAC_JAVASCRIPT_ALERT, callback);
}
@@ -69,7 +70,8 @@
void OnError(int32_t line_number, const mojo::String& message) override {
base::string16 message_str = message.To<base::string16>();
auto callback = base::Bind(&NetLogErrorCallback, line_number, &message_str);
- bound_net_log_.AddEvent(NetLogEventType::PAC_JAVASCRIPT_ERROR, callback);
+ net_log_with_source_.AddEvent(NetLogEventType::PAC_JAVASCRIPT_ERROR,
+ callback);
if (net_log_)
net_log_->AddGlobalEntry(NetLogEventType::PAC_JAVASCRIPT_ERROR, callback);
if (error_observer_)
@@ -90,7 +92,7 @@
MojoHostResolverImpl host_resolver_;
ProxyResolverErrorObserver* const error_observer_;
NetLog* const net_log_;
- const BoundNetLog bound_net_log_;
+ const NetLogWithSource net_log_with_source_;
};
// Implementation of ProxyResolver that connects to a Mojo service to evaluate
@@ -120,7 +122,7 @@
ProxyInfo* results,
const net::CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(RequestHandle request) override;
LoadState GetLoadState(RequestHandle request) const override;
@@ -157,7 +159,7 @@
const GURL& url,
ProxyInfo* results,
const CompletionCallback& callback,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
~Job() override;
// Cancels the job and prevents the callback from being run.
@@ -188,7 +190,7 @@
const GURL& url,
ProxyInfo* results,
const CompletionCallback& callback,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: ClientMixin<interfaces::ProxyResolverRequestClient>(
resolver->host_resolver_,
resolver->error_observer_.get(),
@@ -285,7 +287,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(thread_checker_.CalledOnValidThread());
if (!mojo_proxy_resolver_ptr_)
@@ -319,7 +321,7 @@
//
// Note: a Job instance is not tied to a particular resolve request, and hence
// there is no per-request logging to be done (any netlog events are only sent
-// globally) so this always uses an empty BoundNetLog.
+// globally) so this always uses an empty NetLogWithSource.
class ProxyResolverFactoryMojo::Job
: public ClientMixin<interfaces::ProxyResolverFactoryRequestClient>,
public ProxyResolverFactory::Request {
@@ -333,7 +335,7 @@
factory->host_resolver_,
error_observer.get(),
factory->net_log_,
- BoundNetLog()),
+ NetLogWithSource()),
factory_(factory),
resolver_(resolver),
callback_(callback),
diff --git a/net/proxy/proxy_resolver_factory_mojo_unittest.cc b/net/proxy/proxy_resolver_factory_mojo_unittest.cc
index e219554..9a0f6d4 100644
--- a/net/proxy/proxy_resolver_factory_mojo_unittest.cc
+++ b/net/proxy/proxy_resolver_factory_mojo_unittest.cc
@@ -490,14 +490,14 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* request,
- const BoundNetLog& source_net_log) override {
+ const NetLogWithSource& source_net_log) override {
waiter_.NotifyEvent(DNS_REQUEST);
return ERR_IO_PENDING;
}
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& source_net_log) override {
+ const NetLogWithSource& source_net_log) override {
return ERR_DNS_CACHE_MISS;
}
@@ -865,7 +865,7 @@
ProxyInfo results;
TestCompletionCallback callback;
ProxyResolver::RequestHandle handle;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
EXPECT_EQ(
OK,
callback.GetResult(proxy_resolver_mojo_->GetProxyForURL(
@@ -885,7 +885,7 @@
ProxyInfo results;
TestCompletionCallback callback;
ProxyResolver::RequestHandle handle;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
EXPECT_EQ(
ERR_PAC_SCRIPT_TERMINATED,
callback.GetResult(proxy_resolver_mojo_->GetProxyForURL(
diff --git a/net/proxy/proxy_resolver_mac.cc b/net/proxy/proxy_resolver_mac.cc
index 6498ccd..fa1de89 100644
--- a/net/proxy/proxy_resolver_mac.cc
+++ b/net/proxy/proxy_resolver_mac.cc
@@ -192,7 +192,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(RequestHandle request) override;
@@ -215,7 +215,7 @@
ProxyInfo* results,
const CompletionCallback& /*callback*/,
RequestHandle* /*request*/,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
base::ScopedCFTypeRef<CFStringRef> query_ref(
base::SysUTF8ToCFStringRef(query_url.spec()));
base::ScopedCFTypeRef<CFURLRef> query_url_ref(
diff --git a/net/proxy/proxy_resolver_perftest.cc b/net/proxy/proxy_resolver_perftest.cc
index 8e3d720..89d36c7 100644
--- a/net/proxy/proxy_resolver_perftest.cc
+++ b/net/proxy/proxy_resolver_perftest.cc
@@ -133,9 +133,9 @@
// the PAC script.
{
ProxyInfo proxy_info;
- int result =
- resolver->GetProxyForURL(GURL("http://www.warmup.com"), &proxy_info,
- CompletionCallback(), NULL, BoundNetLog());
+ int result = resolver->GetProxyForURL(GURL("http://www.warmup.com"),
+ &proxy_info, CompletionCallback(),
+ NULL, NetLogWithSource());
ASSERT_THAT(result, IsOk());
}
@@ -149,9 +149,9 @@
// Resolve.
ProxyInfo proxy_info;
- int result =
- resolver->GetProxyForURL(GURL(query.query_url), &proxy_info,
- CompletionCallback(), NULL, BoundNetLog());
+ int result = resolver->GetProxyForURL(GURL(query.query_url), &proxy_info,
+ CompletionCallback(), NULL,
+ NetLogWithSource());
// Check that the result was correct. Note that ToPacString() and
// ASSERT_EQ() are fast, so they won't skew the results.
@@ -239,7 +239,7 @@
ProxyInfo* results,
const CompletionCallback& /*callback*/,
RequestHandle* /*request*/,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return resolver_->GetProxyForURL(url, results, bindings_.get());
}
diff --git a/net/proxy/proxy_resolver_v8_tracing.cc b/net/proxy/proxy_resolver_v8_tracing.cc
index 6bee71dec..e03213b 100644
--- a/net/proxy/proxy_resolver_v8_tracing.cc
+++ b/net/proxy/proxy_resolver_v8_tracing.cc
@@ -710,7 +710,7 @@
int result = host_resolver()->Resolve(
MakeDnsRequestInfo(pending_dns_host_, pending_dns_op_), DEFAULT_PRIORITY,
&pending_dns_addresses_, base::Bind(&Job::OnDnsOperationComplete, this),
- &dns_request, bindings_->GetBoundNetLog());
+ &dns_request, bindings_->GetNetLogWithSource());
pending_dns_completed_synchronously_ = result != ERR_IO_PENDING;
diff --git a/net/proxy/proxy_resolver_v8_tracing.h b/net/proxy/proxy_resolver_v8_tracing.h
index 6bca78b..8ae04da0 100644
--- a/net/proxy/proxy_resolver_v8_tracing.h
+++ b/net/proxy/proxy_resolver_v8_tracing.h
@@ -38,9 +38,9 @@
// Returns a HostResolver to use for DNS resolution.
virtual HostResolver* GetHostResolver() = 0;
- // Returns a BoundNetLog to be passed to the HostResolver returned by
+ // Returns a NetLogWithSource to be passed to the HostResolver returned by
// GetHostResolver().
- virtual BoundNetLog GetBoundNetLog() = 0;
+ virtual NetLogWithSource GetNetLogWithSource() = 0;
private:
DISALLOW_COPY_AND_ASSIGN(Bindings);
diff --git a/net/proxy/proxy_resolver_v8_tracing_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
index 861ad0d..d1e30566 100644
--- a/net/proxy/proxy_resolver_v8_tracing_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
@@ -114,9 +114,9 @@
bindings_->OnError(line_number, error);
}
- BoundNetLog GetBoundNetLog() override {
+ NetLogWithSource GetNetLogWithSource() override {
DCHECK(thread_checker_.CalledOnValidThread());
- return BoundNetLog();
+ return NetLogWithSource();
}
HostResolver* GetHostResolver() override {
@@ -686,7 +686,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
EXPECT_FALSE(callback.is_null());
EXPECT_TRUE(out_req);
@@ -709,7 +709,7 @@
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
NOTREACHED();
return ERR_DNS_CACHE_MISS;
}
diff --git a/net/proxy/proxy_resolver_v8_tracing_wrapper.cc b/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
index a368ebf..be3a78f 100644
--- a/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
@@ -35,11 +35,11 @@
BindingsImpl(ProxyResolverErrorObserver* error_observer,
HostResolver* host_resolver,
NetLog* net_log,
- const BoundNetLog& bound_net_log)
+ const NetLogWithSource& net_log_with_source)
: error_observer_(error_observer),
host_resolver_(host_resolver),
net_log_(net_log),
- bound_net_log_(bound_net_log) {}
+ net_log_with_source_(net_log_with_source) {}
// ProxyResolverV8Tracing::Bindings overrides.
void Alert(const base::string16& message) override {
@@ -60,13 +60,15 @@
HostResolver* GetHostResolver() override { return host_resolver_; }
- BoundNetLog GetBoundNetLog() override { return bound_net_log_; }
+ NetLogWithSource GetNetLogWithSource() override {
+ return net_log_with_source_;
+ }
private:
void LogEventToCurrentRequestAndGlobally(
NetLogEventType type,
const NetLog::ParametersCallback& parameters_callback) {
- bound_net_log_.AddEvent(type, parameters_callback);
+ net_log_with_source_.AddEvent(type, parameters_callback);
// Emit to the global NetLog event stream.
if (net_log_)
@@ -76,7 +78,7 @@
ProxyResolverErrorObserver* error_observer_;
HostResolver* host_resolver_;
NetLog* net_log_;
- BoundNetLog bound_net_log_;
+ NetLogWithSource net_log_with_source_;
};
class ProxyResolverV8TracingWrapper : public ProxyResolver {
@@ -91,7 +93,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(RequestHandle request) override;
@@ -121,7 +123,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
resolver_impl_->GetProxyForURL(
url, results, callback, request,
base::WrapUnique(new BindingsImpl(error_observer_.get(), host_resolver_,
@@ -171,7 +173,7 @@
factory_impl_->CreateProxyResolverV8Tracing(
pac_script,
base::WrapUnique(new BindingsImpl(error_observer_local, host_resolver_,
- net_log_, BoundNetLog())),
+ net_log_, NetLogWithSource())),
v8_resolver_local,
base::Bind(&ProxyResolverFactoryV8TracingWrapper::OnProxyResolverCreated,
base::Unretained(this), base::Passed(&v8_resolver), resolver,
diff --git a/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc
index 16264c0..a0e00ed 100644
--- a/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc
@@ -688,7 +688,7 @@
for (size_t i = 0; i < kNumRequests; ++i) {
int rv = resolver->GetProxyForURL(GURL("http://foo/"), &proxy_info[i],
base::Bind(&CrashCallback), &request[i],
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
}
@@ -717,11 +717,12 @@
int rv = resolver->GetProxyForURL(GURL("http://foo/"), &proxy_info1,
base::Bind(&CrashCallback), &request1,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = resolver->GetProxyForURL(GURL("http://foo/"), &proxy_info2,
- callback.callback(), &request2, BoundNetLog());
+ callback.callback(), &request2,
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
resolver->CancelRequest(request1);
@@ -748,7 +749,7 @@
int rv = resolver->GetProxyForURL(GURL("http://throw-an-error/"),
&proxy_info1, base::Bind(&CrashCallback),
- &request1, BoundNetLog());
+ &request1, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Wait until the first request has finished running on the worker thread.
@@ -761,7 +762,7 @@
// Start another request, to make sure it is able to complete.
rv = resolver->GetProxyForURL(GURL("http://i-have-no-idea-what-im-doing/"),
&proxy_info2, callback.callback(), &request2,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -781,7 +782,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
EXPECT_FALSE(callback.is_null());
EXPECT_TRUE(out_req);
@@ -804,7 +805,7 @@
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
NOTREACHED();
return ERR_DNS_CACHE_MISS;
}
@@ -863,7 +864,7 @@
int rv = resolver->GetProxyForURL(GURL("http://foo/req1"), &proxy_info1,
base::Bind(&CrashCallback), &request1,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -871,7 +872,7 @@
rv = resolver->GetProxyForURL(GURL("http://foo/req2"), &proxy_info2,
base::Bind(&CrashCallback), &request2,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -912,7 +913,7 @@
int rv = resolver->GetProxyForURL(GURL("http://foo/"), &proxy_info,
base::Bind(&CrashCallback), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -936,7 +937,7 @@
int rv = resolver->GetProxyForURL(GURL("http://foo/"), &proxy_info,
base::Bind(&CrashCallback), &request,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -1116,7 +1117,7 @@
size_t resolver_i = i % kNumResolvers;
int rv = resolver[resolver_i]->GetProxyForURL(
GURL("http://foo/"), &proxy_info[i], callback[i].callback(), NULL,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
}
diff --git a/net/proxy/proxy_resolver_winhttp.cc b/net/proxy/proxy_resolver_winhttp.cc
index b1d3ce35..6f184c75 100644
--- a/net/proxy/proxy_resolver_winhttp.cc
+++ b/net/proxy/proxy_resolver_winhttp.cc
@@ -61,7 +61,7 @@
ProxyInfo* results,
const CompletionCallback& /*callback*/,
RequestHandle* /*request*/,
- const BoundNetLog& /*net_log*/) override;
+ const NetLogWithSource& /*net_log*/) override;
void CancelRequest(RequestHandle request) override;
LoadState GetLoadState(RequestHandle request) const override;
@@ -94,7 +94,7 @@
ProxyInfo* results,
const CompletionCallback& /*callback*/,
RequestHandle* /*request*/,
- const BoundNetLog& /*net_log*/) {
+ const NetLogWithSource& /*net_log*/) {
// If we don't have a WinHTTP session, then create a new one.
if (!session_handle_ && !OpenWinHttpSession())
return ERR_FAILED;
diff --git a/net/proxy/proxy_script_decider.cc b/net/proxy/proxy_script_decider.cc
index c789275..28ec0ee 100644
--- a/net/proxy/proxy_script_decider.cc
+++ b/net/proxy/proxy_script_decider.cc
@@ -88,8 +88,8 @@
current_pac_source_index_(0u),
pac_mandatory_(false),
next_state_(STATE_NONE),
- net_log_(
- BoundNetLog::Make(net_log, NetLogSourceType::PROXY_SCRIPT_DECIDER)),
+ net_log_(NetLogWithSource::Make(net_log,
+ NetLogSourceType::PROXY_SCRIPT_DECIDER)),
fetch_pac_bytes_(false),
quick_check_enabled_(true),
host_resolver_(nullptr) {
diff --git a/net/proxy/proxy_script_decider.h b/net/proxy/proxy_script_decider.h
index 3234b6a..31ec3ea5 100644
--- a/net/proxy/proxy_script_decider.h
+++ b/net/proxy/proxy_script_decider.h
@@ -182,7 +182,7 @@
PacSourceList pac_sources_;
State next_state_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
bool fetch_pac_bytes_;
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 323edf1..4dfaa89 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -187,7 +187,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ERR_NOT_IMPLEMENTED;
}
@@ -211,7 +211,7 @@
ProxyInfo* results,
const CompletionCallback& callback,
RequestHandle* request,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
results->UsePacString(pac_string_);
return OK;
}
@@ -792,7 +792,7 @@
ProxyDelegate* proxy_delegate,
ProxyInfo* results,
const CompletionCallback& user_callback,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: service_(service),
user_callback_(user_callback),
results_(results),
@@ -896,7 +896,7 @@
return rv;
}
- BoundNetLog* net_log() { return &net_log_; }
+ NetLogWithSource* net_log() { return &net_log_; }
LoadState GetLoadState() const {
if (is_started())
@@ -936,7 +936,7 @@
ProxyResolver::RequestHandle resolve_job_;
ProxyConfig::ID config_id_; // The config id when the resolve was started.
ProxyConfigSource config_source_; // The source of proxy settings.
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// Time when the request was created. Stored here rather than in |results_|
// because the time in |results_| will be cleared.
TimeTicks creation_time_;
@@ -1039,7 +1039,7 @@
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(!callback.is_null());
return ResolveProxyHelper(raw_url, method, result, callback, pac_request,
proxy_delegate, net_log);
@@ -1051,7 +1051,7 @@
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(CalledOnValidThread());
net_log.BeginEvent(NetLogEventType::PROXY_SERVICE);
@@ -1108,11 +1108,12 @@
return rv; // ERR_IO_PENDING
}
-bool ProxyService::TryResolveProxySynchronously(const GURL& raw_url,
- const std::string& method,
- ProxyInfo* result,
- ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log) {
+bool ProxyService::TryResolveProxySynchronously(
+ const GURL& raw_url,
+ const std::string& method,
+ ProxyInfo* result,
+ ProxyDelegate* proxy_delegate,
+ const NetLogWithSource& net_log) {
CompletionCallback null_callback;
return ResolveProxyHelper(raw_url, method, result, null_callback,
nullptr /* pac_request*/, proxy_delegate,
@@ -1280,7 +1281,7 @@
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(CalledOnValidThread());
// Check to see if we have a new config since ResolveProxy was called. We
@@ -1314,7 +1315,7 @@
const ProxyInfo& result,
base::TimeDelta retry_delay,
const std::vector<ProxyServer>& additional_bad_proxies,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
result.proxy_list_.UpdateRetryInfoOnFallback(&proxy_retry_info_, retry_delay,
false, additional_bad_proxies,
OK, net_log);
@@ -1379,7 +1380,7 @@
ProxyDelegate* proxy_delegate,
ProxyInfo* result,
int result_code,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
base::TimeTicks start_time,
bool script_executed) {
// Don't track any metrics if start_time is 0, which will happen when the user
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 663ffd0..0daf114 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -156,7 +156,7 @@
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Returns true if the proxy information could be determined without spawning
// an asynchronous task. Otherwise, |result| is unmodified.
@@ -164,7 +164,7 @@
const std::string& method,
ProxyInfo* result,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// This method is called after a failure to connect or resolve a host name.
// It gives the proxy service an opportunity to reconsider the proxy to use.
@@ -187,7 +187,7 @@
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Explicitly trigger proxy fallback for the given |results| by updating our
// list of bad proxies to include the first entry of |results|, and,
@@ -203,7 +203,7 @@
const ProxyInfo& results,
base::TimeDelta retry_delay,
const std::vector<ProxyServer>& additional_bad_proxies,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Called to report that the last proxy connection succeeded. If |proxy_info|
// has a non empty proxy_retry_info map, the proxies that have been tried (and
@@ -365,7 +365,7 @@
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_delegate,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Cancels all of the requests sent to the ProxyResolver. These will be
// restarted when calling SetReady().
@@ -389,7 +389,7 @@
ProxyDelegate* proxy_delegate,
ProxyInfo* result,
int result_code,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
base::TimeTicks start_time,
bool script_executed);
diff --git a/net/proxy/proxy_service_mojo_unittest.cc b/net/proxy/proxy_service_mojo_unittest.cc
index f3a83964..7c03410 100644
--- a/net/proxy/proxy_service_mojo_unittest.cc
+++ b/net/proxy/proxy_service_mojo_unittest.cc
@@ -115,7 +115,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
net_log.AddEvent(NetLogEventType::HOST_RESOLVER_IMPL_JOB);
return MockHostResolver::Resolve(info, priority, addresses, callback,
out_req, net_log);
@@ -162,7 +162,7 @@
EXPECT_EQ(ERR_IO_PENDING,
proxy_service_->ResolveProxy(GURL("http://foo"), std::string(),
&info, callback.callback(), nullptr,
- nullptr, BoundNetLog()));
+ nullptr, NetLogWithSource()));
// Proxy script fetcher should have a fetch triggered by the first
// |ResolveProxy()| request.
@@ -180,11 +180,11 @@
TEST_F(ProxyServiceMojoTest, DnsResolution) {
ProxyInfo info;
TestCompletionCallback callback;
- BoundTestNetLog bound_net_log;
+ BoundTestNetLog test_net_log;
EXPECT_EQ(ERR_IO_PENDING,
proxy_service_->ResolveProxy(GURL("http://foo"), std::string(),
&info, callback.callback(), nullptr,
- nullptr, bound_net_log.bound()));
+ nullptr, test_net_log.bound()));
// Proxy script fetcher should have a fetch triggered by the first
// |ResolveProxy()| request.
@@ -199,7 +199,7 @@
on_delete_closure_.WaitForResult();
TestNetLogEntry::List entries;
- bound_net_log.GetEntries(&entries);
+ test_net_log.GetEntries(&entries);
// There should be one entry with type TYPE_HOST_RESOLVER_IMPL_JOB.
EXPECT_EQ(1, std::count_if(entries.begin(), entries.end(),
[](const TestNetLogEntry& entry) {
@@ -211,11 +211,11 @@
TEST_F(ProxyServiceMojoTest, Error) {
ProxyInfo info;
TestCompletionCallback callback;
- BoundTestNetLog bound_net_log;
+ BoundTestNetLog test_net_log;
EXPECT_EQ(ERR_IO_PENDING,
proxy_service_->ResolveProxy(GURL("http://foo"), std::string(),
&info, callback.callback(), nullptr,
- nullptr, bound_net_log.bound()));
+ nullptr, test_net_log.bound()));
// Proxy script fetcher should have a fetch triggered by the first
// |ResolveProxy()| request.
@@ -231,7 +231,7 @@
EXPECT_EQ(0u, mock_host_resolver_.num_resolve());
TestNetLogEntry::List entries;
- bound_net_log.GetEntries(&entries);
+ test_net_log.GetEntries(&entries);
CheckCapturedNetLogEntries(entries);
entries.clear();
net_log_.GetEntries(&entries);
@@ -244,7 +244,7 @@
EXPECT_EQ(ERR_IO_PENDING,
proxy_service_->ResolveProxy(GURL("http://foo"), std::string(),
&info, callback.callback(), nullptr,
- nullptr, BoundNetLog()));
+ nullptr, NetLogWithSource()));
// Proxy script fetcher should have a fetch triggered by the first
// |ResolveProxy()| request.
diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc
index 6b379ba..d3f4918 100644
--- a/net/proxy/proxy_service_unittest.cc
+++ b/net/proxy/proxy_service_unittest.cc
@@ -569,7 +569,7 @@
ProxyInfo info;
TestCompletionCallback callback;
int rv = service.ResolveProxy(url, std::string(), &info, callback.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -600,7 +600,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -631,7 +631,7 @@
ProxyServer expected_proxy_server = info.proxy_server();
rv = service.ReconsiderProxyAfterError(
url, "GET", ERR_PROXY_CONNECTION_FAILED, &info, callback2.callback(),
- nullptr, &proxy_delegate, BoundNetLog());
+ nullptr, &proxy_delegate, NetLogWithSource());
// ReconsiderProxyAfterError returns error indicating nothing left.
EXPECT_THAT(rv, IsError(ERR_FAILED));
EXPECT_TRUE(info.is_empty());
@@ -654,7 +654,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -712,7 +712,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -734,7 +734,7 @@
TestCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback2.callback(), nullptr, nullptr, BoundNetLog());
+ callback2.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foobar:10", info.proxy_server().ToURI());
@@ -745,7 +745,7 @@
TestCompletionCallback callback3;
rv = service.ReconsiderProxyAfterError(
url, "GET", ERR_PROXY_CONNECTION_FAILED, &info, callback3.callback(),
- nullptr, &proxy_delegate, BoundNetLog());
+ nullptr, &proxy_delegate, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(info.is_direct());
@@ -754,7 +754,7 @@
TestCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(
url, "GET", ERR_PROXY_CONNECTION_FAILED, &info, callback4.callback(),
- nullptr, &proxy_delegate, BoundNetLog());
+ nullptr, &proxy_delegate, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foobar:20", info.proxy_server().ToURI());
@@ -764,7 +764,7 @@
TestCompletionCallback callback5;
rv = service.ReconsiderProxyAfterError(
url, "GET", ERR_PROXY_CONNECTION_FAILED, &info, callback5.callback(),
- nullptr, &proxy_delegate, BoundNetLog());
+ nullptr, &proxy_delegate, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_FAILED));
EXPECT_TRUE(info.is_empty());
}
@@ -788,7 +788,7 @@
ProxyInfo info;
TestCompletionCallback callback;
int rv = service.ResolveProxy(url, std::string(), &info, callback.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
factory->pending_requests()[0]->CompleteNowWithForwarder(OK, &resolver);
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -826,7 +826,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -853,7 +853,7 @@
// regardless of whether the first request failed in it.
TestCompletionCallback callback2;
rv = service.ResolveProxy(url, std::string(), &info, callback2.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -888,7 +888,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, factory->pending_requests().size());
@@ -918,7 +918,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(url, std::string(), &info, callback2.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, factory->pending_requests().size());
@@ -960,11 +960,11 @@
TestCompletionCallback callback1;
int rv =
service.ResolveProxy(url1, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestCompletionCallback callback2;
rv = service.ResolveProxy(url2, std::string(), &info, callback2.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, factory->pending_requests().size());
@@ -1029,7 +1029,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -1047,7 +1047,7 @@
// mandatory PAC script, ProxyService must not implicitly fall-back to DIRECT.
TestCompletionCallback callback2;
rv = service.ResolveProxy(url, std::string(), &info, callback2.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_MANDATORY_PROXY_CONFIGURATION_FAILED));
EXPECT_FALSE(info.is_direct());
}
@@ -1078,7 +1078,7 @@
ProxyInfo info;
TestCompletionCallback callback;
int rv = service.ResolveProxy(url, std::string(), &info, callback.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that nothing has been sent to the proxy resolver factory yet.
@@ -1124,7 +1124,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -1147,7 +1147,7 @@
// regardless of whether the first request failed in it.
TestCompletionCallback callback2;
rv = service.ResolveProxy(url, std::string(), &info, callback2.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -1183,7 +1183,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -1213,7 +1213,7 @@
TestCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback2.callback(), nullptr, nullptr, BoundNetLog());
+ callback2.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
// Proxy times should not have been modified by fallback.
@@ -1232,7 +1232,7 @@
TestCompletionCallback callback3;
rv = service.ResolveProxy(url, std::string(), &info, callback3.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -1260,7 +1260,7 @@
TestCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback4.callback(), nullptr, nullptr, BoundNetLog());
+ callback4.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_EQ("foopy2:9090", info.proxy_server().ToURI());
@@ -1270,7 +1270,7 @@
TestCompletionCallback callback5;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback5.callback(), nullptr, nullptr, BoundNetLog());
+ callback5.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -1279,7 +1279,7 @@
TestCompletionCallback callback6;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback6.callback(), nullptr, nullptr, BoundNetLog());
+ callback6.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_FAILED));
EXPECT_FALSE(info.is_direct());
EXPECT_TRUE(info.is_empty());
@@ -1291,7 +1291,7 @@
// Look up proxies again
TestCompletionCallback callback7;
rv = service.ResolveProxy(url, std::string(), &info, callback7.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -1333,7 +1333,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -1357,7 +1357,7 @@
TestCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback2.callback(), nullptr, nullptr, BoundNetLog());
+ callback2.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
// Now we get back the second proxy.
@@ -1367,7 +1367,7 @@
TestCompletionCallback callback3;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback3.callback(), nullptr, nullptr, BoundNetLog());
+ callback3.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
// Finally, we get back DIRECT.
@@ -1381,7 +1381,7 @@
TestCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback4.callback(), nullptr, nullptr, BoundNetLog());
+ callback4.callback(), nullptr, nullptr, NetLogWithSource());
// There was nothing left to try after DIRECT, so we are out of
// choices.
EXPECT_THAT(rv, IsError(ERR_FAILED));
@@ -1406,7 +1406,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -1433,7 +1433,7 @@
TestCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback2.callback(), nullptr, nullptr, BoundNetLog());
+ callback2.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy-new/proxy.pac"),
@@ -1455,7 +1455,7 @@
TestCompletionCallback callback3;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback3.callback(), nullptr, nullptr, BoundNetLog());
+ callback3.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_EQ("foopy2:9090", info.proxy_server().ToURI());
@@ -1468,7 +1468,7 @@
TestCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback4.callback(), nullptr, nullptr, BoundNetLog());
+ callback4.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy-new2/proxy.pac"),
@@ -1509,7 +1509,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -1531,7 +1531,7 @@
TestCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback2.callback(), nullptr, nullptr, BoundNetLog());
+ callback2.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
// The first proxy is ignored, and the second one is selected.
@@ -1542,7 +1542,7 @@
ProxyInfo info2;
TestCompletionCallback callback3;
rv = service.ResolveProxy(url, std::string(), &info2, callback3.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -1564,7 +1564,7 @@
TestCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info3,
- callback4.callback(), nullptr, nullptr, BoundNetLog());
+ callback4.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -1607,7 +1607,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(url, std::string(), &info, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -1629,7 +1629,7 @@
TestCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info,
- callback2.callback(), nullptr, nullptr, BoundNetLog());
+ callback2.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
// The first proxy is ignored, and the second one is selected.
@@ -1640,7 +1640,7 @@
ProxyInfo info2;
TestCompletionCallback callback3;
rv = service.ResolveProxy(url, std::string(), &info2, callback3.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -1663,7 +1663,7 @@
TestCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(
url, std::string(), ERR_PROXY_CONNECTION_FAILED, &info3,
- callback4.callback(), nullptr, nullptr, BoundNetLog());
+ callback4.callback(), nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -1700,14 +1700,14 @@
// Request for a .org domain should bypass proxy.
rv = service.ResolveProxy(url1, std::string(), &info[0],
callback[0].callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(info[0].is_direct());
// Request for a .com domain hits the proxy.
rv = service.ResolveProxy(url2, std::string(), &info[1],
callback[1].callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_EQ("foopy1:8080", info[1].proxy_server().ToURI());
}
@@ -1737,7 +1737,7 @@
proxy_info.UseProxyList(proxy_list);
const ProxyRetryInfoMap& retry_info = service.proxy_retry_info();
service.MarkProxiesAsBadUntil(proxy_info, base::TimeDelta::FromSeconds(1),
- additional_bad_proxies, BoundNetLog());
+ additional_bad_proxies, NetLogWithSource());
ASSERT_EQ(4u, retry_info.size());
for (const ProxyServer& proxy_server :
config.proxy_rules().proxies_for_http.GetAll()) {
@@ -1759,7 +1759,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -1772,7 +1772,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(info.is_direct());
EXPECT_EQ("direct://", info.proxy_server().ToURI());
@@ -1785,7 +1785,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foopy2:8080", info.proxy_server().ToURI());
@@ -1799,7 +1799,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -1821,7 +1821,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_THAT(rv, IsOk());
// Should be SOURCE_TEST, even if there are no HTTP proxies configured.
EXPECT_EQ(PROXY_CONFIG_SOURCE_TEST, info.config_source());
@@ -1837,7 +1837,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_THAT(rv, IsOk());
// Used the HTTPS proxy. So source should be TEST.
EXPECT_EQ(PROXY_CONFIG_SOURCE_TEST, info.config_source());
@@ -1852,7 +1852,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_THAT(rv, IsOk());
// ProxyConfig is empty. Source should still be TEST.
EXPECT_EQ(PROXY_CONFIG_SOURCE_TEST, info.config_source());
@@ -1876,7 +1876,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -1889,7 +1889,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("socks4://foopy2:1080", info.proxy_server().ToURI());
@@ -1902,7 +1902,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("socks4://foopy2:1080", info.proxy_server().ToURI());
@@ -1915,7 +1915,7 @@
TestCompletionCallback callback;
int rv = service.ResolveProxy(test_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("socks4://foopy2:1080", info.proxy_server().ToURI());
@@ -1943,7 +1943,7 @@
TestCompletionCallback callback1;
int rv =
service.ResolveProxy(url1, std::string(), &info1, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Successfully initialize the PAC script.
@@ -1957,7 +1957,7 @@
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(url2, std::string(), &info2, callback2.callback(),
- &request2, nullptr, BoundNetLog());
+ &request2, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
GetPendingRequestsForURLs(resolver, url1, url2);
@@ -1965,7 +1965,7 @@
ProxyInfo info3;
TestCompletionCallback callback3;
rv = service.ResolveProxy(url3, std::string(), &info3, callback3.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
GetPendingRequestsForURLs(resolver, url1, url2, url3);
@@ -2019,7 +2019,7 @@
ProxyService::PacRequest* request1;
int rv =
service.ResolveProxy(url1, std::string(), &info1, callback1.callback(),
- &request1, nullptr, BoundNetLog());
+ &request1, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The first request should have triggered download of PAC script.
@@ -2030,14 +2030,14 @@
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(url2, std::string(), &info2, callback2.callback(),
- &request2, nullptr, BoundNetLog());
+ &request2, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ProxyInfo info3;
TestCompletionCallback callback3;
ProxyService::PacRequest* request3;
rv = service.ResolveProxy(url3, std::string(), &info3, callback3.callback(),
- &request3, nullptr, BoundNetLog());
+ &request3, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Nothing has been sent to the factory yet.
@@ -2122,7 +2122,7 @@
TestCompletionCallback callback1;
int rv =
service.ResolveProxy(url1, std::string(), &info1, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The first request should have triggered download of PAC script.
@@ -2132,7 +2132,7 @@
ProxyInfo info2;
TestCompletionCallback callback2;
rv = service.ResolveProxy(url2, std::string(), &info2, callback2.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// At this point the ProxyService should be waiting for the
@@ -2195,14 +2195,14 @@
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info2,
callback2.callback(), &request2, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ProxyInfo info3;
TestCompletionCallback callback3;
rv = service.ResolveProxy(GURL("http://request3"), std::string(), &info3,
callback3.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Nothing has been sent to the factory yet.
@@ -2280,14 +2280,14 @@
TestCompletionCallback callback1;
int rv =
service.ResolveProxy(url1, std::string(), &info1, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ProxyInfo info2;
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(url2, std::string(), &info2, callback2.callback(),
- &request2, nullptr, BoundNetLog());
+ &request2, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that nothing has been sent to the proxy resolver factory yet.
@@ -2360,14 +2360,14 @@
TestCompletionCallback callback1;
int rv =
service.ResolveProxy(url1, std::string(), &info1, callback1.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ProxyInfo info2;
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(url2, std::string(), &info2, callback2.callback(),
- &request2, nullptr, BoundNetLog());
+ &request2, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that nothing has been sent to the proxy resolver factory yet.
@@ -2433,7 +2433,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(), &info1,
callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ProxyInfo info2;
@@ -2441,7 +2441,7 @@
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info2,
callback2.callback(), &request2, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that nothing has been sent to the proxy resolver factory yet.
@@ -2495,7 +2495,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://www.google.com"), std::string(),
&info1, callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that nothing has been sent to the proxy resolver factory yet.
@@ -2527,7 +2527,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://www.google.com"), std::string(),
&info2, callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_EQ(1u, resolver.pending_requests().size());
@@ -2566,7 +2566,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://www.google.com"), std::string(),
&info1, callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that nothing has been sent to the proxy resolver factory yet.
@@ -2597,7 +2597,7 @@
ProxyInfo info;
TestCompletionCallback callback;
int rv = service.ResolveProxy(url, std::string(), &info, callback.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -2615,7 +2615,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(), &info,
callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -2626,7 +2626,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info,
callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_EQ("foopy2:8080", info.proxy_server().ToURI());
}
@@ -2649,7 +2649,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://www.google.com"), std::string(),
&info1, callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Successfully set the autodetect script.
@@ -2678,7 +2678,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://www.google.com"), std::string(),
&info2, callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(info2.is_direct());
@@ -2711,7 +2711,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(), &info1,
callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The first request should have triggered initial download of PAC script.
@@ -2754,7 +2754,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info2,
callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// This second request should have triggered the re-download of the PAC
@@ -2829,7 +2829,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(), &info1,
callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The first request should have triggered initial download of PAC script.
@@ -2890,7 +2890,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info2,
callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that it was sent to the resolver.
@@ -2936,7 +2936,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(), &info1,
callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The first request should have triggered initial download of PAC script.
@@ -3003,7 +3003,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info2,
callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that it was sent to the resolver.
@@ -3049,7 +3049,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(), &info1,
callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The first request should have triggered initial download of PAC script.
@@ -3113,7 +3113,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info2,
callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Check that it was sent to the resolver.
@@ -3159,7 +3159,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(), &info1,
callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The first request should have triggered initial download of PAC script.
@@ -3220,7 +3220,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info2,
callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(info2.is_direct());
}
@@ -3314,7 +3314,7 @@
TestCompletionCallback callback1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(), &info1,
callback1.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The first request should have triggered initial download of PAC script.
@@ -3359,7 +3359,7 @@
TestCompletionCallback callback2;
rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info2,
callback2.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// This request should have sent work to the resolver; complete it.
@@ -3390,7 +3390,7 @@
TestCompletionCallback callback3;
rv = service.ResolveProxy(GURL("http://request3"), std::string(), &info3,
callback3.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(info3.is_direct());
}
@@ -3471,7 +3471,7 @@
TestCompletionCallback callback;
int rv =
service_->ResolveProxy(url, std::string(), &info, callback.callback(),
- nullptr, nullptr, BoundNetLog());
+ nullptr, nullptr, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// First step is to download the PAC script.
@@ -3503,7 +3503,7 @@
TestCompletionCallback callback;
int rv = service_->ResolveProxy(raw_url, std::string(), &info,
callback.callback(), nullptr, nullptr,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(1u, resolver.pending_requests().size());
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl.cc b/net/quic/chromium/bidirectional_stream_quic_impl.cc
index 6e92753..7645f8a3 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl.cc
@@ -54,7 +54,7 @@
void BidirectionalStreamQuicImpl::Start(
const BidirectionalStreamRequestInfo* request_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool send_request_headers_automatically,
BidirectionalStreamImpl::Delegate* delegate,
std::unique_ptr<base::Timer> /* timer */) {
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl.h b/net/quic/chromium/bidirectional_stream_quic_impl.h
index 44e91a9..d1bb385 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl.h
+++ b/net/quic/chromium/bidirectional_stream_quic_impl.h
@@ -40,7 +40,7 @@
// BidirectionalStreamImpl implementation:
void Start(const BidirectionalStreamRequestInfo* request_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool send_request_headers_automatically,
BidirectionalStreamImpl::Delegate* delegate,
std::unique_ptr<base::Timer> timer) override;
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
index ea3e125..b6bae1ec 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
@@ -145,7 +145,7 @@
}
void Start(const BidirectionalStreamRequestInfo* request_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const base::WeakPtr<QuicChromiumClientSession> session) {
stream_.reset(new BidirectionalStreamQuicImpl(session));
stream_->Start(request_info, net_log, send_request_headers_automatically_,
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium.cc b/net/quic/chromium/crypto/proof_verifier_chromium.cc
index d42dba8..5195d74 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium.cc
+++ b/net/quic/chromium/crypto/proof_verifier_chromium.cc
@@ -60,7 +60,7 @@
TransportSecurityState* transport_security_state,
CTVerifier* cert_transparency_verifier,
int cert_verify_flags,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
~Job();
// Starts the proof verification. If |QUIC_PENDING| is returned, then
@@ -155,7 +155,7 @@
base::TimeTicks start_time_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(Job);
};
@@ -167,7 +167,7 @@
TransportSecurityState* transport_security_state,
CTVerifier* cert_transparency_verifier,
int cert_verify_flags,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: proof_verifier_(proof_verifier),
verifier_(cert_verifier),
policy_enforcer_(ct_policy_enforcer),
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium.h b/net/quic/chromium/crypto/proof_verifier_chromium.h
index bc4acce1..88b80f77 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium.h
+++ b/net/quic/chromium/crypto/proof_verifier_chromium.h
@@ -54,11 +54,12 @@
// ProofVerifierChromium needs in order to log correctly.
struct ProofVerifyContextChromium : public ProofVerifyContext {
public:
- ProofVerifyContextChromium(int cert_verify_flags, const BoundNetLog& net_log)
+ ProofVerifyContextChromium(int cert_verify_flags,
+ const NetLogWithSource& net_log)
: cert_verify_flags(cert_verify_flags), net_log(net_log) {}
int cert_verify_flags;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
};
// ProofVerifierChromium implements the QUIC ProofVerifier interface. It is
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium_test.cc b/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
index f6cf67f..1488f02c 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
+++ b/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
@@ -42,7 +42,7 @@
CertVerifyResult* verify_result,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
ADD_FAILURE() << "CertVerifier::Verify() should not be called";
return ERR_FAILED;
}
@@ -58,7 +58,7 @@
X509Certificate* cert,
const ct::EVCertsWhitelist* ev_whitelist,
const ct::SCTList& verified_scts,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
ADD_FAILURE() << "CTPolicyEnforcer::DoesConformToCTEVPolicy() should "
<< "not be called";
return ct::EVPolicyCompliance::EV_POLICY_DOES_NOT_APPLY;
@@ -71,12 +71,12 @@
MOCK_METHOD3(DoesConformToCertPolicy,
ct::CertPolicyCompliance(X509Certificate* cert,
const ct::SCTList&,
- const BoundNetLog&));
+ const NetLogWithSource&));
MOCK_METHOD4(DoesConformToCTEVPolicy,
ct::EVPolicyCompliance(X509Certificate* cert,
const ct::EVCertsWhitelist*,
const ct::SCTList&,
- const BoundNetLog&));
+ const NetLogWithSource&));
};
class MockRequireCTDelegate : public TransportSecurityState::RequireCTDelegate {
@@ -108,7 +108,7 @@
public:
ProofVerifierChromiumTest()
: verify_context_(new ProofVerifyContextChromium(0 /*cert_verify_flags*/,
- BoundNetLog())) {}
+ NetLogWithSource())) {}
void SetUp() override {
EXPECT_CALL(ct_policy_enforcer_, DoesConformToCertPolicy(_, _, _))
diff --git a/net/quic/chromium/crypto_test_utils_chromium.cc b/net/quic/chromium/crypto_test_utils_chromium.cc
index ee7a95a4..8a31864 100644
--- a/net/quic/chromium/crypto_test_utils_chromium.cc
+++ b/net/quic/chromium/crypto_test_utils_chromium.cc
@@ -130,7 +130,8 @@
// static
ProofVerifyContext* CryptoTestUtils::ProofVerifyContextForTesting() {
- return new ProofVerifyContextChromium(/*cert_verify_flags=*/0, BoundNetLog());
+ return new ProofVerifyContextChromium(/*cert_verify_flags=*/0,
+ NetLogWithSource());
}
} // namespace test
diff --git a/net/quic/chromium/quic_chromium_client_session.cc b/net/quic/chromium/quic_chromium_client_session.cc
index dfaafea..24a7c753 100644
--- a/net/quic/chromium/quic_chromium_client_session.cc
+++ b/net/quic/chromium/quic_chromium_client_session.cc
@@ -234,7 +234,7 @@
pkp_bypassed_(false),
num_total_streams_(0),
task_runner_(task_runner),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::QUIC_SESSION)),
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::QUIC_SESSION)),
logger_(new QuicConnectionLogger(this,
connection_description,
std::move(socket_performance_watcher),
@@ -1097,7 +1097,7 @@
void QuicChromiumClientSession::OnNetworkConnected(
NetworkChangeNotifier::NetworkHandle network,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& net_log) {
// If migration_pending_ is false, there was no migration pending or
// an earlier task completed migration.
if (!migration_pending_)
diff --git a/net/quic/chromium/quic_chromium_client_session.h b/net/quic/chromium/quic_chromium_client_session.h
index 61bb3a2..f608a5f 100644
--- a/net/quic/chromium/quic_chromium_client_session.h
+++ b/net/quic/chromium/quic_chromium_client_session.h
@@ -228,7 +228,7 @@
std::unique_ptr<base::Value> GetInfoAsValue(
const std::set<HostPortPair>& aliases);
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
base::WeakPtr<QuicChromiumClientSession> GetWeakPtr();
@@ -268,7 +268,7 @@
// connected network. Migrates this session to the newly connected
// network if the session has a pending migration.
void OnNetworkConnected(NetworkChangeNotifier::NetworkHandle network,
- const BoundNetLog& bound_net_log);
+ const NetLogWithSource& net_log);
// Schedules a migration alarm to wait for a new network.
void OnNoNewNetwork();
@@ -362,7 +362,7 @@
CompletionCallback callback_;
size_t num_total_streams_;
base::TaskRunner* task_runner_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
std::vector<std::unique_ptr<QuicChromiumPacketReader>> packet_readers_;
LoadTimingInfo::ConnectTiming connect_timing_;
std::unique_ptr<QuicConnectionLogger> logger_;
diff --git a/net/quic/chromium/quic_chromium_client_session_test.cc b/net/quic/chromium/quic_chromium_client_session_test.cc
index 98e28a6c..9bb8fbe 100644
--- a/net/quic/chromium/quic_chromium_client_session_test.cc
+++ b/net/quic/chromium/quic_chromium_client_session_test.cc
@@ -152,7 +152,7 @@
QuicCryptoClientConfig crypto_config_;
TestNetLog net_log_;
- BoundTestNetLog bound_net_log_;
+ BoundTestNetLog bound_test_net_log_;
MockClientSocketFactory socket_factory_;
std::unique_ptr<MockRead> default_read_;
std::unique_ptr<SequencedSocketData> socket_data_;
@@ -422,7 +422,7 @@
kQuicYieldAfterPacketsRead,
QuicTime::Delta::FromMilliseconds(
kQuicYieldAfterDurationMilliseconds),
- bound_net_log_.bound()));
+ bound_test_net_log_.bound()));
std::unique_ptr<QuicChromiumPacketWriter> new_writer(
CreateQuicChromiumPacketWriter(new_socket.get(), session_.get()));
@@ -472,7 +472,7 @@
kQuicYieldAfterPacketsRead,
QuicTime::Delta::FromMilliseconds(
kQuicYieldAfterDurationMilliseconds),
- bound_net_log_.bound()));
+ bound_test_net_log_.bound()));
std::unique_ptr<QuicChromiumPacketWriter> new_writer(
CreateQuicChromiumPacketWriter(new_socket.get(), session_.get()));
@@ -533,7 +533,7 @@
kQuicYieldAfterPacketsRead,
QuicTime::Delta::FromMilliseconds(
kQuicYieldAfterDurationMilliseconds),
- bound_net_log_.bound()));
+ bound_test_net_log_.bound()));
std::unique_ptr<QuicChromiumPacketWriter> new_writer(
CreateQuicChromiumPacketWriter(new_socket.get(), session_.get()));
diff --git a/net/quic/chromium/quic_chromium_client_stream.cc b/net/quic/chromium/quic_chromium_client_stream.cc
index e2b8507e..049668e 100644
--- a/net/quic/chromium/quic_chromium_client_stream.cc
+++ b/net/quic/chromium/quic_chromium_client_stream.cc
@@ -24,7 +24,7 @@
QuicChromiumClientStream::QuicChromiumClientStream(
QuicStreamId id,
QuicClientSessionBase* session,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: QuicSpdyStream(id, session),
net_log_(net_log),
delegate_(nullptr),
diff --git a/net/quic/chromium/quic_chromium_client_stream.h b/net/quic/chromium/quic_chromium_client_stream.h
index f105154..e7513ca 100644
--- a/net/quic/chromium/quic_chromium_client_stream.h
+++ b/net/quic/chromium/quic_chromium_client_stream.h
@@ -59,7 +59,7 @@
QuicChromiumClientStream(QuicStreamId id,
QuicClientSessionBase* session,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
~QuicChromiumClientStream() override;
@@ -113,7 +113,7 @@
// it becomes writable.
bool CanWrite(const CompletionCallback& callback);
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
// Prevents this stream from migrating to a new network. May cause other
// concurrent streams within the session to also not migrate.
@@ -135,7 +135,7 @@
void NotifyDelegateOfDataAvailable();
void RunOrBuffer(base::Closure closure);
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
Delegate* delegate_;
bool headers_delivered_;
diff --git a/net/quic/chromium/quic_chromium_client_stream_test.cc b/net/quic/chromium/quic_chromium_client_stream_test.cc
index a240f24..b985c314 100644
--- a/net/quic/chromium/quic_chromium_client_stream_test.cc
+++ b/net/quic/chromium/quic_chromium_client_stream_test.cc
@@ -172,8 +172,8 @@
Perspective::IS_CLIENT,
SupportedVersions(GetParam())),
&push_promise_index_) {
- stream_ =
- new QuicChromiumClientStream(kTestStreamId, &session_, BoundNetLog());
+ stream_ = new QuicChromiumClientStream(kTestStreamId, &session_,
+ NetLogWithSource());
session_.ActivateStream(stream_);
stream_->SetDelegate(&delegate_);
}
@@ -538,7 +538,7 @@
// We don't use stream_ because we want an incoming server push
// stream.
QuicChromiumClientStream* stream = new QuicChromiumClientStream(
- kServerDataStreamId1, &session_, BoundNetLog());
+ kServerDataStreamId1, &session_, NetLogWithSource());
session_.ActivateStream(stream);
InitializeHeaders();
diff --git a/net/quic/chromium/quic_chromium_packet_reader.cc b/net/quic/chromium/quic_chromium_packet_reader.cc
index c89ed25..1c5d660 100644
--- a/net/quic/chromium/quic_chromium_packet_reader.cc
+++ b/net/quic/chromium/quic_chromium_packet_reader.cc
@@ -19,7 +19,7 @@
Visitor* visitor,
int yield_after_packets,
QuicTime::Delta yield_after_duration,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: socket_(socket),
visitor_(visitor),
read_pending_(false),
diff --git a/net/quic/chromium/quic_chromium_packet_reader.h b/net/quic/chromium/quic_chromium_packet_reader.h
index 4b3a0d76..9f820c6 100644
--- a/net/quic/chromium/quic_chromium_packet_reader.h
+++ b/net/quic/chromium/quic_chromium_packet_reader.h
@@ -42,7 +42,7 @@
Visitor* visitor,
int yield_after_packets,
QuicTime::Delta yield_after_duration,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
virtual ~QuicChromiumPacketReader();
// Causes the QuicConnectionHelper to start reading from the socket
@@ -62,7 +62,7 @@
QuicTime::Delta yield_after_duration_;
QuicTime yield_after_;
scoped_refptr<IOBufferWithSize> read_buffer_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
base::WeakPtrFactory<QuicChromiumPacketReader> weak_factory_;
diff --git a/net/quic/chromium/quic_connection_logger.cc b/net/quic/chromium/quic_connection_logger.cc
index be83e19..2f583b64 100644
--- a/net/quic/chromium/quic_connection_logger.cc
+++ b/net/quic/chromium/quic_connection_logger.cc
@@ -288,7 +288,7 @@
QuicSpdySession* session,
const char* const connection_description,
std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: net_log_(net_log),
session_(session),
last_received_packet_number_(0),
diff --git a/net/quic/chromium/quic_connection_logger.h b/net/quic/chromium/quic_connection_logger.h
index c117437d..1b287aba 100644
--- a/net/quic/chromium/quic_connection_logger.h
+++ b/net/quic/chromium/quic_connection_logger.h
@@ -37,7 +37,7 @@
QuicSpdySession* session,
const char* const connection_description,
std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
~QuicConnectionLogger() override;
@@ -98,7 +98,7 @@
// the overall packet loss rate, and record it into a histogram.
void RecordAggregatePacketLossRate() const;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
QuicSpdySession* session_; // Unowned.
// The last packet number received.
QuicPacketNumber last_received_packet_number_;
diff --git a/net/quic/chromium/quic_end_to_end_unittest.cc b/net/quic/chromium/quic_end_to_end_unittest.cc
index ebd3646..145ebbe 100644
--- a/net/quic/chromium/quic_end_to_end_unittest.cc
+++ b/net/quic/chromium/quic_end_to_end_unittest.cc
@@ -219,9 +219,9 @@
request_.method = "POST";
request_.url = GURL("https://test.example.com/");
request_.upload_data_stream = upload_data_stream_.get();
- ASSERT_THAT(
- request_.upload_data_stream->Init(CompletionCallback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(request_.upload_data_stream->Init(CompletionCallback(),
+ NetLogWithSource()),
+ IsOk());
}
// Checks that |consumer| completed and received |status_line| and |body|.
@@ -270,7 +270,7 @@
TestTransactionConsumer consumer(DEFAULT_PRIORITY,
transaction_factory_.get());
- consumer.Start(&request_, BoundNetLog());
+ consumer.Start(&request_, NetLogWithSource());
// Will terminate when the last consumer completes.
base::RunLoop().Run();
@@ -287,7 +287,7 @@
TestTransactionConsumer consumer(DEFAULT_PRIORITY,
transaction_factory_.get());
- consumer.Start(&request_, BoundNetLog());
+ consumer.Start(&request_, NetLogWithSource());
// Will terminate when the last consumer completes.
base::RunLoop().Run();
@@ -310,7 +310,7 @@
TestTransactionConsumer consumer(DEFAULT_PRIORITY,
transaction_factory_.get());
- consumer.Start(&request_, BoundNetLog());
+ consumer.Start(&request_, NetLogWithSource());
// Will terminate when the last consumer completes.
base::RunLoop().Run();
@@ -332,7 +332,7 @@
TestTransactionConsumer consumer(DEFAULT_PRIORITY,
transaction_factory_.get());
- consumer.Start(&request_, BoundNetLog());
+ consumer.Start(&request_, NetLogWithSource());
// Will terminate when the last consumer completes.
base::RunLoop().Run();
@@ -357,7 +357,7 @@
TestTransactionConsumer* consumer = new TestTransactionConsumer(
DEFAULT_PRIORITY, transaction_factory_.get());
consumers.push_back(consumer);
- consumer->Start(&request_, BoundNetLog());
+ consumer->Start(&request_, NetLogWithSource());
}
// Will terminate when the last consumer completes.
diff --git a/net/quic/chromium/quic_http_stream.cc b/net/quic/chromium/quic_http_stream.cc
index 4d7bf4c..d67cf4a2 100644
--- a/net/quic/chromium/quic_http_stream.cc
+++ b/net/quic/chromium/quic_http_stream.cc
@@ -128,7 +128,7 @@
int QuicHttpStream::InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& stream_net_log,
+ const NetLogWithSource& stream_net_log,
const CompletionCallback& callback) {
CHECK(callback_.is_null());
DCHECK(!stream_);
diff --git a/net/quic/chromium/quic_http_stream.h b/net/quic/chromium/quic_http_stream.h
index 3cfd483..61666e0 100644
--- a/net/quic/chromium/quic_http_stream.h
+++ b/net/quic/chromium/quic_http_stream.h
@@ -44,7 +44,7 @@
// HttpStream implementation.
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override;
int SendRequest(const HttpRequestHeaders& request_headers,
HttpResponseInfo* response,
@@ -198,7 +198,7 @@
// Wraps raw_request_body_buf_ to read the remaining data progressively.
scoped_refptr<DrainableIOBuffer> request_body_buf_;
- BoundNetLog stream_net_log_;
+ NetLogWithSource stream_net_log_;
QuicErrorCode quic_connection_error_;
diff --git a/net/quic/chromium/quic_http_stream_test.cc b/net/quic/chromium/quic_http_stream_test.cc
index aa9739d5..447dfa1 100644
--- a/net/quic/chromium/quic_http_stream_test.cc
+++ b/net/quic/chromium/quic_http_stream_test.cc
@@ -127,7 +127,7 @@
void CompleteRead() { UploadDataStream::OnReadCompleted(ERR_FAILED); }
// UploadDataStream implementation:
- int InitInternal(const BoundNetLog& net_log) override { return OK; }
+ int InitInternal(const NetLogWithSource& net_log) override { return OK; }
int ReadInternal(IOBuffer* buf, int buf_len) override {
if (async_ == FailureMode::ASYNC) {
@@ -1070,9 +1070,9 @@
request_.method = "POST";
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
- ASSERT_THAT(
- request_.upload_data_stream->Init(CompletionCallback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(request_.upload_data_stream->Init(CompletionCallback(),
+ NetLogWithSource()),
+ IsOk());
EXPECT_EQ(OK,
stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
@@ -1138,7 +1138,7 @@
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
ASSERT_EQ(OK, request_.upload_data_stream->Init(
- TestCompletionCallback().callback(), BoundNetLog()));
+ TestCompletionCallback().callback(), NetLogWithSource()));
ASSERT_EQ(OK,
stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
@@ -1208,7 +1208,7 @@
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
ASSERT_EQ(OK, request_.upload_data_stream->Init(
- TestCompletionCallback().callback(), BoundNetLog()));
+ TestCompletionCallback().callback(), NetLogWithSource()));
ASSERT_EQ(OK,
stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
@@ -1272,7 +1272,7 @@
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
ASSERT_EQ(OK, request_.upload_data_stream->Init(
- TestCompletionCallback().callback(), BoundNetLog()));
+ TestCompletionCallback().callback(), NetLogWithSource()));
ASSERT_EQ(OK,
stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
@@ -1462,7 +1462,7 @@
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
ASSERT_EQ(OK, request_.upload_data_stream->Init(
- TestCompletionCallback().callback(), BoundNetLog()));
+ TestCompletionCallback().callback(), NetLogWithSource()));
size_t chunk_size = strlen(kUploadData);
upload_data_stream.AppendData(kUploadData, chunk_size, false);
@@ -1490,7 +1490,7 @@
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
ASSERT_EQ(OK, request_.upload_data_stream->Init(
- TestCompletionCallback().callback(), BoundNetLog()));
+ TestCompletionCallback().callback(), NetLogWithSource()));
ASSERT_EQ(OK,
stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
@@ -1515,7 +1515,7 @@
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
ASSERT_EQ(OK, request_.upload_data_stream->Init(
- TestCompletionCallback().callback(), BoundNetLog()));
+ TestCompletionCallback().callback(), NetLogWithSource()));
ASSERT_EQ(OK,
stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
@@ -2013,7 +2013,7 @@
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
ASSERT_EQ(OK, request_.upload_data_stream->Init(
- TestCompletionCallback().callback(), BoundNetLog()));
+ TestCompletionCallback().callback(), NetLogWithSource()));
EXPECT_EQ(OK,
stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
@@ -2045,7 +2045,7 @@
request_.url = GURL("http://www.example.org/");
request_.upload_data_stream = &upload_data_stream;
ASSERT_EQ(OK, request_.upload_data_stream->Init(
- TestCompletionCallback().callback(), BoundNetLog()));
+ TestCompletionCallback().callback(), NetLogWithSource()));
EXPECT_EQ(OK,
stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index c0b86dc8..70b2cda 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -113,9 +113,9 @@
class ScopedConnectionMigrationEventLog {
public:
ScopedConnectionMigrationEventLog(NetLog* net_log, std::string trigger)
- : net_log_(
- BoundNetLog::Make(net_log,
- NetLogSourceType::QUIC_CONNECTION_MIGRATION)) {
+ : net_log_(NetLogWithSource::Make(
+ net_log,
+ NetLogSourceType::QUIC_CONNECTION_MIGRATION)) {
net_log_.BeginEvent(
NetLogEventType::QUIC_CONNECTION_MIGRATION_TRIGGERED,
base::Bind(&NetLogQuicConnectionMigrationTriggerCallback, trigger));
@@ -125,10 +125,10 @@
net_log_.EndEvent(NetLogEventType::QUIC_CONNECTION_MIGRATION_TRIGGERED);
}
- const BoundNetLog& net_log() { return net_log_; }
+ const NetLogWithSource& net_log() { return net_log_; }
private:
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
};
void HistogramCreateSessionFailure(enum CreateSessionFailure error) {
@@ -136,7 +136,7 @@
CREATION_ERROR_MAX);
}
-void HistogramAndLogMigrationFailure(const BoundNetLog& net_log,
+void HistogramAndLogMigrationFailure(const NetLogWithSource& net_log,
enum QuicConnectionMigrationStatus status,
QuicConnectionId connection_id,
std::string reason) {
@@ -218,7 +218,7 @@
CertVerifierJob(const QuicServerId& server_id,
int cert_verify_flags,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: server_id_(server_id),
verify_callback_(nullptr),
verify_context_(base::WrapUnique(
@@ -266,7 +266,7 @@
std::unique_ptr<ProofVerifyDetails> verify_details_;
std::string verify_error_details_;
base::TimeTicks start_time_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
CompletionCallback callback_;
base::WeakPtrFactory<CertVerifierJob> weak_factory_;
@@ -283,7 +283,7 @@
bool was_alternative_service_recently_broken,
int cert_verify_flags,
QuicServerInfo* server_info,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Creates a new job to handle the resumption of for connecting an
// existing session.
@@ -338,7 +338,7 @@
bool was_alternative_service_recently_broken_;
std::unique_ptr<QuicServerInfo> server_info_;
bool started_another_job_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
int num_sent_client_hellos_;
QuicChromiumClientSession* session_;
CompletionCallback callback_;
@@ -355,7 +355,7 @@
bool was_alternative_service_recently_broken,
int cert_verify_flags,
QuicServerInfo* server_info,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: io_state_(STATE_RESOLVE_HOST),
factory_(factory),
host_resolver_(host_resolver),
@@ -650,7 +650,7 @@
int cert_verify_flags,
const GURL& url,
base::StringPiece method,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) {
DCHECK(callback_.is_null());
DCHECK(factory_);
@@ -925,7 +925,7 @@
int cert_verify_flags,
const GURL& url,
base::StringPiece method,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
QuicStreamRequest* request) {
DCHECK(server_id.host_port_pair().Equals(HostPortPair::FromURL(url)));
// Enforce session affinity for promised streams.
@@ -1042,7 +1042,7 @@
void QuicStreamFactory::CreateAuxilaryJob(const QuicSessionKey& key,
int cert_verify_flags,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
Job* aux_job =
new Job(this, host_resolver_, key, WasQuicRecentlyBroken(key.server_id()),
cert_verify_flags, nullptr, net_log);
@@ -1328,7 +1328,7 @@
void QuicStreamFactory::MaybeMigrateOrCloseSessions(
NetworkHandle new_network,
bool close_if_cannot_migrate,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& net_log) {
QuicStreamFactory::SessionIdMap::iterator it = all_sessions_.begin();
while (it != all_sessions_.end()) {
QuicChromiumClientSession* session = it->first;
@@ -1337,15 +1337,15 @@
// If session is already bound to |new_network|, move on.
if (session->GetDefaultSocket()->GetBoundNetwork() == new_network) {
HistogramAndLogMigrationFailure(
- bound_net_log, MIGRATION_STATUS_ALREADY_MIGRATED,
- session->connection_id(), "Already bound to new network");
+ net_log, MIGRATION_STATUS_ALREADY_MIGRATED, session->connection_id(),
+ "Already bound to new network");
continue;
}
// Close idle sessions.
if (session->GetNumActiveStreams() == 0) {
HistogramAndLogMigrationFailure(
- bound_net_log, MIGRATION_STATUS_NO_MIGRATABLE_STREAMS,
+ net_log, MIGRATION_STATUS_NO_MIGRATABLE_STREAMS,
session->connection_id(), "No active sessions");
session->CloseSessionOnError(
ERR_NETWORK_CHANGED, QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS);
@@ -1357,7 +1357,7 @@
// Do not migrate sessions where connection migration is disabled.
if (session->config()->DisableConnectionMigration()) {
- HistogramAndLogMigrationFailure(bound_net_log, MIGRATION_STATUS_DISABLED,
+ HistogramAndLogMigrationFailure(net_log, MIGRATION_STATUS_DISABLED,
session->connection_id(),
"Migration disabled");
if (close_if_cannot_migrate) {
@@ -1370,7 +1370,7 @@
// Do not migrate sessions with non-migratable streams.
if (session->HasNonMigratableStreams()) {
HistogramAndLogMigrationFailure(
- bound_net_log, MIGRATION_STATUS_NON_MIGRATABLE_STREAM,
+ net_log, MIGRATION_STATUS_NON_MIGRATABLE_STREAM,
session->connection_id(), "Non-migratable stream");
if (close_if_cannot_migrate) {
session->CloseSessionOnError(
@@ -1388,7 +1388,7 @@
}
MigrateSessionToNewNetwork(session, new_network,
- /*close_session_on_error=*/true, bound_net_log);
+ /*close_session_on_error=*/true, net_log);
}
}
@@ -1425,7 +1425,7 @@
void QuicStreamFactory::MigrateSessionToNewPeerAddress(
QuicChromiumClientSession* session,
IPEndPoint peer_address,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& net_log) {
if (!allow_server_migration_)
return;
@@ -1437,16 +1437,16 @@
// causes the session to use the default network for the new socket.
MigrateSessionInner(session, peer_address,
NetworkChangeNotifier::kInvalidNetworkHandle,
- /*close_session_on_error=*/true, bound_net_log);
+ /*close_session_on_error=*/true, net_log);
}
MigrationResult QuicStreamFactory::MigrateSessionToNewNetwork(
QuicChromiumClientSession* session,
NetworkHandle network,
bool close_session_on_error,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& net_log) {
return MigrateSessionInner(session, session->connection()->peer_address(),
- network, close_session_on_error, bound_net_log);
+ network, close_session_on_error, net_log);
}
MigrationResult QuicStreamFactory::MigrateSessionInner(
@@ -1454,7 +1454,7 @@
IPEndPoint peer_address,
NetworkHandle network,
bool close_session_on_error,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& net_log) {
// Use OS-specified port for socket (DEFAULT_BIND) instead of
// using the PortSuggester since the connection is being migrated
// and not being newly created.
@@ -1463,9 +1463,9 @@
DatagramSocket::DEFAULT_BIND, RandIntCallback(),
session->net_log().net_log(), session->net_log().source()));
if (ConfigureSocket(socket.get(), peer_address, network) != OK) {
- HistogramAndLogMigrationFailure(
- bound_net_log, MIGRATION_STATUS_INTERNAL_ERROR,
- session->connection_id(), "Socket configuration failed");
+ HistogramAndLogMigrationFailure(net_log, MIGRATION_STATUS_INTERNAL_ERROR,
+ session->connection_id(),
+ "Socket configuration failed");
if (close_session_on_error) {
session->CloseSessionOnError(ERR_NETWORK_CHANGED, QUIC_INTERNAL_ERROR);
}
@@ -1481,9 +1481,9 @@
if (!session->MigrateToSocket(std::move(socket), std::move(new_reader),
std::move(new_writer))) {
- HistogramAndLogMigrationFailure(
- bound_net_log, MIGRATION_STATUS_TOO_MANY_CHANGES,
- session->connection_id(), "Too many migrations");
+ HistogramAndLogMigrationFailure(net_log, MIGRATION_STATUS_TOO_MANY_CHANGES,
+ session->connection_id(),
+ "Too many migrations");
if (close_session_on_error) {
session->CloseSessionOnError(ERR_NETWORK_CHANGED,
QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES);
@@ -1491,10 +1491,9 @@
return MigrationResult::FAILURE;
}
HistogramMigrationStatus(MIGRATION_STATUS_SUCCESS);
- bound_net_log.AddEvent(
- NetLogEventType::QUIC_CONNECTION_MIGRATION_SUCCESS,
- base::Bind(&NetLogQuicConnectionMigrationSuccessCallback,
- session->connection_id()));
+ net_log.AddEvent(NetLogEventType::QUIC_CONNECTION_MIGRATION_SUCCESS,
+ base::Bind(&NetLogQuicConnectionMigrationSuccessCallback,
+ session->connection_id()));
return MigrationResult::SUCCESS;
}
@@ -1601,7 +1600,7 @@
const AddressList& address_list,
base::TimeTicks dns_resolution_start_time,
base::TimeTicks dns_resolution_end_time,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
QuicChromiumClientSession** session) {
if (need_to_evaluate_consecutive_disabled_count_) {
task_runner_->PostDelayedTask(
@@ -1763,7 +1762,7 @@
QuicAsyncStatus QuicStreamFactory::StartCertVerifyJob(
const QuicServerId& server_id,
int cert_verify_flags,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
if (!race_cert_verification_)
return QUIC_FAILURE;
QuicCryptoClientConfig::CachedState* cached =
diff --git a/net/quic/chromium/quic_stream_factory.h b/net/quic/chromium/quic_stream_factory.h
index f1216de1..0f0d988 100644
--- a/net/quic/chromium/quic_stream_factory.h
+++ b/net/quic/chromium/quic_stream_factory.h
@@ -109,7 +109,7 @@
int cert_verify_flags,
const GURL& url,
base::StringPiece method,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback);
void OnRequestComplete(int rv);
@@ -127,12 +127,12 @@
const QuicServerId& server_id() const { return server_id_; }
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
private:
QuicStreamFactory* factory_;
QuicServerId server_id_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
CompletionCallback callback_;
base::WeakPtr<QuicChromiumClientSession> session_;
@@ -232,7 +232,7 @@
int cert_verify_flags,
const GURL& url,
base::StringPiece method,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
QuicStreamRequest* request);
// Called when the handshake for |session| is confirmed. If QUIC is disabled
@@ -299,7 +299,7 @@
void MaybeMigrateOrCloseSessions(
NetworkChangeNotifier::NetworkHandle new_network,
bool close_if_cannot_migrate,
- const BoundNetLog& bound_net_log);
+ const NetLogWithSource& net_log);
// Method that initiates migration of |session| if |session| is
// active and if there is an alternate network than the one to which
@@ -313,13 +313,13 @@
QuicChromiumClientSession* session,
NetworkChangeNotifier::NetworkHandle network,
bool close_session_on_error,
- const BoundNetLog& bound_net_log);
+ const NetLogWithSource& net_log);
// Migrates |session| over to using |peer_address|. Causes a PING frame
// to be sent to the new peer address.
void MigrateSessionToNewPeerAddress(QuicChromiumClientSession* session,
IPEndPoint peer_address,
- const BoundNetLog& bound_net_log);
+ const NetLogWithSource& net_log);
// NetworkChangeNotifier::IPAddressObserver methods:
@@ -413,7 +413,7 @@
// disk cache. This job is started via a PostTask.
void CreateAuxilaryJob(const QuicSessionKey& key,
int cert_verify_flags,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Returns a newly created QuicHttpStream owned by the caller.
std::unique_ptr<QuicHttpStream> CreateFromSession(
@@ -431,7 +431,7 @@
const AddressList& address_list,
base::TimeTicks dns_resolution_start_time,
base::TimeTicks dns_resolution_end_time,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
QuicChromiumClientSession** session);
void ActivateSession(const QuicSessionKey& key,
QuicChromiumClientSession* session);
@@ -452,7 +452,7 @@
// given |server_id|.
QuicAsyncStatus StartCertVerifyJob(const QuicServerId& server_id,
int cert_verify_flags,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Initializes the cached state associated with |server_id| in
// |crypto_config_| with the information in |server_info|. Populates
@@ -481,7 +481,7 @@
IPEndPoint peer_address,
NetworkChangeNotifier::NetworkHandle network,
bool close_session_on_error,
- const BoundNetLog& bound_net_log);
+ const NetLogWithSource& net_log);
// Called to re-enable QUIC when QUIC has been disabled.
void OpenFactory();
diff --git a/net/quic/chromium/quic_stream_factory_test.cc b/net/quic/chromium/quic_stream_factory_test.cc
index 165f9f85..af1dd14 100644
--- a/net/quic/chromium/quic_stream_factory_test.cc
+++ b/net/quic/chromium/quic_stream_factory_test.cc
@@ -547,7 +547,7 @@
GURL url4_;
PrivacyMode privacy_mode_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
TestCompletionCallback callback_;
// Variables to configure QuicStreamFactory.
diff --git a/net/quic/test_tools/quic_stream_factory_peer.cc b/net/quic/test_tools/quic_stream_factory_peer.cc
index fd92db5..0ea8fcd 100644
--- a/net/quic/test_tools/quic_stream_factory_peer.cc
+++ b/net/quic/test_tools/quic_stream_factory_peer.cc
@@ -104,7 +104,7 @@
QuicStreamFactory* factory,
const QuicServerId& server_id,
int cert_verify_flags,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
return factory->StartCertVerifyJob(server_id, cert_verify_flags, net_log);
}
diff --git a/net/quic/test_tools/quic_stream_factory_peer.h b/net/quic/test_tools/quic_stream_factory_peer.h
index 0c314778..373f71f5 100644
--- a/net/quic/test_tools/quic_stream_factory_peer.h
+++ b/net/quic/test_tools/quic_stream_factory_peer.h
@@ -70,7 +70,7 @@
static QuicAsyncStatus StartCertVerifyJob(QuicStreamFactory* factory,
const QuicServerId& server_id,
int cert_verify_flags,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
static void SetYieldAfterPackets(QuicStreamFactory* factory,
int yield_after_packets);
diff --git a/net/sdch/sdch_owner.cc b/net/sdch/sdch_owner.cc
index 6e6af62..c7fca71 100644
--- a/net/sdch/sdch_owner.cc
+++ b/net/sdch/sdch_owner.cc
@@ -365,7 +365,7 @@
int use_count,
const std::string& dictionary_text,
const GURL& dictionary_url,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool was_from_cache) {
struct DictionaryItem {
base::Time last_used;
diff --git a/net/sdch/sdch_owner.h b/net/sdch/sdch_owner.h
index e6af266..48a7db2 100644
--- a/net/sdch/sdch_owner.h
+++ b/net/sdch/sdch_owner.h
@@ -128,7 +128,7 @@
int use_count,
const std::string& dictionary_text,
const GURL& dictionary_url,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool was_from_cache);
void SetClockForTesting(std::unique_ptr<base::Clock> clock);
diff --git a/net/sdch/sdch_owner_unittest.cc b/net/sdch/sdch_owner_unittest.cc
index 4a05a59..b2dd6be9 100644
--- a/net/sdch/sdch_owner_unittest.cc
+++ b/net/sdch/sdch_owner_unittest.cc
@@ -264,7 +264,7 @@
bool CompletePendingRequest(const GURL& dictionary_url,
const std::string& dictionary_text,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool was_from_cache) {
for (std::vector<PendingRequest>::iterator it = requests_.begin();
it != requests_.end(); ++it) {
@@ -324,7 +324,7 @@
SdchManager& sdch_manager() { return sdch_manager_; }
SdchOwner& sdch_owner() { return *(sdch_owner_.get()); }
- BoundNetLog& bound_net_log() { return net_log_; }
+ NetLogWithSource& net_log() { return net_log_; }
int JobsRecentlyCreated() {
int result = error_jobs_created - last_jobs_created_;
@@ -397,7 +397,7 @@
private:
int last_jobs_created_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
int dictionary_creation_index_;
// The dependencies of these objects (sdch_owner_ -> {sdch_manager_,
@@ -426,8 +426,7 @@
GURL dict_url2(std::string(generic_url) + "/d2");
std::string dictionary1(NewSdchDictionary(kMaxSizeForTesting / 2));
sdch_owner().OnDictionaryFetched(base::Time::Now(), base::Time::Now(), 1,
- dictionary1, dict_url1, bound_net_log(),
- false);
+ dictionary1, dict_url1, net_log(), false);
EXPECT_EQ(0, JobsRecentlyCreated());
SignalGetDictionaryAndClearJobs(request_url, dict_url2);
EXPECT_EQ(1, JobsRecentlyCreated());
@@ -437,8 +436,7 @@
std::string dictionary2(NewSdchDictionary(
(kMaxSizeForTesting / 2 - kMinFetchSpaceForTesting / 2)));
sdch_owner().OnDictionaryFetched(base::Time::Now(), base::Time::Now(), 1,
- dictionary2, dict_url2, bound_net_log(),
- false);
+ dictionary2, dict_url2, net_log(), false);
EXPECT_EQ(0, JobsRecentlyCreated());
SignalGetDictionaryAndClearJobs(request_url, dict_url3);
EXPECT_EQ(0, JobsRecentlyCreated());
@@ -842,7 +840,7 @@
}
protected:
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
std::unique_ptr<SdchManager> manager_;
MockSdchDictionaryFetcher* fetcher_;
std::unique_ptr<SdchOwner> owner_;
diff --git a/net/server/http_server_unittest.cc b/net/server/http_server_unittest.cc
index 997d8650..f0b269f 100644
--- a/net/server/http_server_unittest.cc
+++ b/net/server/http_server_unittest.cc
@@ -543,7 +543,7 @@
int GetLocalAddress(IPEndPoint* address) const override {
return ERR_NOT_IMPLEMENTED;
}
- const BoundNetLog& NetLog() const override { return net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
void SetSubresourceSpeculation() override {}
void SetOmniboxSpeculation() override {}
bool WasEverUsed() const override { return true; }
@@ -611,7 +611,7 @@
int read_buf_len_;
CompletionCallback read_callback_;
std::string pending_read_data_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(MockStreamSocket);
};
diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h
index 89e4d0f..8d92cb52 100644
--- a/net/socket/client_socket_handle.h
+++ b/net/socket/client_socket_handle.h
@@ -82,7 +82,7 @@
ClientSocketPool::RespectLimits respect_limits,
const CompletionCallback& callback,
PoolType* pool,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// An initialized handle can be reset, which causes it to return to the
// un-initialized state. This releases the underlying socket, which in the
@@ -236,7 +236,7 @@
ClientSocketPool::RespectLimits respect_limits,
const CompletionCallback& callback,
PoolType* pool,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
requesting_source_ = net_log.source();
CHECK(!group_name.empty());
diff --git a/net/socket/client_socket_pool.h b/net/socket/client_socket_pool.h
index b59f6049..a5c11d6 100644
--- a/net/socket/client_socket_pool.h
+++ b/net/socket/client_socket_pool.h
@@ -106,7 +106,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// RequestSockets is used to request that |num_sockets| be connected in the
// connection group for |group_name|. If the connection group already has
@@ -121,7 +121,7 @@
virtual void RequestSockets(const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) = 0;
+ const NetLogWithSource& net_log) = 0;
// Called to cancel a RequestSocket call that returned ERR_IO_PENDING. The
// same handle parameter must be passed to this method as was passed to the
@@ -197,7 +197,7 @@
const std::string& group_name,
const scoped_refptr<typename PoolType::SocketParams>& params,
int num_sockets,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
pool->RequestSockets(group_name, ¶ms, num_sockets, net_log);
}
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index cd4ce3a9..fd8492f 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -40,7 +40,7 @@
RequestPriority priority,
ClientSocketPool::RespectLimits respect_limits,
Delegate* delegate,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: group_name_(group_name),
timeout_duration_(timeout_duration),
priority_(priority),
@@ -131,7 +131,7 @@
RequestPriority priority,
ClientSocketPool::RespectLimits respect_limits,
Flags flags,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: handle_(handle),
callback_(callback),
priority_(priority),
@@ -860,7 +860,7 @@
// Copies of these are needed because |job| may be deleted before they are
// accessed.
- BoundNetLog job_log = job->net_log();
+ NetLogWithSource job_log = job->net_log();
LoadTimingInfo::ConnectTiming connect_timing = job->connect_timing();
// RemoveConnectJob(job, _) must be called by all branches below;
@@ -973,7 +973,7 @@
ClientSocketHandle* handle,
base::TimeDelta idle_time,
Group* group,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(socket);
handle->SetSocket(std::move(socket));
handle->set_reuse_type(reuse_type);
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index a5e17b3..ecd38e3 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -84,12 +84,12 @@
RequestPriority priority,
ClientSocketPool::RespectLimits respect_limits,
Delegate* delegate,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
virtual ~ConnectJob();
// Accessors
const std::string& group_name() const { return group_name_; }
- const BoundNetLog& net_log() { return net_log_; }
+ const NetLogWithSource& net_log() { return net_log_; }
// Releases ownership of the underlying socket to the caller.
// Returns the released socket, or NULL if there was a connection
@@ -115,7 +115,7 @@
return connect_timing_;
}
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
protected:
RequestPriority priority() const { return priority_; }
@@ -148,7 +148,7 @@
base::OneShotTimer timer_;
Delegate* delegate_;
std::unique_ptr<StreamSocket> socket_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// A ConnectJob is idle until Connect() has been called.
bool idle_;
@@ -181,7 +181,7 @@
RequestPriority priority,
ClientSocketPool::RespectLimits respect_limits,
Flags flags,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
virtual ~Request();
@@ -192,7 +192,7 @@
return respect_limits_;
}
Flags flags() const { return flags_; }
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
// TODO(eroman): Temporary until crbug.com/467797 is solved.
void CrashIfInvalid() const;
@@ -210,7 +210,7 @@
const RequestPriority priority_;
const ClientSocketPool::RespectLimits respect_limits_;
const Flags flags_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
// TODO(eroman): Temporary until crbug.com/467797 is solved.
Liveness liveness_ = ALIVE;
@@ -547,7 +547,7 @@
ClientSocketHandle* handle,
base::TimeDelta time_idle,
Group* group,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Adds |socket| to the list of idle sockets for |group|.
void AddIdleSocket(std::unique_ptr<StreamSocket> socket, Group* group);
@@ -668,7 +668,7 @@
ClientSocketPool::RespectLimits respect_limits,
internal::ClientSocketPoolBaseHelper::Flags flags,
const scoped_refptr<SocketParams>& params,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: internal::ClientSocketPoolBaseHelper::Request(handle,
callback,
priority,
@@ -741,7 +741,7 @@
ClientSocketPool::RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
std::unique_ptr<const Request> request(new Request(
handle, callback, priority, respect_limits,
internal::ClientSocketPoolBaseHelper::NORMAL, params, net_log));
@@ -754,7 +754,7 @@
void RequestSockets(const std::string& group_name,
const scoped_refptr<SocketParams>& params,
int num_sockets,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
const Request request(nullptr /* no handle */, CompletionCallback(), IDLE,
ClientSocketPool::RespectLimits::ENABLED,
internal::ClientSocketPoolBaseHelper::NO_IDLE_SOCKETS,
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 9007dd2..21be2f1e 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -127,7 +127,7 @@
explicit MockClientSocket(net::NetLog* net_log)
: connected_(false),
has_unread_data_(false),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::SOCKET)),
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::SOCKET)),
was_used_to_convey_data_(false) {}
// Sets whether the socket has unread data. If true, the next call to Read()
@@ -177,7 +177,7 @@
return ERR_UNEXPECTED;
}
- const BoundNetLog& NetLog() const override { return net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
void SetSubresourceSpeculation() override {}
void SetOmniboxSpeculation() override {}
@@ -198,7 +198,7 @@
private:
bool connected_;
bool has_unread_data_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
bool was_used_to_convey_data_;
DISALLOW_COPY_AND_ASSIGN(MockClientSocket);
@@ -281,12 +281,13 @@
ConnectJob::Delegate* delegate,
MockClientSocketFactory* client_socket_factory,
NetLog* net_log)
- : ConnectJob(group_name,
- timeout_duration,
- request.priority(),
- request.respect_limits(),
- delegate,
- BoundNetLog::Make(net_log, NetLogSourceType::CONNECT_JOB)),
+ : ConnectJob(
+ group_name,
+ timeout_duration,
+ request.priority(),
+ request.respect_limits(),
+ delegate,
+ NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)),
job_type_(job_type),
client_socket_factory_(client_socket_factory),
load_state_(LOAD_STATE_IDLE),
@@ -510,7 +511,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
const scoped_refptr<TestSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<TestSocketParams>*>(params);
return base_.RequestSocket(group_name, *casted_socket_params, priority,
@@ -520,7 +521,7 @@
void RequestSockets(const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
const scoped_refptr<TestSocketParams>* casted_params =
static_cast<const scoped_refptr<TestSocketParams>*>(params);
@@ -748,7 +749,8 @@
TestClientSocketPoolBase::Request request(
&ignored, CompletionCallback(), DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- internal::ClientSocketPoolBaseHelper::NORMAL, params_, BoundNetLog());
+ internal::ClientSocketPoolBaseHelper::NORMAL, params_,
+ NetLogWithSource());
std::unique_ptr<TestConnectJob> job(
new TestConnectJob(TestConnectJob::kMockJob, "a", request,
base::TimeDelta::FromMicroseconds(1), &delegate,
@@ -764,7 +766,8 @@
TestClientSocketPoolBase::Request request(
&ignored, CompletionCallback(), DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- internal::ClientSocketPoolBaseHelper::NORMAL, params_, BoundNetLog());
+ internal::ClientSocketPoolBaseHelper::NORMAL, params_,
+ NetLogWithSource());
// Deleted by TestConnectJobDelegate.
TestConnectJob* job =
new TestConnectJob(TestConnectJob::kMockPendingJob,
@@ -1081,15 +1084,16 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
ClientSocketHandle handles[4];
for (size_t i = 0; i < arraysize(handles); ++i) {
TestCompletionCallback callback;
- EXPECT_EQ(ERR_IO_PENDING,
- handles[i].Init("b", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handles[i].Init("b", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(), NetLogWithSource()));
}
// One will be stalled, cancel all the handles now.
@@ -1107,20 +1111,21 @@
ClientSocketHandle handles[kDefaultMaxSockets];
TestCompletionCallback callbacks[kDefaultMaxSockets];
for (int i = 0; i < kDefaultMaxSockets; ++i) {
- EXPECT_EQ(OK, handles[i].Init(
- base::IntToString(i), params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callbacks[i].callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(OK,
+ handles[i].Init(base::IntToString(i), params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callbacks[i].callback(), pool_.get(),
+ NetLogWithSource()));
}
// Force a stalled group.
ClientSocketHandle stalled_handle;
TestCompletionCallback callback;
- EXPECT_EQ(
- ERR_IO_PENDING,
- stalled_handle.Init("foo", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(ERR_IO_PENDING,
+ stalled_handle.Init("foo", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(),
+ NetLogWithSource()));
// Cancel the stalled request.
stalled_handle.Reset();
@@ -1143,22 +1148,22 @@
ClientSocketHandle handles[kDefaultMaxSockets];
for (int i = 0; i < kDefaultMaxSockets; ++i) {
TestCompletionCallback callback;
- EXPECT_EQ(
- ERR_IO_PENDING,
- handles[i].Init(base::IntToString(i), params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(ERR_IO_PENDING,
+ handles[i].Init(base::IntToString(i), params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(),
+ NetLogWithSource()));
}
// Force a stalled group.
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle stalled_handle;
TestCompletionCallback callback;
- EXPECT_EQ(
- ERR_IO_PENDING,
- stalled_handle.Init("foo", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(ERR_IO_PENDING,
+ stalled_handle.Init("foo", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(),
+ NetLogWithSource()));
// Since it is stalled, it should have no connect jobs.
EXPECT_EQ(0, pool_->NumConnectJobsInGroup("foo"));
@@ -1197,11 +1202,11 @@
ClientSocketHandle handles[kDefaultMaxSockets];
for (int i = 0; i < kDefaultMaxSockets; ++i) {
TestCompletionCallback callback;
- EXPECT_EQ(
- OK, handles[i].Init(base::StringPrintf("Take 2: %d", i), params_,
- DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(OK, handles[i].Init(base::StringPrintf("Take 2: %d", i),
+ params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(),
+ NetLogWithSource()));
}
EXPECT_EQ(kDefaultMaxSockets, client_socket_factory_.allocation_count());
@@ -1209,11 +1214,11 @@
EXPECT_FALSE(pool_->IsStalled());
// Now we will hit the socket limit.
- EXPECT_EQ(
- ERR_IO_PENDING,
- stalled_handle.Init("foo", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(ERR_IO_PENDING,
+ stalled_handle.Init("foo", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(),
+ NetLogWithSource()));
EXPECT_TRUE(pool_->IsStalled());
// Dropping out of scope will close all handles and return them to idle.
@@ -1236,9 +1241,10 @@
for (int i = 0; i < kDefaultMaxSockets; ++i) {
ClientSocketHandle handle;
TestCompletionCallback callback;
- EXPECT_EQ(OK, handle.Init(base::IntToString(i), params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ OK, handle.Init(base::IntToString(i), params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(), NetLogWithSource()));
}
// Flush all the DoReleaseSocket tasks.
@@ -1253,9 +1259,10 @@
// "0" is special here, since it should be the first entry in the sorted map,
// which is the one which we would close an idle socket for. We shouldn't
// close an idle socket though, since we should reuse the idle socket.
- EXPECT_EQ(OK, handle.Init("0", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(OK,
+ handle.Init("0", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(kDefaultMaxSockets, client_socket_factory_.allocation_count());
EXPECT_EQ(kDefaultMaxSockets - 1, pool_->IdleSocketCount());
@@ -1327,7 +1334,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
handle.Reset();
}
@@ -1341,7 +1348,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
handle.Reset();
@@ -1349,7 +1356,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ callback2.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback2.WaitForResult(), IsOk());
EXPECT_FALSE(callback.have_result());
@@ -1417,7 +1424,7 @@
TestCompletionCallback callback;
int rv = handle->Init("a", params, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- nested_callback, pool, BoundNetLog());
+ nested_callback, pool, NetLogWithSource());
if (rv != ERR_IO_PENDING) {
DCHECK_EQ(TestConnectJob::kMockJob, next_job_type);
nested_callback.Run(rv);
@@ -1440,7 +1447,7 @@
base::Bind(&RequestSocketOnComplete, &handle, pool_.get(),
connect_job_factory_, TestConnectJob::kMockPendingJob,
second_result_callback.callback()),
- pool_.get(), BoundNetLog());
+ pool_.get(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(second_result_callback.WaitForResult(), IsOk());
@@ -1460,7 +1467,7 @@
base::Bind(&RequestSocketOnComplete, &handle, pool_.get(),
connect_job_factory_, TestConnectJob::kMockPendingJob,
second_result_callback.callback()),
- pool_.get(), BoundNetLog());
+ pool_.get(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(second_result_callback.WaitForResult(), IsOk());
@@ -1525,7 +1532,7 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Cancel the active request.
@@ -1533,7 +1540,7 @@
rv = handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -1678,12 +1685,13 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
BoundTestNetLog log2;
- EXPECT_EQ(ERR_IO_PENDING,
- handle2.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle2.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
handle.Reset();
@@ -1730,9 +1738,9 @@
std::vector<TestSocketRequest*> request_order;
size_t completion_count; // unused
TestSocketRequest req1(&request_order, &completion_count);
- int rv = req1.handle()->Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- req1.callback(), pool_.get(), BoundNetLog());
+ int rv = req1.handle()->Init(
+ "a", params_, DEFAULT_PRIORITY, ClientSocketPool::RespectLimits::ENABLED,
+ req1.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(req1.WaitForResult(), IsOk());
@@ -1743,12 +1751,12 @@
TestSocketRequest req2(&request_order, &completion_count);
rv = req2.handle()->Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- req2.callback(), pool_.get(), BoundNetLog());
+ req2.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestSocketRequest req3(&request_order, &completion_count);
rv = req3.handle()->Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- req3.callback(), pool_.get(), BoundNetLog());
+ req3.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Both Requests 2 and 3 are pending. We release socket 1 which should
@@ -1782,15 +1790,15 @@
std::vector<TestSocketRequest*> request_order;
size_t completion_count; // unused
TestSocketRequest req1(&request_order, &completion_count);
- int rv = req1.handle()->Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- req1.callback(), pool_.get(), BoundNetLog());
+ int rv = req1.handle()->Init(
+ "a", params_, DEFAULT_PRIORITY, ClientSocketPool::RespectLimits::ENABLED,
+ req1.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TestSocketRequest req2(&request_order, &completion_count);
rv = req2.handle()->Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- req2.callback(), pool_.get(), BoundNetLog());
+ req2.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The pending job is sync.
@@ -1799,7 +1807,7 @@
TestSocketRequest req3(&request_order, &completion_count);
rv = req3.handle()->Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- req3.callback(), pool_.get(), BoundNetLog());
+ req3.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(req1.WaitForResult(), IsError(ERR_CONNECTION_FAILED));
@@ -1821,7 +1829,7 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(LOAD_STATE_CONNECTING, handle.GetLoadState());
@@ -1842,7 +1850,7 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
client_socket_factory_.SetJobLoadState(0, LOAD_STATE_RESOLVING_HOST);
@@ -1850,7 +1858,7 @@
TestCompletionCallback callback2;
rv = handle2.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog());
+ callback2.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
client_socket_factory_.SetJobLoadState(1, LOAD_STATE_RESOLVING_HOST);
@@ -1875,14 +1883,14 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ClientSocketHandle handle2;
TestCompletionCallback callback2;
rv = handle2.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog());
+ callback2.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
client_socket_factory_.SetJobLoadState(1, LOAD_STATE_RESOLVING_HOST);
@@ -1905,7 +1913,7 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, MEDIUM,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(LOAD_STATE_CONNECTING, handle.GetLoadState());
@@ -1915,7 +1923,7 @@
TestCompletionCallback callback2;
rv = handle2.Init("a", params_, HIGHEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog());
+ callback2.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(LOAD_STATE_WAITING_FOR_AVAILABLE_SOCKET, handle.GetLoadState());
EXPECT_EQ(LOAD_STATE_CONNECTING, handle2.GetLoadState());
@@ -1947,7 +1955,7 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Request for socket from another pool.
@@ -1955,7 +1963,7 @@
TestCompletionCallback callback2;
rv = handle2.Init("b", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog());
+ callback2.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Request another socket from the first pool. Request should stall at the
@@ -1964,7 +1972,7 @@
TestCompletionCallback callback3;
rv = handle3.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog());
+ callback2.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// The third handle should remain stalled as the other sockets in its group
@@ -1997,7 +2005,7 @@
EXPECT_EQ(ERR_PROXY_AUTH_REQUESTED,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_TRUE(handle.is_initialized());
EXPECT_TRUE(handle.socket());
}
@@ -2012,7 +2020,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_PROXY_AUTH_REQUESTED));
EXPECT_TRUE(handle.is_initialized());
@@ -2029,7 +2037,7 @@
EXPECT_EQ(ERR_CONNECTION_FAILED,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
EXPECT_TRUE(handle.is_ssl_error());
@@ -2046,7 +2054,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_CONNECTION_FAILED));
EXPECT_FALSE(handle.is_initialized());
@@ -2068,7 +2076,7 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
ASSERT_THAT(callback.WaitForResult(), IsOk());
@@ -2124,7 +2132,7 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
@@ -2132,7 +2140,7 @@
TestCompletionCallback callback2;
rv = handle2.Init("a", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog());
+ callback2.callback(), pool_.get(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle2));
@@ -2195,28 +2203,28 @@
TestCompletionCallback callback;
int rv = handle.Init("a", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsOk());
ClientSocketHandle handle2;
TestCompletionCallback callback2;
rv = handle2.Init("a", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog());
+ callback2.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsOk());
ClientSocketHandle handle3;
TestCompletionCallback callback3;
rv = handle3.Init("a", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback3.callback(), pool_.get(), BoundNetLog());
+ callback3.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ClientSocketHandle handle4;
TestCompletionCallback callback4;
rv = handle4.Init("a", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback4.callback(), pool_.get(), BoundNetLog());
+ callback4.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Release two disconnected sockets.
@@ -2254,26 +2262,26 @@
EXPECT_EQ(OK, handle_a[i].Init("a", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
callback_a[i].callback(), pool_.get(),
- BoundNetLog()));
+ NetLogWithSource()));
EXPECT_EQ(OK, handle_b[i].Init("b", params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
callback_b[i].callback(), pool_.get(),
- BoundNetLog()));
+ NetLogWithSource()));
}
// Make 4 pending requests, 2 per group.
for (int i = 2; i < 4; ++i) {
- EXPECT_EQ(
- ERR_IO_PENDING,
- handle_a[i].Init("a", params_, LOWEST,
- ClientSocketPool::RespectLimits::ENABLED,
- callback_a[i].callback(), pool_.get(), BoundNetLog()));
- EXPECT_EQ(
- ERR_IO_PENDING,
- handle_b[i].Init("b", params_, LOWEST,
- ClientSocketPool::RespectLimits::ENABLED,
- callback_b[i].callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(ERR_IO_PENDING,
+ handle_a[i].Init("a", params_, LOWEST,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback_a[i].callback(), pool_.get(),
+ NetLogWithSource()));
+ EXPECT_EQ(ERR_IO_PENDING,
+ handle_b[i].Init("b", params_, LOWEST,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback_b[i].callback(), pool_.get(),
+ NetLogWithSource()));
}
// Release b's socket first. The order is important, because in
@@ -2360,7 +2368,7 @@
EXPECT_EQ(expected_result_,
handle2_.Init("a", con_params, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2_.callback(), pool_, BoundNetLog()));
+ callback2_.callback(), pool_, NetLogWithSource()));
}
TestClientSocketPool* const pool_;
@@ -2386,10 +2394,11 @@
connect_job_factory_->set_job_type(
TestConnectJob::kMockPendingAdditionalErrorStateJob);
TestReleasingSocketRequest req(pool_.get(), OK, false);
- EXPECT_EQ(ERR_IO_PENDING,
- req.handle()->Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- req.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ req.handle()->Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ req.callback(), pool_.get(), NetLogWithSource()));
// The next job should complete synchronously
connect_job_factory_->set_job_type(TestConnectJob::kMockJob);
@@ -2417,7 +2426,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
pool_->FlushWithError(ERR_NETWORK_CHANGED);
@@ -2434,7 +2443,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
EXPECT_EQ(ClientSocketHandle::UNUSED, handle.reuse_type());
@@ -2446,7 +2455,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
EXPECT_EQ(ClientSocketHandle::UNUSED, handle.reuse_type());
}
@@ -2475,10 +2484,11 @@
private:
void OnComplete(int result) {
SetResult(result);
- EXPECT_EQ(ERR_IO_PENDING,
- handle_.Init(group_name_, params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- nested_callback_.callback(), pool_, BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle_.Init(group_name_, params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ nested_callback_.callback(), pool_, NetLogWithSource()));
}
const std::string group_name_;
@@ -2502,7 +2512,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
// Second job will be started during the first callback, and will
// asynchronously complete with OK.
@@ -2527,17 +2537,17 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("bar", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
// Start (MaxSockets - 1) connected sockets to reach max sockets.
connect_job_factory_->set_job_type(TestConnectJob::kMockJob);
ClientSocketHandle handles[kDefaultMaxSockets];
for (int i = 1; i < kDefaultMaxSockets; ++i) {
TestCompletionCallback callback;
- EXPECT_EQ(OK,
- handles[i].Init("bar", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(OK, handles[i].Init("bar", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(),
+ NetLogWithSource()));
}
base::RunLoop().RunUntilIdle();
@@ -2565,7 +2575,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("bar", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
ASSERT_TRUE(pool_->HasGroup("bar"));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("bar"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("bar"));
@@ -2593,14 +2603,15 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("bar", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle2;
TestCompletionCallback callback2;
- EXPECT_EQ(ERR_IO_PENDING,
- handle2.Init("bar", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle2.Init("bar", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
ASSERT_TRUE(pool_->HasGroup("bar"));
EXPECT_EQ(2, pool_->NumConnectJobsInGroup("bar"));
@@ -2627,7 +2638,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle1.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
// No idle sockets, no pending jobs.
@@ -2640,7 +2651,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle2.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
// No idle sockets, and one connecting job.
EXPECT_EQ(0, pool_->IdleSocketCount());
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
@@ -2679,7 +2690,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle1.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
// No idle sockets, no pending jobs.
@@ -2692,7 +2703,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle2.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
// No idle sockets, and one connecting job.
EXPECT_EQ(0, pool_->IdleSocketCount());
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
@@ -2733,7 +2744,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle1.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
// No idle sockets, no pending jobs.
@@ -2746,7 +2757,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle2.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
// No idle sockets, and one connecting job.
EXPECT_EQ(0, pool_->IdleSocketCount());
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
@@ -2787,10 +2798,11 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
// Make the second request synchronously fail. This should make the Group
@@ -2800,10 +2812,11 @@
TestCompletionCallback callback2;
// It'll be ERR_IO_PENDING now, but the TestConnectJob will synchronously fail
// when created.
- EXPECT_EQ(ERR_IO_PENDING,
- handle2.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle2.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
@@ -2819,23 +2832,26 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
ClientSocketHandle handle2;
TestCompletionCallback callback2;
- EXPECT_EQ(ERR_IO_PENDING,
- handle2.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle2.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
ClientSocketHandle handle3;
TestCompletionCallback callback3;
- EXPECT_EQ(ERR_IO_PENDING,
- handle3.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback3.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle3.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback3.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback1.WaitForResult(), IsOk());
EXPECT_THAT(callback2.WaitForResult(), IsOk());
@@ -2849,15 +2865,18 @@
handle2.Reset();
handle3.Reset();
- EXPECT_EQ(OK, handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
- EXPECT_EQ(OK, handle2.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
- EXPECT_EQ(OK, handle3.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback3.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ OK, handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
+ EXPECT_EQ(
+ OK, handle2.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
+ EXPECT_EQ(
+ OK, handle3.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback3.callback(), pool_.get(), NetLogWithSource()));
EXPECT_TRUE(handle1.socket()->WasEverUsed());
EXPECT_TRUE(handle2.socket()->WasEverUsed());
@@ -2868,7 +2887,7 @@
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
@@ -2877,17 +2896,19 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
ClientSocketHandle handle2;
TestCompletionCallback callback2;
- EXPECT_EQ(ERR_IO_PENDING,
- handle2.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle2.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
@@ -2909,17 +2930,18 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
@@ -2927,10 +2949,11 @@
ClientSocketHandle handle2;
TestCompletionCallback callback2;
- EXPECT_EQ(ERR_IO_PENDING,
- handle2.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle2.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
@@ -2953,31 +2976,34 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
ClientSocketHandle handle2;
TestCompletionCallback callback2;
- EXPECT_EQ(ERR_IO_PENDING,
- handle2.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle2.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
ClientSocketHandle handle3;
TestCompletionCallback callback3;
- EXPECT_EQ(ERR_IO_PENDING,
- handle3.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback3.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle3.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback3.callback(), pool_.get(), NetLogWithSource()));
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(3, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(3, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
@@ -3001,8 +3027,7 @@
ASSERT_FALSE(pool_->HasGroup("a"));
- pool_->RequestSockets("a", ¶ms_, kDefaultMaxSockets,
- BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, kDefaultMaxSockets, NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(kDefaultMaxSockets, pool_->NumConnectJobsInGroup("a"));
@@ -3010,8 +3035,7 @@
ASSERT_FALSE(pool_->HasGroup("b"));
- pool_->RequestSockets("b", ¶ms_, kDefaultMaxSockets,
- BoundNetLog());
+ pool_->RequestSockets("b", ¶ms_, kDefaultMaxSockets, NetLogWithSource());
ASSERT_FALSE(pool_->HasGroup("b"));
}
@@ -3023,7 +3047,7 @@
ASSERT_FALSE(pool_->HasGroup("a"));
pool_->RequestSockets("a", ¶ms_, kDefaultMaxSockets - 1,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(kDefaultMaxSockets - 1, pool_->NumConnectJobsInGroup("a"));
@@ -3033,8 +3057,7 @@
ASSERT_FALSE(pool_->HasGroup("b"));
- pool_->RequestSockets("b", ¶ms_, kDefaultMaxSockets,
- BoundNetLog());
+ pool_->RequestSockets("b", ¶ms_, kDefaultMaxSockets, NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("b"));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("b"));
@@ -3047,10 +3070,11 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
ASSERT_THAT(callback1.WaitForResult(), IsOk());
handle1.Reset();
@@ -3059,7 +3083,7 @@
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
@@ -3072,10 +3096,11 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
ASSERT_THAT(callback1.WaitForResult(), IsOk());
ASSERT_TRUE(pool_->HasGroup("a"));
@@ -3084,7 +3109,7 @@
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
@@ -3097,7 +3122,7 @@
connect_job_factory_->set_job_type(TestConnectJob::kMockJob);
pool_->RequestSockets("a", ¶ms_, kDefaultMaxSocketsPerGroup,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
@@ -3105,7 +3130,7 @@
EXPECT_EQ(kDefaultMaxSocketsPerGroup, pool_->IdleSocketCountInGroup("a"));
pool_->RequestSockets("b", ¶ms_, kDefaultMaxSocketsPerGroup,
- BoundNetLog());
+ NetLogWithSource());
EXPECT_EQ(0, pool_->NumConnectJobsInGroup("b"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("b"));
@@ -3117,14 +3142,14 @@
connect_job_factory_->set_job_type(TestConnectJob::kMockFailingJob);
pool_->RequestSockets("a", ¶ms_, kDefaultMaxSocketsPerGroup,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_FALSE(pool_->HasGroup("a"));
connect_job_factory_->set_job_type(
TestConnectJob::kMockAdditionalErrorStateJob);
pool_->RequestSockets("a", ¶ms_, kDefaultMaxSocketsPerGroup,
- BoundNetLog());
+ NetLogWithSource());
ASSERT_FALSE(pool_->HasGroup("a"));
}
@@ -3133,31 +3158,32 @@
CreatePool(4, 4);
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(2, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(2, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
ASSERT_THAT(callback1.WaitForResult(), IsOk());
ClientSocketHandle handle2;
TestCompletionCallback callback2;
int rv = handle2.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog());
+ callback2.callback(), pool_.get(), NetLogWithSource());
if (rv != OK) {
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback2.WaitForResult(), IsOk());
@@ -3175,7 +3201,7 @@
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(2, pool_->IdleSocketCountInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(2, pool_->IdleSocketCountInGroup("a"));
@@ -3185,24 +3211,24 @@
CreatePool(4, 4);
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
- pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 1, NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(2, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 3, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 3, NetLogWithSource());
EXPECT_EQ(3, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(3, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
- pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 1, NetLogWithSource());
EXPECT_EQ(3, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(3, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
@@ -3212,7 +3238,7 @@
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
- pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 1, NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
@@ -3221,10 +3247,11 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
@@ -3245,7 +3272,7 @@
TEST_F(ClientSocketPoolBaseTest, ConnectedPreconnectJobsHaveNoConnectTimes) {
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
connect_job_factory_->set_job_type(TestConnectJob::kMockJob);
- pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 1, NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
@@ -3254,9 +3281,10 @@
ClientSocketHandle handle;
TestCompletionCallback callback;
- EXPECT_EQ(OK, handle.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(OK,
+ handle.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(), NetLogWithSource()));
// Make sure the idle socket was used.
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
@@ -3279,10 +3307,11 @@
// Set up one idle socket in "a".
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
ASSERT_THAT(callback1.WaitForResult(), IsOk());
handle1.Reset();
@@ -3291,14 +3320,16 @@
// Set up two active sockets in "b".
ClientSocketHandle handle2;
TestCompletionCallback callback2;
- EXPECT_EQ(ERR_IO_PENDING,
- handle1.Init("b", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
- EXPECT_EQ(ERR_IO_PENDING,
- handle2.Init("b", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle1.Init("b", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle2.Init("b", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback2.callback(), pool_.get(), NetLogWithSource()));
ASSERT_THAT(callback1.WaitForResult(), IsOk());
ASSERT_THAT(callback2.WaitForResult(), IsOk());
@@ -3311,7 +3342,7 @@
// Requesting 2 preconnected sockets for "a" should fail to allocate any more
// sockets for "a", and "b" should still have 2 active sockets.
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
@@ -3329,7 +3360,7 @@
EXPECT_EQ(2, pool_->IdleSocketCountInGroup("b"));
EXPECT_EQ(0, pool_->NumActiveSocketsInGroup("b"));
- pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 2, NetLogWithSource());
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
@@ -3348,7 +3379,7 @@
connect_job_factory_->set_job_type(TestConnectJob::kMockWaitingJob);
connect_job_factory_->set_timeout_duration(
base::TimeDelta::FromMilliseconds(500));
- pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 1, NetLogWithSource());
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
@@ -3370,7 +3401,7 @@
// Make the ConnectJob hang forever.
connect_job_factory_->set_job_type(TestConnectJob::kMockWaitingJob);
- pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 1, NetLogWithSource());
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
@@ -3383,7 +3414,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
// Timer has started, but the backup connect job shouldn't be created yet.
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
@@ -3405,7 +3436,7 @@
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
connect_job_factory_->set_job_type(TestConnectJob::kMockUnreadDataJob);
- pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
+ pool_->RequestSockets("a", ¶ms_, 1, NetLogWithSource());
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
@@ -3417,9 +3448,10 @@
connect_job_factory_->set_job_type(TestConnectJob::kMockFailingJob);
ClientSocketHandle handle;
TestCompletionCallback callback;
- EXPECT_EQ(OK, handle.Init("a", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(OK,
+ handle.Init("a", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(), NetLogWithSource()));
ASSERT_TRUE(pool_->HasGroup("a"));
EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
@@ -3454,14 +3486,14 @@
scoped_refptr<TestSocketParams> params(new TestSocketParams());
return handle_.Init(group_name_, params, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback_.callback(), pool, BoundNetLog());
+ callback_.callback(), pool, NetLogWithSource());
}
int RequestSocketWithoutLimits(TestClientSocketPool* pool) {
scoped_refptr<TestSocketParams> params(new TestSocketParams());
return handle_.Init(group_name_, params, MAXIMUM_PRIORITY,
ClientSocketPool::RespectLimits::DISABLED,
- callback_.callback(), pool, BoundNetLog());
+ callback_.callback(), pool, NetLogWithSource());
}
bool ReleaseOneConnection() {
@@ -3526,7 +3558,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
}
@@ -3544,9 +3576,10 @@
// has the maximum number of connections already, it's not stalled).
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(OK, handle1.Init("group1", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ OK, handle1.Init("group1", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
MockLayeredPool mock_layered_pool(pool_.get(), "group2");
EXPECT_THAT(mock_layered_pool.RequestSocket(pool_.get()), IsOk());
@@ -3558,7 +3591,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("group2", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool_.get(), BoundNetLog()));
+ callback2.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback2.WaitForResult(), IsOk());
}
@@ -3576,9 +3609,10 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(OK, handle1.Init("group1", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ OK, handle1.Init("group1", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
MockLayeredPool mock_layered_pool(pool_.get(), "group2");
EXPECT_THAT(mock_layered_pool.RequestSocket(pool_.get()), IsOk());
@@ -3590,10 +3624,11 @@
// The third request is made when the socket pool is in a stalled state.
ClientSocketHandle handle3;
TestCompletionCallback callback3;
- EXPECT_EQ(ERR_IO_PENDING,
- handle3.Init("group3", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback3.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle3.Init("group3", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback3.callback(), pool_.get(), NetLogWithSource()));
base::RunLoop().RunUntilIdle();
EXPECT_FALSE(callback3.have_result());
@@ -3604,10 +3639,11 @@
mock_layered_pool.set_can_release_connection(true);
ClientSocketHandle handle4;
TestCompletionCallback callback4;
- EXPECT_EQ(ERR_IO_PENDING,
- handle4.Init("group3", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback4.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle4.Init("group3", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback4.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback3.WaitForResult(), IsOk());
EXPECT_FALSE(callback4.have_result());
@@ -3634,9 +3670,10 @@
ClientSocketHandle handle1;
TestCompletionCallback callback1;
- EXPECT_EQ(OK, handle1.Init("group1", params_, DEFAULT_PRIORITY,
- ClientSocketPool::RespectLimits::ENABLED,
- callback1.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ OK, handle1.Init("group1", params_, DEFAULT_PRIORITY,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback1.callback(), pool_.get(), NetLogWithSource()));
MockLayeredPool mock_layered_pool(pool_.get(), "group2");
EXPECT_THAT(mock_layered_pool.RequestSocket(pool_.get()), IsOk());
@@ -3648,10 +3685,11 @@
// The third request is made when the socket pool is in a stalled state.
ClientSocketHandle handle3;
TestCompletionCallback callback3;
- EXPECT_EQ(ERR_IO_PENDING,
- handle3.Init("group3", params_, MEDIUM,
- ClientSocketPool::RespectLimits::ENABLED,
- callback3.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle3.Init("group3", params_, MEDIUM,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback3.callback(), pool_.get(), NetLogWithSource()));
base::RunLoop().RunUntilIdle();
EXPECT_FALSE(callback3.have_result());
@@ -3661,10 +3699,11 @@
mock_layered_pool.set_can_release_connection(true);
ClientSocketHandle handle4;
TestCompletionCallback callback4;
- EXPECT_EQ(ERR_IO_PENDING,
- handle4.Init("group3", params_, HIGHEST,
- ClientSocketPool::RespectLimits::ENABLED,
- callback4.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ ERR_IO_PENDING,
+ handle4.Init("group3", params_, HIGHEST,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback4.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback4.WaitForResult(), IsOk());
EXPECT_FALSE(callback3.have_result());
@@ -3694,7 +3733,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsOk());
}
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index 3b38b2b..8482dc2 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -77,7 +77,7 @@
const SSLConfig& ssl_config_for_proxy,
bool force_tunnel,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
int num_preconnect_streams,
ClientSocketHandle* socket_handle,
HttpNetworkSession::SocketPoolType socket_pool_type,
@@ -357,7 +357,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
const OnHostResolutionCallback& resolution_callback,
const CompletionCallback& callback) {
@@ -382,7 +382,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
const OnHostResolutionCallback& resolution_callback,
const CompletionCallback& callback) {
@@ -395,16 +395,15 @@
resolution_callback, callback);
}
-int InitSocketHandleForRawConnect(
- const HostPortPair& host_port_pair,
- HttpNetworkSession* session,
- const ProxyInfo& proxy_info,
- const SSLConfig& ssl_config_for_origin,
- const SSLConfig& ssl_config_for_proxy,
- PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
- ClientSocketHandle* socket_handle,
- const CompletionCallback& callback) {
+int InitSocketHandleForRawConnect(const HostPortPair& host_port_pair,
+ HttpNetworkSession* session,
+ const ProxyInfo& proxy_info,
+ const SSLConfig& ssl_config_for_origin,
+ const SSLConfig& ssl_config_for_proxy,
+ PrivacyMode privacy_mode,
+ const NetLogWithSource& net_log,
+ ClientSocketHandle* socket_handle,
+ const CompletionCallback& callback) {
DCHECK(socket_handle);
HttpRequestHeaders request_extra_headers;
int request_load_flags = 0;
@@ -424,7 +423,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
const CompletionCallback& callback) {
DCHECK(socket_handle);
@@ -452,7 +451,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
int num_preconnect_streams) {
return InitSocketPoolHelper(
group_type, endpoint, request_extra_headers, request_load_flags,
diff --git a/net/socket/client_socket_pool_manager.h b/net/socket/client_socket_pool_manager.h
index 66c26f5..4570c08 100644
--- a/net/socket/client_socket_pool_manager.h
+++ b/net/socket/client_socket_pool_manager.h
@@ -22,10 +22,10 @@
namespace net {
-typedef base::Callback<int(const AddressList&, const BoundNetLog& net_log)>
-OnHostResolutionCallback;
+typedef base::Callback<int(const AddressList&, const NetLogWithSource& net_log)>
+ OnHostResolutionCallback;
-class BoundNetLog;
+class NetLogWithSource;
class ClientSocketHandle;
class HostPortPair;
class HttpNetworkSession;
@@ -108,7 +108,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
const OnHostResolutionCallback& resolution_callback,
const CompletionCallback& callback);
@@ -134,7 +134,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
const OnHostResolutionCallback& resolution_callback,
const CompletionCallback& callback);
@@ -150,7 +150,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
const CompletionCallback& callback);
@@ -165,7 +165,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
const CompletionCallback& callback);
@@ -183,7 +183,7 @@
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
int num_preconnect_streams);
} // namespace net
diff --git a/net/socket/fuzzed_socket.cc b/net/socket/fuzzed_socket.cc
index 0177c83..40c0adfe 100644
--- a/net/socket/fuzzed_socket.cc
+++ b/net/socket/fuzzed_socket.cc
@@ -36,7 +36,7 @@
FuzzedSocket::FuzzedSocket(base::FuzzedDataProvider* data_provider,
net::NetLog* net_log)
: data_provider_(data_provider),
- bound_net_log_(BoundNetLog::Make(net_log, NetLogSourceType::SOCKET)),
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::SOCKET)),
remote_address_(IPEndPoint(IPAddress::IPv4Localhost(), 80)),
weak_factory_(this) {}
@@ -207,8 +207,8 @@
return OK;
}
-const BoundNetLog& FuzzedSocket::NetLog() const {
- return bound_net_log_;
+const NetLogWithSource& FuzzedSocket::NetLog() const {
+ return net_log_;
}
void FuzzedSocket::SetSubresourceSpeculation() {}
diff --git a/net/socket/fuzzed_socket.h b/net/socket/fuzzed_socket.h
index b46b10b..a16c782 100644
--- a/net/socket/fuzzed_socket.h
+++ b/net/socket/fuzzed_socket.h
@@ -73,7 +73,7 @@
bool IsConnectedAndIdle() const override;
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -118,7 +118,7 @@
int64_t total_bytes_read_ = 0;
int64_t total_bytes_written_ = 0;
- BoundNetLog bound_net_log_;
+ NetLogWithSource net_log_;
IPEndPoint remote_address_;
diff --git a/net/socket/fuzzed_socket_factory.cc b/net/socket/fuzzed_socket_factory.cc
index 23cd366..acf02309 100644
--- a/net/socket/fuzzed_socket_factory.cc
+++ b/net/socket/fuzzed_socket_factory.cc
@@ -62,7 +62,7 @@
return ERR_SOCKET_NOT_CONNECTED;
}
- const BoundNetLog& NetLog() const override { return net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
void SetSubresourceSpeculation() override {}
void SetOmniboxSpeculation() override {}
@@ -118,7 +118,7 @@
}
private:
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(FailingSSLClientSocket);
};
diff --git a/net/socket/sequenced_socket_data_unittest.cc b/net/socket/sequenced_socket_data_unittest.cc
index 337ae745..86c5db6 100644
--- a/net/socket/sequenced_socket_data_unittest.cc
+++ b/net/socket/sequenced_socket_data_unittest.cc
@@ -269,7 +269,7 @@
endpoint_.ToString(), tcp_params_, LOWEST,
ClientSocketPool::RespectLimits::ENABLED, CompletionCallback(),
reinterpret_cast<TransportClientSocketPool*>(&socket_pool_),
- BoundNetLog()));
+ NetLogWithSource()));
sock_ = connection_.socket();
}
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index 1bc262254..4b263de 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -755,10 +755,8 @@
void MockClientSocketFactory::ClearSSLSessionCache() {
}
-MockClientSocket::MockClientSocket(const BoundNetLog& net_log)
- : connected_(false),
- net_log_(net_log),
- weak_factory_(this) {
+MockClientSocket::MockClientSocket(const NetLogWithSource& net_log)
+ : connected_(false), net_log_(net_log), weak_factory_(this) {
peer_addr_ = IPEndPoint(IPAddress(192, 0, 2, 33), 0);
}
@@ -794,7 +792,7 @@
return OK;
}
-const BoundNetLog& MockClientSocket::NetLog() const {
+const NetLogWithSource& MockClientSocket::NetLog() const {
return net_log_;
}
@@ -863,7 +861,7 @@
MockTCPClientSocket::MockTCPClientSocket(const AddressList& addresses,
net::NetLog* net_log,
SocketDataProvider* data)
- : MockClientSocket(BoundNetLog::Make(net_log, NetLogSourceType::NONE)),
+ : MockClientSocket(NetLogWithSource::Make(net_log, NetLogSourceType::NONE)),
addresses_(addresses),
data_(data),
read_offset_(0),
@@ -1135,7 +1133,8 @@
const SSLConfig& ssl_config,
SSLSocketDataProvider* data)
: MockClientSocket(
- // Have to use the right BoundNetLog for LoadTimingInfo regression
+ // Have to use the right NetLogWithSource for LoadTimingInfo
+ // regression
// tests.
transport_socket->socket()->NetLog()),
transport_(std::move(transport_socket)),
@@ -1260,7 +1259,7 @@
network_(NetworkChangeNotifier::kInvalidNetworkHandle),
pending_read_buf_(NULL),
pending_read_buf_len_(0),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::NONE)),
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::NONE)),
weak_factory_(this) {
DCHECK(data_);
data_->Initialize(this);
@@ -1353,7 +1352,7 @@
void MockUDPClientSocket::UseNonBlockingIO() {}
-const BoundNetLog& MockUDPClientSocket::NetLog() const {
+const NetLogWithSource& MockUDPClientSocket::NetLog() const {
return net_log_;
}
@@ -1628,7 +1627,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
last_request_priority_ = priority;
std::unique_ptr<StreamSocket> socket =
client_socket_factory_->CreateTransportClientSocket(
@@ -1677,7 +1676,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
return transport_pool_->RequestSocket(group_name, socket_params, priority,
respect_limits, handle, callback,
net_log);
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 8665789..066a1ac 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -544,9 +544,10 @@
class MockClientSocket : public SSLClientSocket {
public:
- // The BoundNetLog is needed to test LoadTimingInfo, which uses NetLog IDs as
+ // The NetLogWithSource is needed to test LoadTimingInfo, which uses NetLog
+ // IDs as
// unique socket IDs.
- explicit MockClientSocket(const BoundNetLog& net_log);
+ explicit MockClientSocket(const NetLogWithSource& net_log);
// Socket implementation.
int Read(IOBuffer* buf,
@@ -565,7 +566,7 @@
bool IsConnectedAndIdle() const override;
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override {}
void SetOmniboxSpeculation() override {}
bool WasNpnNegotiated() const override;
@@ -599,7 +600,7 @@
// Address of the "remote" peer we're connected to.
IPEndPoint peer_addr_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
private:
base::WeakPtrFactory<MockClientSocket> weak_factory_;
@@ -746,7 +747,7 @@
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
void UseNonBlockingIO() override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
// DatagramClientSocket implementation.
int Connect(const IPEndPoint& address) override;
@@ -789,7 +790,7 @@
CompletionCallback pending_read_callback_;
CompletionCallback pending_write_callback_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
base::WeakPtrFactory<MockUDPClientSocket> weak_factory_;
@@ -845,7 +846,7 @@
requests_.push_back(base::WrapUnique(request));
int rv = request->handle()->Init(group_name, socket_params, priority,
respect_limits, request->callback(),
- socket_pool, BoundNetLog());
+ socket_pool, NetLogWithSource());
if (rv != ERR_IO_PENDING)
request_order_.push_back(request);
return rv;
@@ -934,7 +935,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(const std::string& group_name,
ClientSocketHandle* handle) override;
@@ -967,7 +968,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(const std::string& group_name,
ClientSocketHandle* handle) override;
diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc
index f79f1df1..9259296f 100644
--- a/net/socket/socks5_client_socket.cc
+++ b/net/socket/socks5_client_socket.cc
@@ -90,7 +90,7 @@
return completed_handshake_ && transport_->socket()->IsConnectedAndIdle();
}
-const BoundNetLog& SOCKS5ClientSocket::NetLog() const {
+const NetLogWithSource& SOCKS5ClientSocket::NetLog() const {
return net_log_;
}
diff --git a/net/socket/socks5_client_socket.h b/net/socket/socks5_client_socket.h
index c65ddc2..31907e18 100644
--- a/net/socket/socks5_client_socket.h
+++ b/net/socket/socks5_client_socket.h
@@ -24,7 +24,7 @@
namespace net {
class ClientSocketHandle;
-class BoundNetLog;
+class NetLogWithSource;
// This StreamSocket is used to setup a SOCKSv5 handshake with a socks proxy.
// Currently no SOCKSv5 authentication is supported.
@@ -49,7 +49,7 @@
void Disconnect() override;
bool IsConnected() const override;
bool IsConnectedAndIdle() const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -153,7 +153,7 @@
HostResolver::RequestInfo host_request_info_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket);
};
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index 6a14f99..e5b7e89 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -82,9 +82,9 @@
HostResolver::RequestInfo info(HostPortPair("www.socks-proxy.com", 1080));
TestCompletionCallback callback;
std::unique_ptr<HostResolver::Request> request;
- int rv =
- host_resolver_->Resolve(info, DEFAULT_PRIORITY, &address_list_,
- callback.callback(), &request, BoundNetLog());
+ int rv = host_resolver_->Resolve(info, DEFAULT_PRIORITY, &address_list_,
+ callback.callback(), &request,
+ NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsOk());
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index 05879e5..8cbd379 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -119,7 +119,7 @@
return completed_handshake_ && transport_->socket()->IsConnectedAndIdle();
}
-const BoundNetLog& SOCKSClientSocket::NetLog() const {
+const NetLogWithSource& SOCKSClientSocket::NetLog() const {
return net_log_;
}
diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h
index 1d55784..919f522 100644
--- a/net/socket/socks_client_socket.h
+++ b/net/socket/socks_client_socket.h
@@ -24,7 +24,7 @@
namespace net {
class ClientSocketHandle;
-class BoundNetLog;
+class NetLogWithSource;
// The SOCKS client socket implementation
class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
@@ -46,7 +46,7 @@
void Disconnect() override;
bool IsConnected() const override;
bool IsConnectedAndIdle() const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -136,7 +136,7 @@
HostResolver::RequestInfo host_request_info_;
RequestPriority priority_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket);
};
diff --git a/net/socket/socks_client_socket_pool.cc b/net/socket/socks_client_socket_pool.cc
index 6df082200..659dcdf5 100644
--- a/net/socket/socks_client_socket_pool.cc
+++ b/net/socket/socks_client_socket_pool.cc
@@ -46,12 +46,13 @@
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log)
- : ConnectJob(group_name,
- timeout_duration,
- priority,
- respect_limits,
- delegate,
- BoundNetLog::Make(net_log, NetLogSourceType::CONNECT_JOB)),
+ : ConnectJob(
+ group_name,
+ timeout_duration,
+ priority,
+ respect_limits,
+ delegate,
+ NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)),
socks_params_(socks_params),
transport_pool_(transport_pool),
resolver_(host_resolver),
@@ -214,7 +215,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
const scoped_refptr<SOCKSSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<SOCKSSocketParams>*>(socket_params);
@@ -222,11 +223,10 @@
respect_limits, handle, callback, net_log);
}
-void SOCKSClientSocketPool::RequestSockets(
- const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) {
+void SOCKSClientSocketPool::RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const NetLogWithSource& net_log) {
const scoped_refptr<SOCKSSocketParams>* casted_params =
static_cast<const scoped_refptr<SOCKSSocketParams>*>(params);
diff --git a/net/socket/socks_client_socket_pool.h b/net/socket/socks_client_socket_pool.h
index b1371bb..e82bf00 100644
--- a/net/socket/socks_client_socket_pool.h
+++ b/net/socket/socks_client_socket_pool.h
@@ -124,12 +124,12 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void RequestSockets(const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(const std::string& group_name,
ClientSocketHandle* handle) override;
diff --git a/net/socket/socks_client_socket_pool_unittest.cc b/net/socket/socks_client_socket_pool_unittest.cc
index 36cefb4..5827c99 100644
--- a/net/socket/socks_client_socket_pool_unittest.cc
+++ b/net/socket/socks_client_socket_pool_unittest.cc
@@ -137,7 +137,7 @@
ClientSocketHandle handle;
int rv = handle.Init("a", CreateSOCKSv5Params(), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, BoundNetLog());
+ CompletionCallback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(handle.is_initialized());
EXPECT_TRUE(handle.socket());
@@ -155,9 +155,10 @@
data.data_provider());
ClientSocketHandle handle;
- EXPECT_EQ(OK, handle.Init("a", CreateSOCKSv5Params(), priority,
- ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, BoundNetLog()));
+ EXPECT_EQ(OK,
+ handle.Init("a", CreateSOCKSv5Params(), priority,
+ ClientSocketPool::RespectLimits::ENABLED,
+ CompletionCallback(), &pool_, NetLogWithSource()));
EXPECT_EQ(priority, transport_socket_pool_.last_request_priority());
handle.socket()->Disconnect();
}
@@ -177,7 +178,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", CreateSOCKSv4Params(), priority,
ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, BoundNetLog()));
+ CompletionCallback(), &pool_, NetLogWithSource()));
EXPECT_EQ(priority, transport_socket_pool_.last_request_priority());
EXPECT_EQ(priority, host_resolver_.last_request_priority());
EXPECT_TRUE(handle.socket() == NULL);
@@ -192,7 +193,7 @@
ClientSocketHandle handle;
int rv = handle.Init("a", CreateSOCKSv5Params(), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -212,7 +213,7 @@
ClientSocketHandle handle;
int rv = handle.Init("a", CreateSOCKSv5Params(), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, BoundNetLog());
+ CompletionCallback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_PROXY_CONNECTION_FAILED));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -227,7 +228,7 @@
ClientSocketHandle handle;
int rv = handle.Init("a", CreateSOCKSv5Params(), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -250,7 +251,7 @@
EXPECT_EQ(0, transport_socket_pool_.release_count());
int rv = handle.Init("a", CreateSOCKSv5Params(), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, BoundNetLog());
+ CompletionCallback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_SOCKS_CONNECTION_FAILED));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -271,7 +272,7 @@
EXPECT_EQ(0, transport_socket_pool_.release_count());
int rv = handle.Init("a", CreateSOCKSv5Params(), LOW,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index 33c8e9e..bf1e715 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -113,7 +113,7 @@
AddressList* addresses,
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
DCHECK(addresses);
DCHECK_EQ(false, callback.is_null());
EXPECT_FALSE(HasOutstandingRequest());
@@ -124,7 +124,7 @@
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
NOTIMPLEMENTED();
return ERR_UNEXPECTED;
}
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
index 23ba2f9..117a574 100644
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -726,7 +726,7 @@
return transport_->socket()->GetLocalAddress(addressList);
}
-const BoundNetLog& SSLClientSocketImpl::NetLog() const {
+const NetLogWithSource& SSLClientSocketImpl::NetLog() const {
return net_log_;
}
diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_impl.h
index e6d1cc95..3f3308c 100644
--- a/net/socket/ssl_client_socket_impl.h
+++ b/net/socket/ssl_client_socket_impl.h
@@ -95,7 +95,7 @@
bool IsConnectedAndIdle() const override;
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -378,7 +378,7 @@
// True if PKP is bypassed due to a local trust anchor.
bool pkp_bypassed_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
base::WeakPtrFactory<SSLClientSocketImpl> weak_factory_;
};
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 79d8f4b..f5dd8c8 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -106,12 +106,13 @@
const SSLClientSocketContext& context,
Delegate* delegate,
NetLog* net_log)
- : ConnectJob(group_name,
- timeout_duration,
- priority,
- respect_limits,
- delegate,
- BoundNetLog::Make(net_log, NetLogSourceType::CONNECT_JOB)),
+ : ConnectJob(
+ group_name,
+ timeout_duration,
+ priority,
+ respect_limits,
+ delegate,
+ NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)),
params_(params),
transport_pool_(transport_pool),
socks_pool_(socks_pool),
@@ -583,7 +584,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
const scoped_refptr<SSLSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<SSLSocketParams>*>(socket_params);
@@ -591,11 +592,10 @@
respect_limits, handle, callback, net_log);
}
-void SSLClientSocketPool::RequestSockets(
- const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) {
+void SSLClientSocketPool::RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const NetLogWithSource& net_log) {
const scoped_refptr<SSLSocketParams>* casted_params =
static_cast<const scoped_refptr<SSLSocketParams>*>(params);
diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
index 3dc03e5..0d0f03c8 100644
--- a/net/socket/ssl_client_socket_pool.h
+++ b/net/socket/ssl_client_socket_pool.h
@@ -207,12 +207,12 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void RequestSockets(const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(const std::string& group_name,
ClientSocketHandle* handle) override;
diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc
index 14d0af1..28a73b3 100644
--- a/net/socket/ssl_client_socket_pool_unittest.cc
+++ b/net/socket/ssl_client_socket_pool_unittest.cc
@@ -220,7 +220,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), pool_.get(), BoundNetLog());
+ CompletionCallback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_CONNECTION_FAILED));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -243,7 +243,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -272,7 +272,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(handle.is_initialized());
EXPECT_TRUE(handle.socket());
@@ -297,9 +297,10 @@
ClientSocketHandle handle;
TestCompletionCallback callback;
- EXPECT_EQ(OK, handle.Init("a", params, priority,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(
+ OK, handle.Init("a", params, priority,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(priority, transport_socket_pool_.last_request_priority());
handle.socket()->Disconnect();
}
@@ -319,7 +320,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -344,7 +345,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -369,7 +370,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -395,7 +396,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -423,7 +424,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -449,7 +450,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -479,7 +480,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -507,7 +508,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_CONNECTION_FAILED));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -527,7 +528,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -553,7 +554,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(handle.is_initialized());
EXPECT_TRUE(handle.socket());
@@ -577,9 +578,10 @@
ClientSocketHandle handle;
TestCompletionCallback callback;
- EXPECT_EQ(OK, handle.Init("a", params, HIGHEST,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(OK,
+ handle.Init("a", params, HIGHEST,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(HIGHEST, transport_socket_pool_.last_request_priority());
}
@@ -597,7 +599,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -623,7 +625,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_PROXY_CONNECTION_FAILED));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -643,7 +645,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -681,7 +683,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(handle.is_initialized());
EXPECT_TRUE(handle.socket());
@@ -715,9 +717,10 @@
ClientSocketHandle handle;
TestCompletionCallback callback;
- EXPECT_EQ(OK, handle.Init("a", params, HIGHEST,
- ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog()));
+ EXPECT_EQ(OK,
+ handle.Init("a", params, HIGHEST,
+ ClientSocketPool::RespectLimits::ENABLED,
+ callback.callback(), pool_.get(), NetLogWithSource()));
EXPECT_EQ(HIGHEST, transport_socket_pool_.last_request_priority());
}
@@ -747,7 +750,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -785,7 +788,7 @@
TestCompletionCallback callback;
int rv =
handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), pool_.get(), BoundNetLog());
+ callback.callback(), pool_.get(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -825,7 +828,7 @@
// code would have done this already, but we do it manually.
HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort));
host_resolver_.Resolve(info, DEFAULT_PRIORITY, &test_hosts[i].addresses,
- CompletionCallback(), &req[i], BoundNetLog());
+ CompletionCallback(), &req[i], NetLogWithSource());
// Setup a SpdySessionKey
test_hosts[i].key = SpdySessionKey(
@@ -845,8 +848,8 @@
socket_factory_.AddSSLSocketDataProvider(&ssl);
CreatePool(true /* tcp pool */, false, false);
- base::WeakPtr<SpdySession> spdy_session =
- CreateSecureSpdySession(session_.get(), test_hosts[0].key, BoundNetLog());
+ base::WeakPtr<SpdySession> spdy_session = CreateSecureSpdySession(
+ session_.get(), test_hosts[0].key, NetLogWithSource());
EXPECT_TRUE(
HasSpdySession(session_->spdy_session_pool(), test_hosts[0].key));
@@ -881,9 +884,9 @@
// This test requires that the HostResolver cache be populated. Normal
// code would have done this already, but we do it manually.
HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort));
- rv =
- host_resolver_.Resolve(info, DEFAULT_PRIORITY, &test_hosts[i].addresses,
- callback.callback(), &req[i], BoundNetLog());
+ rv = host_resolver_.Resolve(info, DEFAULT_PRIORITY,
+ &test_hosts[i].addresses, callback.callback(),
+ &req[i], NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
// Setup a SpdySessionKey
@@ -900,8 +903,8 @@
socket_factory_.AddSSLSocketDataProvider(ssl);
CreatePool(true /* tcp pool */, false, false);
- base::WeakPtr<SpdySession> spdy_session =
- CreateSecureSpdySession(session_.get(), test_hosts[0].key, BoundNetLog());
+ base::WeakPtr<SpdySession> spdy_session = CreateSecureSpdySession(
+ session_.get(), test_hosts[0].key, NetLogWithSource());
EXPECT_TRUE(
HasSpdySession(session_->spdy_session_pool(), test_hosts[0].key));
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index 3975abe..8d5512d 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -100,7 +100,9 @@
int GetLocalAddress(IPEndPoint* address) const override {
return transport_->GetLocalAddress(address);
}
- const BoundNetLog& NetLog() const override { return transport_->NetLog(); }
+ const NetLogWithSource& NetLog() const override {
+ return transport_->NetLog();
+ }
void SetSubresourceSpeculation() override {
transport_->SetSubresourceSpeculation();
}
@@ -691,11 +693,12 @@
// anything.
class MockCTVerifier : public CTVerifier {
public:
- MOCK_METHOD5(Verify, int(X509Certificate*,
- const std::string&,
- const std::string&,
- ct::CTVerifyResult*,
- const BoundNetLog&));
+ MOCK_METHOD5(Verify,
+ int(X509Certificate*,
+ const std::string&,
+ const std::string&,
+ ct::CTVerifyResult*,
+ const NetLogWithSource&));
MOCK_METHOD1(SetObserver, void(CTVerifier::Observer*));
};
@@ -705,12 +708,12 @@
MOCK_METHOD3(DoesConformToCertPolicy,
ct::CertPolicyCompliance(X509Certificate* cert,
const ct::SCTList&,
- const BoundNetLog&));
+ const NetLogWithSource&));
MOCK_METHOD4(DoesConformToCTEVPolicy,
ct::EVPolicyCompliance(X509Certificate* cert,
const ct::EVCertsWhitelist*,
const ct::SCTList&,
- const BoundNetLog&));
+ const NetLogWithSource&));
};
class MockRequireCTDelegate : public TransportSecurityState::RequireCTDelegate {
diff --git a/net/socket/ssl_server_socket_impl.cc b/net/socket/ssl_server_socket_impl.cc
index 3a6c417..0b6e65c 100644
--- a/net/socket/ssl_server_socket_impl.cc
+++ b/net/socket/ssl_server_socket_impl.cc
@@ -86,7 +86,7 @@
bool IsConnectedAndIdle() const override;
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -138,7 +138,7 @@
scoped_refptr<DrainableIOBuffer> send_buffer_;
scoped_refptr<IOBuffer> recv_buffer_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
CompletionCallback user_handshake_callback_;
CompletionCallback user_read_callback_;
@@ -337,7 +337,7 @@
return transport_socket_->GetLocalAddress(address);
}
-const BoundNetLog& SSLServerSocketImpl::NetLog() const {
+const NetLogWithSource& SSLServerSocketImpl::NetLog() const {
return net_log_;
}
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index 47404eae..e3e242f 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -97,7 +97,7 @@
const std::string& stapled_ocsp_response,
const std::string& sct_list_from_tls_extension,
ct::CTVerifyResult* result,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return net::OK;
}
@@ -111,7 +111,7 @@
ct::CertPolicyCompliance DoesConformToCertPolicy(
X509Certificate* cert,
const SCTList& verified_scts,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS;
}
@@ -119,7 +119,7 @@
X509Certificate* cert,
const ct::EVCertsWhitelist* ev_whitelist,
const SCTList& verified_scts,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS;
}
};
@@ -293,7 +293,7 @@
return OK;
}
- const BoundNetLog& NetLog() const override { return net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
void SetSubresourceSpeculation() override {}
void SetOmniboxSpeculation() override {}
@@ -320,7 +320,7 @@
}
private:
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
FakeDataChannel* incoming_;
FakeDataChannel* outgoing_;
diff --git a/net/socket/stream_socket.h b/net/socket/stream_socket.h
index 98efcdaf..5cdb6d3e 100644
--- a/net/socket/stream_socket.h
+++ b/net/socket/stream_socket.h
@@ -66,7 +66,7 @@
virtual int GetLocalAddress(IPEndPoint* address) const = 0;
// Gets the NetLog for this socket.
- virtual const BoundNetLog& NetLog() const = 0;
+ virtual const NetLogWithSource& NetLog() const = 0;
// Set the annotation to indicate this socket was created for speculative
// reasons. This call is generally forwarded to a basic TCPClientSocket*,
diff --git a/net/socket/tcp_client_socket.cc b/net/socket/tcp_client_socket.cc
index 1c292bb..c8539b7 100644
--- a/net/socket/tcp_client_socket.cc
+++ b/net/socket/tcp_client_socket.cc
@@ -235,7 +235,7 @@
return socket_->GetLocalAddress(address);
}
-const BoundNetLog& TCPClientSocket::NetLog() const {
+const NetLogWithSource& TCPClientSocket::NetLog() const {
return socket_->net_log();
}
diff --git a/net/socket/tcp_client_socket.h b/net/socket/tcp_client_socket.h
index bf41545..159c458e 100644
--- a/net/socket/tcp_client_socket.h
+++ b/net/socket/tcp_client_socket.h
@@ -52,7 +52,7 @@
bool IsConnectedAndIdle() const override;
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
diff --git a/net/socket/tcp_socket_posix.cc b/net/socket/tcp_socket_posix.cc
index 49595e0..c9dfe58 100644
--- a/net/socket/tcp_socket_posix.cc
+++ b/net/socket/tcp_socket_posix.cc
@@ -151,7 +151,7 @@
tcp_fastopen_connected_(false),
tcp_fastopen_status_(TCP_FASTOPEN_STATUS_UNKNOWN),
logging_multiple_connect_attempts_(false),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::SOCKET)) {
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::SOCKET)) {
net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE,
source.ToEventParametersCallback());
}
diff --git a/net/socket/tcp_socket_posix.h b/net/socket/tcp_socket_posix.h
index f043d67..2b25f15 100644
--- a/net/socket/tcp_socket_posix.h
+++ b/net/socket/tcp_socket_posix.h
@@ -108,7 +108,7 @@
void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
private:
// States that using a socket with TCP FastOpen can lead to.
@@ -246,7 +246,7 @@
bool logging_multiple_connect_attempts_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(TCPSocketPosix);
};
diff --git a/net/socket/tcp_socket_win.cc b/net/socket/tcp_socket_win.cc
index daefadb..8ae06aa 100644
--- a/net/socket/tcp_socket_win.cc
+++ b/net/socket/tcp_socket_win.cc
@@ -257,7 +257,7 @@
waiting_write_(false),
connect_os_error_(0),
logging_multiple_connect_attempts_(false),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::SOCKET)) {
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::SOCKET)) {
net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE,
source.ToEventParametersCallback());
EnsureWinsockInit();
diff --git a/net/socket/tcp_socket_win.h b/net/socket/tcp_socket_win.h
index ee92b44..d9f6b21 100644
--- a/net/socket/tcp_socket_win.h
+++ b/net/socket/tcp_socket_win.h
@@ -108,7 +108,7 @@
void StartLoggingMultipleConnectAttempts(const AddressList& addresses);
void EndLoggingMultipleConnectAttempts(int net_error);
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
private:
class Core;
@@ -164,7 +164,7 @@
bool logging_multiple_connect_attempts_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(TCPSocketWin);
};
diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc
index 436e3c80..1b364cbe 100644
--- a/net/socket/transport_client_socket_pool.cc
+++ b/net/socket/transport_client_socket_pool.cc
@@ -103,12 +103,13 @@
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log)
- : ConnectJob(group_name,
- timeout_duration,
- priority,
- respect_limits,
- delegate,
- BoundNetLog::Make(net_log, NetLogSourceType::CONNECT_JOB)),
+ : ConnectJob(
+ group_name,
+ timeout_duration,
+ priority,
+ respect_limits,
+ delegate,
+ NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)),
params_(params),
resolver_(host_resolver),
client_socket_factory_(client_socket_factory),
@@ -558,7 +559,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
const scoped_refptr<TransportSocketParams>* casted_params =
static_cast<const scoped_refptr<TransportSocketParams>*>(params);
@@ -569,7 +570,7 @@
}
void TransportClientSocketPool::NetLogTcpClientSocketPoolRequestedSocket(
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const scoped_refptr<TransportSocketParams>* casted_params) {
if (net_log.IsCapturing()) {
// TODO(eroman): Split out the host and port parameters.
@@ -584,7 +585,7 @@
const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
const scoped_refptr<TransportSocketParams>* casted_params =
static_cast<const scoped_refptr<TransportSocketParams>*>(params);
diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h
index 73722a0..66f707b 100644
--- a/net/socket/transport_client_socket_pool.h
+++ b/net/socket/transport_client_socket_pool.h
@@ -23,8 +23,8 @@
class ClientSocketFactory;
class SocketPerformanceWatcherFactory;
-typedef base::Callback<int(const AddressList&, const BoundNetLog& net_log)>
-OnHostResolutionCallback;
+typedef base::Callback<int(const AddressList&, const NetLogWithSource& net_log)>
+ OnHostResolutionCallback;
class NET_EXPORT_PRIVATE TransportSocketParams
: public base::RefCounted<TransportSocketParams> {
@@ -215,11 +215,11 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void RequestSockets(const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(const std::string& group_name,
ClientSocketHandle* handle) override;
void ReleaseSocket(const std::string& group_name,
@@ -245,7 +245,7 @@
protected:
// Methods shared with WebSocketTransportClientSocketPool
void NetLogTcpClientSocketPoolRequestedSocket(
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const scoped_refptr<TransportSocketParams>* casted_params);
private:
diff --git a/net/socket/transport_client_socket_pool_test_util.cc b/net/socket/transport_client_socket_pool_test_util.cc
index 2577bc6..3c02384 100644
--- a/net/socket/transport_client_socket_pool_test_util.cc
+++ b/net/socket/transport_client_socket_pool_test_util.cc
@@ -41,7 +41,7 @@
MockConnectClientSocket(const AddressList& addrlist, net::NetLog* net_log)
: connected_(false),
addrlist_(addrlist),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::SOCKET)) {}
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::SOCKET)) {}
// StreamSocket implementation.
int Connect(const CompletionCallback& callback) override {
@@ -65,7 +65,7 @@
SetIPv6Address(address);
return OK;
}
- const BoundNetLog& NetLog() const override { return net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
void SetSubresourceSpeculation() override {}
void SetOmniboxSpeculation() override {}
@@ -101,7 +101,7 @@
private:
bool connected_;
const AddressList addrlist_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(MockConnectClientSocket);
};
@@ -110,7 +110,7 @@
public:
MockFailingClientSocket(const AddressList& addrlist, net::NetLog* net_log)
: addrlist_(addrlist),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::SOCKET)) {}
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::SOCKET)) {}
// StreamSocket implementation.
int Connect(const CompletionCallback& callback) override {
@@ -127,7 +127,7 @@
int GetLocalAddress(IPEndPoint* address) const override {
return ERR_UNEXPECTED;
}
- const BoundNetLog& NetLog() const override { return net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
void SetSubresourceSpeculation() override {}
void SetOmniboxSpeculation() override {}
@@ -165,7 +165,7 @@
private:
const AddressList addrlist_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(MockFailingClientSocket);
};
@@ -180,7 +180,7 @@
: should_connect_(should_connect),
is_connected_(false),
addrlist_(addrlist),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::SOCKET)),
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::SOCKET)),
weak_factory_(this) {}
// Call this method to get a closure which will trigger the connect callback
@@ -253,7 +253,7 @@
SetIPv6Address(address);
return OK;
}
- const BoundNetLog& NetLog() const override { return net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
void SetSubresourceSpeculation() override {}
void SetOmniboxSpeculation() override {}
@@ -299,7 +299,7 @@
bool should_connect_;
bool is_connected_;
const AddressList addrlist_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
CompletionCallback callback_;
ConnectionAttempts connection_attempts_;
diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc
index 3bbc2d0..bb18a09 100644
--- a/net/socket/transport_client_socket_pool_unittest.cc
+++ b/net/socket/transport_client_socket_pool_unittest.cc
@@ -182,7 +182,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -204,7 +204,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, priority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
EXPECT_EQ(priority, host_resolver_->last_request_priority());
}
}
@@ -220,7 +220,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", dest, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_NAME_NOT_RESOLVED));
ASSERT_EQ(1u, handle.connection_attempts().size());
EXPECT_TRUE(handle.connection_attempts()[0].endpoint.address().empty());
@@ -236,7 +236,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_CONNECTION_FAILED));
ASSERT_EQ(1u, handle.connection_attempts().size());
EXPECT_EQ("127.0.0.1:80",
@@ -249,7 +249,7 @@
EXPECT_EQ(ERR_CONNECTION_FAILED,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
ASSERT_EQ(1u, handle.connection_attempts().size());
EXPECT_EQ("127.0.0.1:80",
handle.connection_attempts()[0].endpoint.ToString());
@@ -362,7 +362,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
handle.Reset();
}
@@ -375,11 +375,11 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
EXPECT_EQ(ERR_IO_PENDING,
handle2.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), &pool_, BoundNetLog()));
+ callback2.callback(), &pool_, NetLogWithSource()));
handle.Reset();
@@ -395,7 +395,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
handle.Reset();
@@ -403,7 +403,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), &pool_, BoundNetLog()));
+ callback2.callback(), &pool_, NetLogWithSource()));
host_resolver_->set_synchronous_mode(true);
// At this point, handle has two ConnectingSockets out for it. Due to the
@@ -516,7 +516,7 @@
TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
int rv = handle_->Init("a", dest, LOWEST,
ClientSocketPool::RespectLimits::ENABLED,
- callback(), pool_, BoundNetLog());
+ callback(), pool_, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
}
}
@@ -537,7 +537,7 @@
TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
int rv =
handle.Init("a", dest, LOWEST, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
// The callback is going to request "www.google.com". We want it to complete
@@ -602,7 +602,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -620,7 +620,7 @@
EXPECT_EQ(1, pool_.IdleSocketCount());
rv = handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
EXPECT_EQ(0, pool_.IdleSocketCount());
TestLoadTimingInfoConnectedReused(handle);
@@ -631,7 +631,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -688,7 +688,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("b", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -731,7 +731,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("c", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -778,7 +778,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("b", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -830,7 +830,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("b", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -887,7 +887,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -938,7 +938,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -979,7 +979,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -1011,7 +1011,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -1044,7 +1044,7 @@
// Enable TCP FastOpen in TransportSocketParams.
scoped_refptr<TransportSocketParams> params = CreateParamsForTCPFastOpen();
handle.Init("a", params, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(callback.WaitForResult(), IsOk());
EXPECT_TRUE(socket_data.IsUsingTCPFastOpen());
}
@@ -1070,7 +1070,7 @@
// Enable TCP FastOpen in TransportSocketParams.
scoped_refptr<TransportSocketParams> params = CreateParamsForTCPFastOpen();
handle.Init("a", params, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(callback.WaitForResult(), IsOk());
EXPECT_TRUE(socket_data.IsUsingTCPFastOpen());
}
@@ -1100,7 +1100,7 @@
// Enable TCP FastOpen in TransportSocketParams.
scoped_refptr<TransportSocketParams> params = CreateParamsForTCPFastOpen();
handle.Init("a", params, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(callback.WaitForResult(), IsOk());
// Verify that the socket used is connected to the fallback IPv4 address.
IPEndPoint endpoint;
@@ -1132,7 +1132,7 @@
// Enable TCP FastOpen in TransportSocketParams.
scoped_refptr<TransportSocketParams> params = CreateParamsForTCPFastOpen();
handle.Init("a", params, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(callback.WaitForResult(), IsOk());
IPEndPoint endpoint;
handle.socket()->GetPeerAddress(&endpoint);
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index 8819900..929e91c 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -120,7 +120,7 @@
TestCompletionCallback callback;
std::unique_ptr<HostResolver::Request> request;
int rv = resolver->Resolve(info, DEFAULT_PRIORITY, &addr, callback.callback(),
- &request, BoundNetLog());
+ &request, NetLogWithSource());
CHECK_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
CHECK_EQ(rv, OK);
diff --git a/net/socket/unix_domain_client_socket_posix.cc b/net/socket/unix_domain_client_socket_posix.cc
index bf86475..3615f2c 100644
--- a/net/socket/unix_domain_client_socket_posix.cc
+++ b/net/socket/unix_domain_client_socket_posix.cc
@@ -118,7 +118,7 @@
return ERR_ADDRESS_INVALID;
}
-const BoundNetLog& UnixDomainClientSocket::NetLog() const {
+const NetLogWithSource& UnixDomainClientSocket::NetLog() const {
return net_log_;
}
diff --git a/net/socket/unix_domain_client_socket_posix.h b/net/socket/unix_domain_client_socket_posix.h
index e7b033a..0541a60 100644
--- a/net/socket/unix_domain_client_socket_posix.h
+++ b/net/socket/unix_domain_client_socket_posix.h
@@ -48,7 +48,7 @@
bool IsConnectedAndIdle() const override;
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -81,7 +81,7 @@
std::unique_ptr<SocketPosix> socket_;
// This net log is just to comply StreamSocket::NetLog(). It throws away
// everything.
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(UnixDomainClientSocket);
};
diff --git a/net/socket/websocket_endpoint_lock_manager_unittest.cc b/net/socket/websocket_endpoint_lock_manager_unittest.cc
index e0f47999..e7a3ea7 100644
--- a/net/socket/websocket_endpoint_lock_manager_unittest.cc
+++ b/net/socket/websocket_endpoint_lock_manager_unittest.cc
@@ -46,7 +46,7 @@
int GetLocalAddress(IPEndPoint* address) const override { return ERR_FAILED; }
- const BoundNetLog& NetLog() const override { return bound_net_log_; }
+ const NetLogWithSource& NetLog() const override { return net_log_; }
void SetSubresourceSpeculation() override { return; }
void SetOmniboxSpeculation() override { return; }
@@ -90,7 +90,7 @@
int SetSendBufferSize(int32_t size) override { return ERR_FAILED; }
private:
- BoundNetLog bound_net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(FakeStreamSocket);
};
diff --git a/net/socket/websocket_transport_client_socket_pool.cc b/net/socket/websocket_transport_client_socket_pool.cc
index 00d20f8..de5bb4f 100644
--- a/net/socket/websocket_transport_client_socket_pool.cc
+++ b/net/socket/websocket_transport_client_socket_pool.cc
@@ -40,14 +40,14 @@
ClientSocketHandle* handle,
Delegate* delegate,
NetLog* pool_net_log,
- const BoundNetLog& request_net_log)
+ const NetLogWithSource& request_net_log)
: ConnectJob(
group_name,
timeout_duration,
priority,
respect_limits,
delegate,
- BoundNetLog::Make(pool_net_log, NetLogSourceType::CONNECT_JOB)),
+ NetLogWithSource::Make(pool_net_log, NetLogSourceType::CONNECT_JOB)),
params_(params),
resolver_(host_resolver),
client_socket_factory_(client_socket_factory),
@@ -324,7 +324,7 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& request_net_log) {
+ const NetLogWithSource& request_net_log) {
DCHECK(params);
const scoped_refptr<TransportSocketParams>& casted_params =
*static_cast<const scoped_refptr<TransportSocketParams>*>(params);
@@ -385,7 +385,7 @@
const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
NOTIMPLEMENTED();
}
@@ -501,7 +501,7 @@
std::unique_ptr<StreamSocket> socket = job->PassSocket();
ClientSocketHandle* const handle = job->handle();
- BoundNetLog request_net_log = job->request_net_log();
+ NetLogWithSource request_net_log = job->request_net_log();
LoadTimingInfo::ConnectTiming connect_timing = job->connect_timing();
if (result == OK) {
@@ -589,7 +589,7 @@
std::unique_ptr<StreamSocket> socket,
const LoadTimingInfo::ConnectTiming& connect_timing,
ClientSocketHandle* handle,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK(socket);
DCHECK_EQ(ClientSocketHandle::UNUSED, handle->reuse_type());
DCHECK_EQ(0, handle->idle_time().InMicroseconds());
@@ -688,7 +688,7 @@
RequestPriority priority,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: params(params),
priority(priority),
handle(handle),
diff --git a/net/socket/websocket_transport_client_socket_pool.h b/net/socket/websocket_transport_client_socket_pool.h
index 786873e..b89e88a 100644
--- a/net/socket/websocket_transport_client_socket_pool.h
+++ b/net/socket/websocket_transport_client_socket_pool.h
@@ -52,7 +52,7 @@
ClientSocketHandle* handle,
Delegate* delegate,
NetLog* pool_net_log,
- const BoundNetLog& request_net_log);
+ const NetLogWithSource& request_net_log);
~WebSocketTransportConnectJob() override;
// Unlike normal socket pools, the WebSocketTransportClientPool uses
@@ -62,7 +62,7 @@
// Stash the callback from RequestSocket() here for convenience.
const CompletionCallback& callback() const { return callback_; }
- const BoundNetLog& request_net_log() const { return request_net_log_; }
+ const NetLogWithSource& request_net_log() const { return request_net_log_; }
// ConnectJob methods.
LoadState GetLoadState() const override;
@@ -121,7 +121,7 @@
TransportConnectJob::RaceResult race_result_;
ClientSocketHandle* const handle_;
CompletionCallback callback_;
- BoundNetLog request_net_log_;
+ NetLogWithSource request_net_log_;
bool had_ipv4_;
bool had_ipv6_;
@@ -154,11 +154,11 @@
RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void RequestSockets(const std::string& group_name,
const void* params,
int num_sockets,
- const BoundNetLog& net_log) override;
+ const NetLogWithSource& net_log) override;
void CancelRequest(const std::string& group_name,
ClientSocketHandle* handle) override;
void ReleaseSocket(const std::string& group_name,
@@ -200,14 +200,14 @@
RequestPriority priority,
ClientSocketHandle* handle,
const CompletionCallback& callback,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
StalledRequest(const StalledRequest& other);
~StalledRequest();
const scoped_refptr<TransportSocketParams> params;
const RequestPriority priority;
ClientSocketHandle* const handle;
const CompletionCallback callback;
- const BoundNetLog net_log;
+ const NetLogWithSource net_log;
};
friend class ConnectJobDelegate;
@@ -236,7 +236,7 @@
void HandOutSocket(std::unique_ptr<StreamSocket> socket,
const LoadTimingInfo::ConnectTiming& connect_timing,
ClientSocketHandle* handle,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
void AddJob(ClientSocketHandle* handle,
std::unique_ptr<WebSocketTransportConnectJob> connect_job);
bool DeleteJob(ClientSocketHandle* handle);
diff --git a/net/socket/websocket_transport_client_socket_pool_unittest.cc b/net/socket/websocket_transport_client_socket_pool_unittest.cc
index a6cf1cf9..d7c2a2ee 100644
--- a/net/socket/websocket_transport_client_socket_pool_unittest.cc
+++ b/net/socket/websocket_transport_client_socket_pool_unittest.cc
@@ -127,7 +127,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -148,7 +148,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, priority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
EXPECT_EQ(priority, host_resolver_->last_request_priority());
}
}
@@ -164,7 +164,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", dest, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_NAME_NOT_RESOLVED));
}
@@ -176,7 +176,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_CONNECTION_FAILED));
// Make the host resolutions complete synchronously this time.
@@ -184,7 +184,7 @@
EXPECT_EQ(ERR_CONNECTION_FAILED,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
}
TEST_F(WebSocketTransportClientSocketPoolTest, PendingRequestsFinishFifo) {
@@ -261,7 +261,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
handle.Reset();
}
@@ -274,11 +274,11 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
EXPECT_EQ(ERR_IO_PENDING,
handle2.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), &pool_, BoundNetLog()));
+ callback2.callback(), &pool_, NetLogWithSource()));
handle.Reset();
@@ -294,7 +294,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog()));
+ callback.callback(), &pool_, NetLogWithSource()));
handle.Reset();
@@ -302,7 +302,7 @@
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", params_, kDefaultPriority,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), &pool_, BoundNetLog()));
+ callback2.callback(), &pool_, NetLogWithSource()));
host_resolver_->set_synchronous_mode(true);
// At this point, handle has two ConnectingSockets out for it. Due to the
@@ -376,7 +376,7 @@
TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
int rv =
handle->Init("a", dest, LOWEST, ClientSocketPool::RespectLimits::ENABLED,
- nested_callback, pool, BoundNetLog());
+ nested_callback, pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
if (ERR_IO_PENDING != rv)
nested_callback.Run(rv);
@@ -398,7 +398,7 @@
handle.Init("a", dest, LOWEST, ClientSocketPool::RespectLimits::ENABLED,
base::Bind(&RequestSocketOnComplete, &handle, &pool_,
second_result_callback.callback()),
- &pool_, BoundNetLog());
+ &pool_, NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(second_result_callback.WaitForResult(), IsOk());
@@ -471,7 +471,7 @@
std::unique_ptr<ClientSocketHandle> handle(new ClientSocketHandle);
int rv =
handle->Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool_, BoundNetLog());
+ callback.callback(), &pool_, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(StartRequest("a", kDefaultPriority), IsError(ERR_IO_PENDING));
@@ -539,7 +539,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -582,7 +582,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -615,7 +615,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -646,7 +646,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -688,7 +688,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsOk());
ASSERT_TRUE(handle.socket());
@@ -725,7 +725,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_FALSE(handle.socket());
@@ -762,7 +762,7 @@
ClientSocketHandle handle;
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
ASSERT_FALSE(handle.socket());
@@ -815,7 +815,7 @@
base::TimeTicks start(base::TimeTicks::Now());
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_CONNECTION_FAILED));
@@ -853,7 +853,7 @@
int rv =
handle.Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
- callback.callback(), &pool, BoundNetLog());
+ callback.callback(), &pool, NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
EXPECT_THAT(callback.WaitForResult(), IsError(ERR_TIMED_OUT));
diff --git a/net/socket/websocket_transport_connect_sub_job.cc b/net/socket/websocket_transport_connect_sub_job.cc
index b6185893..0b8b9fd6 100644
--- a/net/socket/websocket_transport_connect_sub_job.cc
+++ b/net/socket/websocket_transport_connect_sub_job.cc
@@ -70,7 +70,7 @@
return parent_job_->client_socket_factory_;
}
-const BoundNetLog& WebSocketTransportConnectSubJob::net_log() const {
+const NetLogWithSource& WebSocketTransportConnectSubJob::net_log() const {
return parent_job_->net_log();
}
diff --git a/net/socket/websocket_transport_connect_sub_job.h b/net/socket/websocket_transport_connect_sub_job.h
index f7ff5339..05e88a7 100644
--- a/net/socket/websocket_transport_connect_sub_job.h
+++ b/net/socket/websocket_transport_connect_sub_job.h
@@ -19,7 +19,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class ClientSocketFactory;
class IPEndPoint;
class StreamSocket;
@@ -67,7 +67,7 @@
ClientSocketFactory* client_socket_factory() const;
- const BoundNetLog& net_log() const;
+ const NetLogWithSource& net_log() const;
const IPEndPoint& CurrentAddress() const;
diff --git a/net/spdy/bidirectional_stream_spdy_impl.cc b/net/spdy/bidirectional_stream_spdy_impl.cc
index 8f55edd..44ccc3a3 100644
--- a/net/spdy/bidirectional_stream_spdy_impl.cc
+++ b/net/spdy/bidirectional_stream_spdy_impl.cc
@@ -48,7 +48,7 @@
void BidirectionalStreamSpdyImpl::Start(
const BidirectionalStreamRequestInfo* request_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool /*send_request_headers_automatically*/,
BidirectionalStreamImpl::Delegate* delegate,
std::unique_ptr<base::Timer> timer) {
diff --git a/net/spdy/bidirectional_stream_spdy_impl.h b/net/spdy/bidirectional_stream_spdy_impl.h
index f1d7f0e5..4e21796 100644
--- a/net/spdy/bidirectional_stream_spdy_impl.h
+++ b/net/spdy/bidirectional_stream_spdy_impl.h
@@ -27,7 +27,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class IOBuffer;
class SpdyHeaderBlock;
@@ -42,7 +42,7 @@
// BidirectionalStreamImpl implementation:
void Start(const BidirectionalStreamRequestInfo* request_info,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool send_request_headers_automatically,
BidirectionalStreamImpl::Delegate* delegate,
std::unique_ptr<base::Timer> timer) override;
diff --git a/net/spdy/bidirectional_stream_spdy_impl_unittest.cc b/net/spdy/bidirectional_stream_spdy_impl_unittest.cc
index 8c6de84..1217a32e 100644
--- a/net/spdy/bidirectional_stream_spdy_impl_unittest.cc
+++ b/net/spdy/bidirectional_stream_spdy_impl_unittest.cc
@@ -132,7 +132,7 @@
}
void Start(const BidirectionalStreamRequestInfo* request,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
stream_->Start(request, net_log,
/*send_request_headers_automatically=*/false, this,
base::MakeUnique<base::Timer>(false, false));
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc
index f090014..2c351c1 100644
--- a/net/spdy/spdy_http_stream.cc
+++ b/net/spdy/spdy_http_stream.cc
@@ -64,7 +64,7 @@
int SpdyHttpStream::InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& stream_net_log,
+ const NetLogWithSource& stream_net_log,
const CompletionCallback& callback) {
DCHECK(!stream_);
if (!spdy_session_)
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h
index 9002bc42..3a13f03 100644
--- a/net/spdy/spdy_http_stream.h
+++ b/net/spdy/spdy_http_stream.h
@@ -46,7 +46,7 @@
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override;
int SendRequest(const HttpRequestHeaders& headers,
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc
index 96149e8..d2b478a 100644
--- a/net/spdy/spdy_http_stream_unittest.cc
+++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -76,7 +76,7 @@
void CompleteRead() { UploadDataStream::OnReadCompleted(ERR_FAILED); }
// UploadDataStream implementation:
- int InitInternal(const BoundNetLog& net_log) override { return OK; }
+ int InitInternal(const NetLogWithSource& net_log) override { return OK; }
int ReadInternal(IOBuffer* buf, int buf_len) override {
if (async_ == FailureMode::ASYNC) {
@@ -146,8 +146,8 @@
new SequencedSocketData(reads, reads_count, writes, writes_count));
session_deps_.socket_factory->AddSocketDataProvider(sequenced_data_.get());
http_session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps_);
- session_ =
- CreateInsecureSpdySession(http_session_.get(), key_, BoundNetLog());
+ session_ = CreateInsecureSpdySession(http_session_.get(), key_,
+ NetLogWithSource());
}
void TestSendCredentials(
@@ -187,7 +187,7 @@
TestCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
std::unique_ptr<SpdyHttpStream> http_stream(
new SpdyHttpStream(session_, true));
// Make sure getting load timing information the stream early does not crash.
@@ -264,10 +264,9 @@
new SpdyHttpStream(session_, true));
// First write.
- ASSERT_EQ(OK,
- http_stream1->InitializeStream(&request1, DEFAULT_PRIORITY,
- BoundNetLog(),
- CompletionCallback()));
+ ASSERT_EQ(OK, http_stream1->InitializeStream(&request1, DEFAULT_PRIORITY,
+ NetLogWithSource(),
+ CompletionCallback()));
EXPECT_EQ(ERR_IO_PENDING, http_stream1->SendRequest(headers1, &response1,
callback1.callback()));
EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key_));
@@ -281,10 +280,9 @@
EXPECT_FALSE(http_stream2->GetLoadTimingInfo(&load_timing_info2));
// Second write.
- ASSERT_EQ(OK,
- http_stream2->InitializeStream(&request2, DEFAULT_PRIORITY,
- BoundNetLog(),
- CompletionCallback()));
+ ASSERT_EQ(OK, http_stream2->InitializeStream(&request2, DEFAULT_PRIORITY,
+ NetLogWithSource(),
+ CompletionCallback()));
EXPECT_EQ(ERR_IO_PENDING, http_stream2->SendRequest(headers2, &response2,
callback2.callback()));
EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key_));
@@ -346,14 +344,14 @@
request.url = GURL("http://www.example.org/");
request.upload_data_stream = &upload_stream;
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
TestCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
SpdyHttpStream http_stream(session_, true);
ASSERT_EQ(
OK,
@@ -402,14 +400,14 @@
request.url = GURL("http://www.example.org/");
request.upload_data_stream = &upload_stream;
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
TestCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
SpdyHttpStream http_stream(session_, true);
ASSERT_EQ(OK, http_stream.InitializeStream(&request, DEFAULT_PRIORITY,
net_log, CompletionCallback()));
@@ -455,14 +453,14 @@
request.url = GURL("http://www.example.org/");
request.upload_data_stream = &upload_stream;
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
TestCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
SpdyHttpStream http_stream(session_, true);
ASSERT_EQ(OK, http_stream.InitializeStream(&request, DEFAULT_PRIORITY,
net_log, CompletionCallback()));
@@ -524,12 +522,12 @@
request.url = GURL("http://www.example.org/");
request.upload_data_stream = &upload_stream;
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
upload_stream.AppendData(kUploadData, kUploadDataSize, false);
- BoundNetLog net_log;
+ NetLogWithSource net_log;
std::unique_ptr<SpdyHttpStream> http_stream(
new SpdyHttpStream(session_, true));
ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
@@ -618,12 +616,12 @@
request.url = GURL("http://www.example.org/");
request.upload_data_stream = &upload_stream;
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
upload_stream.AppendData(kUploadData, kUploadDataSize, false);
- BoundNetLog net_log;
+ NetLogWithSource net_log;
std::unique_ptr<SpdyHttpStream> http_stream(
new SpdyHttpStream(session_, true));
ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
@@ -701,12 +699,12 @@
request.url = GURL("http://www.example.org/");
request.upload_data_stream = &upload_stream;
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
upload_stream.AppendData("", 0, true);
- BoundNetLog net_log;
+ NetLogWithSource net_log;
std::unique_ptr<SpdyHttpStream> http_stream(
new SpdyHttpStream(session_, true));
ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
@@ -765,7 +763,7 @@
TestCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
std::unique_ptr<SpdyHttpStream> http_stream(
new SpdyHttpStream(session_, true));
ASSERT_EQ(OK,
@@ -814,11 +812,11 @@
request.url = GURL("http://www.example.org/");
request.upload_data_stream = &upload_stream;
- ASSERT_THAT(
- upload_stream.Init(TestCompletionCallback().callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(),
+ NetLogWithSource()),
+ IsOk());
- BoundNetLog net_log;
+ NetLogWithSource net_log;
std::unique_ptr<SpdyHttpStream> http_stream(
new SpdyHttpStream(session_, true));
ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
@@ -911,7 +909,7 @@
ReadErrorUploadDataStream upload_data_stream(
ReadErrorUploadDataStream::FailureMode::SYNC);
ASSERT_THAT(upload_data_stream.Init(TestCompletionCallback().callback(),
- BoundNetLog()),
+ NetLogWithSource()),
IsOk());
HttpRequestInfo request;
@@ -922,7 +920,7 @@
TestCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
SpdyHttpStream http_stream(session_, true);
ASSERT_EQ(OK, http_stream.InitializeStream(&request, DEFAULT_PRIORITY,
net_log, CompletionCallback()));
@@ -960,7 +958,7 @@
ReadErrorUploadDataStream upload_data_stream(
ReadErrorUploadDataStream::FailureMode::ASYNC);
ASSERT_THAT(upload_data_stream.Init(TestCompletionCallback().callback(),
- BoundNetLog()),
+ NetLogWithSource()),
IsOk());
HttpRequestInfo request;
@@ -971,7 +969,7 @@
TestCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
SpdyHttpStream http_stream(session_, true);
ASSERT_EQ(OK, http_stream.InitializeStream(&request, DEFAULT_PRIORITY,
net_log, CompletionCallback()));
@@ -1004,11 +1002,12 @@
request.upload_data_stream = &upload_stream;
TestCompletionCallback upload_callback;
- ASSERT_THAT(upload_stream.Init(upload_callback.callback(), BoundNetLog()),
- IsOk());
+ ASSERT_THAT(
+ upload_stream.Init(upload_callback.callback(), NetLogWithSource()),
+ IsOk());
upload_stream.AppendData("", 0, true);
- BoundNetLog net_log;
+ NetLogWithSource net_log;
SpdyHttpStream http_stream(session_, true);
ASSERT_THAT(http_stream.InitializeStream(&request, DEFAULT_PRIORITY, net_log,
CompletionCallback()),
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 5798693..3c620191 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -101,7 +101,7 @@
NormalSpdyTransactionHelper(
const HttpRequestInfo& request,
RequestPriority priority,
- const BoundNetLog& log,
+ const NetLogWithSource& log,
std::unique_ptr<SpdySessionDependencies> session_deps)
: request_(request),
priority_(priority),
@@ -253,7 +253,7 @@
TestCompletionCallback callback_;
std::unique_ptr<HttpNetworkTransaction> trans_;
DataVector data_vector_;
- const BoundNetLog log_;
+ const NetLogWithSource log_;
};
void ConnectStatusHelperWithExpectedStatus(const MockRead& status,
@@ -425,7 +425,7 @@
const GURL& url = helper.request().url;
SpdySessionKey key(HostPortPair::FromURL(url), ProxyServer::Direct(),
PRIVACY_MODE_DISABLED);
- BoundNetLog log;
+ NetLogWithSource log;
HttpNetworkSession* session = helper.session();
base::WeakPtr<SpdySession> spdy_session =
session->spdy_session_pool()->FindAvailableSession(key, url, log);
@@ -439,7 +439,7 @@
HttpResponseInfo* push_response,
const std::string& expected) {
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(data);
@@ -447,15 +447,15 @@
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
// Request the pushed path.
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
rv = trans2.Start(&CreateGetPushRequest(), callback.callback(),
- BoundNetLog());
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
base::RunLoop().RunUntilIdle();
@@ -511,7 +511,7 @@
request.method = "GET";
request.url = url;
request.load_flags = 0;
- int rv = trans.Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
callback.WaitForResult();
}
@@ -565,7 +565,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -620,7 +620,7 @@
arraysize(writes));
HttpRequestInfo http_req = CreateGetRequest();
- NormalSpdyTransactionHelper helper(http_req, p, BoundNetLog(), NULL);
+ NormalSpdyTransactionHelper helper(http_req, p, NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -676,10 +676,10 @@
SequencedSocketData data_placeholder1(NULL, 0, NULL, 0);
SequencedSocketData data_placeholder2(NULL, 0, NULL, 0);
- BoundNetLog log;
+ NetLogWithSource log;
TransactionHelperResult out;
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
// We require placeholder data because three get requests are sent out at
@@ -756,10 +756,10 @@
SequencedSocketData data_placeholder(NULL, 0, NULL, 0);
data_placeholder.set_connect_data(never_finishing_connect);
- BoundNetLog log;
+ NetLogWithSource log;
TransactionHelperResult out;
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
// We require placeholder data because two requests are sent out at
@@ -838,10 +838,10 @@
SequencedSocketData data_placeholder(NULL, 0, NULL, 0);
data_placeholder.set_connect_data(never_finishing_connect);
- BoundNetLog log;
+ NetLogWithSource log;
TransactionHelperResult out;
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&preconnect_data);
// We require placeholder data because 3 connections are attempted (first is
@@ -954,11 +954,11 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- BoundNetLog log;
+ NetLogWithSource log;
TransactionHelperResult out;
{
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction trans1(DEFAULT_PRIORITY, helper.session());
@@ -1088,10 +1088,10 @@
MockRead(ASYNC, 0, 17), // EOF
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- BoundNetLog log;
+ NetLogWithSource log;
TransactionHelperResult out;
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -1210,10 +1210,10 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- BoundNetLog log;
+ NetLogWithSource log;
TransactionHelperResult out;
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
std::unique_ptr<HttpNetworkTransaction> trans1(
@@ -1338,10 +1338,10 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
SequencedSocketData data_placeholder(NULL, 0, NULL, 0);
- BoundNetLog log;
+ NetLogWithSource log;
TransactionHelperResult out;
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
// We require placeholder data because three get requests are sent out, so
@@ -1416,8 +1416,8 @@
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
@@ -1448,8 +1448,8 @@
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
@@ -1474,7 +1474,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreatePostRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -1499,7 +1499,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateFilePostRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -1518,7 +1518,8 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateUnreadableFilePostRequest(),
- DEFAULT_PRIORITY, BoundNetLog(), NULL);
+ DEFAULT_PRIORITY, NetLogWithSource(),
+ NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
helper.RunDefaultTest();
@@ -1544,8 +1545,8 @@
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(CreateComplexPostRequest(),
- DEFAULT_PRIORITY, BoundNetLog(), NULL);
+ NormalSpdyTransactionHelper helper(
+ CreateComplexPostRequest(), DEFAULT_PRIORITY, NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -1568,8 +1569,8 @@
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(CreateChunkedPostRequest(),
- DEFAULT_PRIORITY, BoundNetLog(), NULL);
+ NormalSpdyTransactionHelper helper(
+ CreateChunkedPostRequest(), DEFAULT_PRIORITY, NetLogWithSource(), NULL);
// These chunks get merged into a single frame when being sent.
const int kFirstChunkSize = kUploadDataSize/2;
@@ -1603,8 +1604,8 @@
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(CreateChunkedPostRequest(),
- DEFAULT_PRIORITY, BoundNetLog(), NULL);
+ NormalSpdyTransactionHelper helper(
+ CreateChunkedPostRequest(), DEFAULT_PRIORITY, NetLogWithSource(), NULL);
upload_chunked_data_stream()->AppendData(kUploadData, kUploadDataSize, false);
@@ -1660,8 +1661,8 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -1701,8 +1702,8 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -1726,8 +1727,8 @@
// Write the request headers, and read the complete response
// while still waiting for chunked request data.
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(CreateChunkedPostRequest(),
- DEFAULT_PRIORITY, BoundNetLog(), NULL);
+ NormalSpdyTransactionHelper helper(
+ CreateChunkedPostRequest(), DEFAULT_PRIORITY, NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -1771,7 +1772,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
helper.StartDefaultTest();
@@ -1802,7 +1803,7 @@
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
@@ -1830,14 +1831,15 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -1875,7 +1877,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
@@ -1909,7 +1911,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -1942,14 +1944,14 @@
writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
helper.ResetTrans(); // Cancel the transaction.
@@ -1978,15 +1980,15 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(callback.GetResult(rv), IsOk());
helper.ResetTrans();
@@ -2030,7 +2032,7 @@
arraysize(writes2));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
helper.AddData(&data2);
@@ -2038,7 +2040,8 @@
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -2078,14 +2081,15 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -2531,7 +2535,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -2540,8 +2544,8 @@
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -2724,7 +2728,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -2733,8 +2737,8 @@
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -2771,7 +2775,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -2780,8 +2784,8 @@
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -2821,7 +2825,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -2830,8 +2834,8 @@
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -2869,7 +2873,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), nullptr);
+ NetLogWithSource(), nullptr);
helper.RunToCompletion(&data);
}
@@ -2895,15 +2899,15 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), nullptr);
+ NetLogWithSource(), nullptr);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv =
- trans->Start(&CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
rv = callback.GetResult(rv);
EXPECT_THAT(rv, IsOk());
HttpResponseInfo response = *trans->GetResponseInfo();
@@ -2945,14 +2949,14 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), nullptr);
+ NetLogWithSource(), nullptr);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans1 = helper.trans();
TestCompletionCallback callback1;
- int rv =
- trans1->Start(&CreateGetRequest(), callback1.callback(), BoundNetLog());
+ int rv = trans1->Start(&CreateGetRequest(), callback1.callback(),
+ NetLogWithSource());
rv = callback1.GetResult(rv);
EXPECT_THAT(rv, IsOk());
HttpResponseInfo response = *trans1->GetResponseInfo();
@@ -2962,7 +2966,7 @@
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
TestCompletionCallback callback2;
rv = trans2.Start(&CreateGetPushRequest(), callback2.callback(),
- BoundNetLog());
+ NetLogWithSource());
rv = callback2.GetResult(rv);
EXPECT_THAT(rv, IsOk());
response = *trans2.GetResponseInfo();
@@ -3033,7 +3037,7 @@
SequencedSocketData data(reads, arraysize(reads), writes,
arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
@@ -3139,8 +3143,8 @@
SequencedSocketData data(reads, arraysize(reads), writes,
arraysize(writes));
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
@@ -3214,7 +3218,7 @@
SequencedSocketData data(reads, arraysize(reads), writes,
arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
@@ -3243,7 +3247,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_COMPRESSION_ERROR));
@@ -3263,7 +3267,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_COMPRESSION_ERROR));
@@ -3285,7 +3289,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_FRAME_SIZE_ERROR));
@@ -3309,7 +3313,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
EXPECT_TRUE(helper.StartDefaultTest());
@@ -3340,7 +3344,7 @@
SequencedSocketData data(reads, arraysize(reads), writes.get(), kChunks);
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsOk());
@@ -3469,12 +3473,12 @@
TestCompletionCallback callback;
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TransactionHelperResult out = helper.output();
@@ -3552,14 +3556,14 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TransactionHelperResult out = helper.output();
@@ -3638,14 +3642,14 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TransactionHelperResult out = helper.output();
@@ -3720,15 +3724,15 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TransactionHelperResult out = helper.output();
@@ -3799,14 +3803,14 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
TransactionHelperResult out = helper.output();
@@ -3854,7 +3858,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.AddData(&data);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
@@ -3874,7 +3878,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
helper.StartDefaultTest();
@@ -3899,8 +3903,8 @@
request.method = "GET";
request.url = default_url_;
// Do not force SPDY so that second socket can negotiate HTTP/1.1.
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- nullptr);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), nullptr);
// First socket: HTTP/2 request rejected with HTTP_1_1_REQUIRED.
SpdyHeaderBlock headers(spdy_util_.ConstructGetHeaderBlock(kDefaultUrl));
@@ -3978,8 +3982,8 @@
auto session_deps = base::MakeUnique<SpdySessionDependencies>(
ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70"));
// Do not force SPDY so that second socket can negotiate HTTP/1.1.
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- std::move(session_deps));
+ NormalSpdyTransactionHelper helper(
+ request, DEFAULT_PRIORITY, NetLogWithSource(), std::move(session_deps));
// First socket: HTTP/2 CONNECT rejected with HTTP_1_1_REQUIRED.
SpdySerializedFrame req(spdy_util_.ConstructSpdyConnect(
@@ -4068,7 +4072,8 @@
auto session_deps = base::MakeUnique<SpdySessionDependencies>(
ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), std::move(session_deps));
+ NetLogWithSource(),
+ std::move(session_deps));
helper.RunPreTestSetup();
HttpNetworkTransaction* trans = helper.trans();
@@ -4097,8 +4102,8 @@
helper.AddData(data.get());
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -4128,7 +4133,8 @@
// When setting up the first transaction, we store the SpdySessionPool so that
// we can use the same pool in the second transaction.
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), std::move(session_deps));
+ NetLogWithSource(),
+ std::move(session_deps));
SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool();
helper.RunPreTestSetup();
@@ -4152,8 +4158,8 @@
TestCompletionCallback callback;
TransactionHelperResult out;
- out.rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ out.rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_EQ(out.rv, ERR_IO_PENDING);
out.rv = callback.WaitForResult();
@@ -4214,15 +4220,15 @@
auto session_deps_proxy = base::MakeUnique<SpdySessionDependencies>(
ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
NormalSpdyTransactionHelper helper_proxy(request_proxy, DEFAULT_PRIORITY,
- BoundNetLog(),
+ NetLogWithSource(),
std::move(session_deps_proxy));
helper_proxy.RunPreTestSetup();
helper_proxy.AddData(data_proxy.get());
HttpNetworkTransaction* trans_proxy = helper_proxy.trans();
TestCompletionCallback callback_proxy;
- int rv = trans_proxy->Start(
- &request_proxy, callback_proxy.callback(), BoundNetLog());
+ int rv = trans_proxy->Start(&request_proxy, callback_proxy.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback_proxy.WaitForResult();
EXPECT_EQ(0, rv);
@@ -4284,7 +4290,7 @@
arraysize(writes2));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.AddData(&data1);
helper.AddData(&data2);
helper.RunPreTestSetup();
@@ -4293,8 +4299,8 @@
HttpNetworkTransaction trans(DEFAULT_PRIORITY, helper.session());
TestCompletionCallback callback;
- int rv =
- trans.Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv = trans.Start(&helper.request(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// On the second transaction, we trigger the RST.
if (i == 1) {
@@ -4370,8 +4376,8 @@
SequencedSocketData data(spdy_reads, arraysize(spdy_reads), spdy_writes,
arraysize(spdy_writes));
HttpRequestInfo request(CreateGetRequest());
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -4504,7 +4510,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.AddData(&data);
helper.RunPreTestSetup();
@@ -4512,8 +4518,8 @@
// Start the transaction.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Run until we've received the primary HEADERS, the pushed HEADERS,
// and the body of the primary stream, but before we've received the HEADERS
@@ -4524,8 +4530,8 @@
// Request the pushed path. At this point, we've received the push, but the
// headers are not yet complete.
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
- rv =
- trans2.Start(&CreateGetPushRequest(), callback.callback(), BoundNetLog());
+ rv = trans2.Start(&CreateGetPushRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
data.Resume();
data.RunUntilPaused();
@@ -4619,7 +4625,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.AddData(&data);
helper.RunPreTestSetup();
@@ -4627,8 +4633,8 @@
// Start the transaction.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Run until we've received the primary HEADERS, the pushed HEADERS,
// the first HEADERS frame, and the body of the primary stream, but before
@@ -4639,8 +4645,8 @@
// Request the pushed path. At this point, we've received the push, but the
// headers are not yet complete.
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
- rv =
- trans2.Start(&CreateGetPushRequest(), callback.callback(), BoundNetLog());
+ rv = trans2.Start(&CreateGetPushRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
data.Resume();
data.RunUntilPaused();
@@ -4726,7 +4732,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.AddData(&data);
helper.RunPreTestSetup();
@@ -4734,8 +4740,8 @@
// Start the transaction.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Run until we've received the primary HEADERS, the pushed HEADERS,
// the first HEADERS frame, and the body of the primary stream, but before
@@ -4746,8 +4752,8 @@
// Request the pushed path. At this point, we've received the push, but the
// headers are not yet complete.
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
- rv =
- trans2.Start(&CreateGetPushRequest(), callback.callback(), BoundNetLog());
+ rv = trans2.Start(&CreateGetPushRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
data.Resume();
data.RunUntilPaused();
@@ -4807,7 +4813,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
@@ -4842,7 +4848,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
@@ -4919,8 +4925,8 @@
proxy_delegate->set_trusted_spdy_proxy(net::ProxyServer::FromURI(
"https://123.45.67.89:443", net::ProxyServer::SCHEME_HTTP));
session_deps->proxy_delegate.reset(proxy_delegate.release());
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- std::move(session_deps));
+ NormalSpdyTransactionHelper helper(
+ request, DEFAULT_PRIORITY, NetLogWithSource(), std::move(session_deps));
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -4929,7 +4935,7 @@
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -4988,7 +4994,7 @@
request.url = GURL(url_to_fetch);
request.load_flags = 0;
- BoundNetLog log;
+ NetLogWithSource log;
NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, log, nullptr);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -5103,7 +5109,7 @@
request0.url = GURL(url_to_fetch0);
request0.load_flags = 0;
- BoundNetLog log;
+ NetLogWithSource log;
NormalSpdyTransactionHelper helper(request0, DEFAULT_PRIORITY, log, nullptr);
helper.RunPreTestSetup();
@@ -5243,8 +5249,8 @@
request.url = GURL(url_to_fetch);
request.load_flags = 0;
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- nullptr);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), nullptr);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_EQ("HTTP/1.1 200", out.status_line);
@@ -5274,7 +5280,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -5283,8 +5289,8 @@
// Start the transaction with basic parameters.
TestCompletionCallback callback;
- int rv = trans->Start(
- &CreateGetRequest(), callback.callback(), BoundNetLog());
+ int rv = trans->Start(&CreateGetRequest(), callback.callback(),
+ NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -5342,8 +5348,8 @@
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(CreateGetRequest(), LOWEST, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(CreateGetRequest(), LOWEST,
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
@@ -5351,7 +5357,7 @@
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
HttpRequestInfo info1 = CreateGetRequest();
- int rv = trans->Start(&info1, callback.callback(), BoundNetLog());
+ int rv = trans->Start(&info1, callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Run the message loop, but do not allow the write to complete.
@@ -5363,14 +5369,14 @@
HttpRequestInfo info2 = CreateGetRequest();
TestCompletionCallback callback2;
HttpNetworkTransaction trans2(MEDIUM, helper.session());
- rv = trans2.Start(&info2, callback2.callback(), BoundNetLog());
+ rv = trans2.Start(&info2, callback2.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
base::RunLoop().RunUntilIdle();
HttpRequestInfo info3 = CreateGetRequest();
TestCompletionCallback callback3;
HttpNetworkTransaction trans3(HIGHEST, helper.session());
- rv = trans3.Start(&info3, callback3.callback(), BoundNetLog());
+ rv = trans3.Start(&info3, callback3.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
base::RunLoop().RunUntilIdle();
@@ -5463,15 +5469,16 @@
request.url = default_url_;
request.upload_data_stream = &upload_data_stream;
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.AddData(&data);
helper.RunPreTestSetup();
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -5579,7 +5586,7 @@
writes.size());
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.AddData(&data);
helper.RunPreTestSetup();
@@ -5591,7 +5598,8 @@
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -5670,14 +5678,15 @@
request.url = default_url_;
request.upload_data_stream = &upload_data_stream;
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
base::RunLoop().RunUntilIdle();
@@ -5807,15 +5816,16 @@
request.method = "POST";
request.url = default_url_;
request.upload_data_stream = &upload_data_stream;
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.AddData(&data);
helper.RunPreTestSetup();
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
base::RunLoop().RunUntilIdle(); // Write as much as we can.
@@ -5962,15 +5972,16 @@
request.method = "POST";
request.url = default_url_;
request.upload_data_stream = &upload_data_stream;
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
data.RunUntilPaused(); // Write as much as we can.
@@ -6126,15 +6137,16 @@
request.method = "POST";
request.url = default_url_;
request.upload_data_stream = &upload_data_stream;
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunPreTestSetup();
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
TestCompletionCallback callback;
- int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
+ int rv =
+ trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
data.RunUntilPaused(); // Write as much as we can.
@@ -6181,7 +6193,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
@@ -6211,7 +6223,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), NULL);
+ NetLogWithSource(), NULL);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
@@ -6244,8 +6256,8 @@
};
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- nullptr);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), nullptr);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
@@ -6281,8 +6293,8 @@
HttpRequestInfo request;
request.method = "GET";
request.url = default_url_;
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- nullptr);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), nullptr);
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
helper.RunToCompletion(&data);
@@ -6310,7 +6322,7 @@
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
- BoundNetLog(), nullptr);
+ NetLogWithSource(), nullptr);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
@@ -6330,8 +6342,8 @@
HttpRequestInfo request;
request.method = "GET";
request.url = default_url_;
- NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
- NULL);
+ NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
+ NetLogWithSource(), NULL);
helper.RunToCompletionWithSSLData(&data, std::move(ssl_provider));
TransactionHelperResult out = helper.output();
EXPECT_THAT(out.rv, IsError(ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY));
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index dd0e6b7..dc819c1 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -35,7 +35,7 @@
const std::string& user_agent,
const HostPortPair& endpoint,
const HostPortPair& proxy_server,
- const BoundNetLog& source_net_log,
+ const NetLogWithSource& source_net_log,
HttpAuthController* auth_controller)
: next_state_(STATE_DISCONNECTED),
spdy_stream_(spdy_stream),
@@ -46,8 +46,8 @@
write_buffer_len_(0),
was_ever_used_(false),
redirect_has_load_timing_info_(false),
- net_log_(BoundNetLog::Make(spdy_stream->net_log().net_log(),
- NetLogSourceType::PROXY_CLIENT_SOCKET)),
+ net_log_(NetLogWithSource::Make(spdy_stream->net_log().net_log(),
+ NetLogSourceType::PROXY_CLIENT_SOCKET)),
weak_factory_(this),
write_callback_weak_factory_(this) {
request_.method = "CONNECT";
@@ -150,7 +150,7 @@
spdy_stream_->IsOpen();
}
-const BoundNetLog& SpdyProxyClientSocket::NetLog() const {
+const NetLogWithSource& SpdyProxyClientSocket::NetLog() const {
return net_log_;
}
diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h
index c64b53a..dfdf5d7d 100644
--- a/net/spdy/spdy_proxy_client_socket.h
+++ b/net/spdy/spdy_proxy_client_socket.h
@@ -47,7 +47,7 @@
const std::string& user_agent,
const HostPortPair& endpoint,
const HostPortPair& proxy_server,
- const BoundNetLog& source_net_log,
+ const NetLogWithSource& source_net_log,
HttpAuthController* auth_controller);
// On destruction Disconnect() is called.
@@ -66,7 +66,7 @@
void Disconnect() override;
bool IsConnected() const override;
bool IsConnectedAndIdle() const override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void SetSubresourceSpeculation() override;
void SetOmniboxSpeculation() override;
bool WasEverUsed() const override;
@@ -169,7 +169,7 @@
bool redirect_has_load_timing_info_;
LoadTimingInfo redirect_load_timing_info_;
- const BoundNetLog net_log_;
+ const NetLogWithSource net_log_;
// The default weak pointer factory.
base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_;
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 95bd14a..8af17d97a 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -189,7 +189,7 @@
// Creates the SPDY session and stream.
spdy_session_ = CreateInsecureSpdySession(
- session_.get(), endpoint_spdy_session_key_, BoundNetLog());
+ session_.get(), endpoint_spdy_session_key_, NetLogWithSource());
base::WeakPtr<SpdyStream> spdy_stream(
CreateStreamSynchronously(
SPDY_BIDIRECTIONAL_STREAM, spdy_session_, url_, LOWEST,
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index d3e1e2e..e050171 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -443,13 +443,12 @@
CancelRequest();
}
-int SpdyStreamRequest::StartRequest(
- SpdyStreamType type,
- const base::WeakPtr<SpdySession>& session,
- const GURL& url,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) {
+int SpdyStreamRequest::StartRequest(SpdyStreamType type,
+ const base::WeakPtr<SpdySession>& session,
+ const GURL& url,
+ RequestPriority priority,
+ const NetLogWithSource& net_log,
+ const CompletionCallback& callback) {
DCHECK(session);
DCHECK(!session_);
DCHECK(!stream_);
@@ -515,7 +514,7 @@
stream_.reset();
url_ = GURL();
priority_ = MINIMUM_PRIORITY;
- net_log_ = BoundNetLog();
+ net_log_ = NetLogWithSource();
callback_.Reset();
}
@@ -672,7 +671,8 @@
session_unacked_recv_window_bytes_(0),
stream_initial_send_window_size_(kDefaultInitialWindowSize),
stream_max_recv_window_size_(stream_max_recv_window_size),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::HTTP2_SESSION)),
+ net_log_(
+ NetLogWithSource::Make(net_log, NetLogSourceType::HTTP2_SESSION)),
verify_domain_authentication_(verify_domain_authentication),
enable_sending_initial_data_(enable_sending_initial_data),
enable_ping_based_connection_checking_(
@@ -767,10 +767,9 @@
host_port_pair().host(), domain);
}
-int SpdySession::GetPushStream(
- const GURL& url,
- base::WeakPtr<SpdyStream>* stream,
- const BoundNetLog& stream_net_log) {
+int SpdySession::GetPushStream(const GURL& url,
+ base::WeakPtr<SpdyStream>* stream,
+ const NetLogWithSource& stream_net_log) {
CHECK(!in_io_loop_);
stream->reset();
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index f9ce0cb..fb76cf6f 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -83,7 +83,7 @@
const SpdyStreamId kFirstStreamId = 1;
const SpdyStreamId kLastStreamId = 0x7fffffff;
-class BoundNetLog;
+class NetLogWithSource;
struct LoadTimingInfo;
class ProxyDelegate;
class SpdyStream;
@@ -178,7 +178,7 @@
const base::WeakPtr<SpdySession>& session,
const GURL& url,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback);
// Cancels any pending stream creation request. May be called
@@ -207,7 +207,7 @@
SpdyStreamType type() const { return type_; }
const GURL& url() const { return url_; }
RequestPriority priority() const { return priority_; }
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
void Reset();
@@ -216,7 +216,7 @@
base::WeakPtr<SpdyStream> stream_;
GURL url_;
RequestPriority priority_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
CompletionCallback callback_;
base::WeakPtrFactory<SpdyStreamRequest> weak_ptr_factory_;
@@ -322,10 +322,9 @@
// okay to create a new stream (in which case |spdy_stream| is
// reset). Returns an error (not ERR_IO_PENDING) otherwise, and
// resets |spdy_stream|.
- int GetPushStream(
- const GURL& url,
- base::WeakPtr<SpdyStream>* spdy_stream,
- const BoundNetLog& stream_net_log);
+ int GetPushStream(const GURL& url,
+ base::WeakPtr<SpdyStream>* spdy_stream,
+ const NetLogWithSource& stream_net_log);
// Initialize the session with the given connection. |is_secure|
// must indicate whether |connection| uses an SSL socket or not; it
@@ -518,7 +517,7 @@
// session flow control.
bool IsSendStalled() const { return session_send_window_size_ == 0; }
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
int GetPeerAddress(IPEndPoint* address) const;
int GetLocalAddress(IPEndPoint* address) const;
@@ -1170,7 +1169,7 @@
// in the past.
std::deque<SpdyStreamId> stream_send_unstall_queue_[NUM_PRIORITIES];
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// Outside of tests, these should always be true.
bool verify_domain_authentication_;
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index a22b57a..710f9a6f 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -78,7 +78,7 @@
base::WeakPtr<SpdySession> SpdySessionPool::CreateAvailableSessionFromSocket(
const SpdySessionKey& key,
std::unique_ptr<ClientSocketHandle> connection,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
int certificate_error_code,
bool is_secure) {
TRACE_EVENT0("net", "SpdySessionPool::CreateAvailableSessionFromSocket");
@@ -121,7 +121,7 @@
base::WeakPtr<SpdySession> SpdySessionPool::FindAvailableSession(
const SpdySessionKey& key,
const GURL& url,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
UnclaimedPushedStreamMap::iterator url_it =
unclaimed_pushed_streams_.find(url);
if (!url.is_empty() && url_it != unclaimed_pushed_streams_.end()) {
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index eaefdcb4..a642c3a 100644
--- a/net/spdy/spdy_session_pool.h
+++ b/net/spdy/spdy_session_pool.h
@@ -29,7 +29,7 @@
namespace net {
class AddressList;
-class BoundNetLog;
+class NetLogWithSource;
class ClientSocketHandle;
class HostResolver;
class HttpServerProperties;
@@ -79,16 +79,17 @@
base::WeakPtr<SpdySession> CreateAvailableSessionFromSocket(
const SpdySessionKey& key,
std::unique_ptr<ClientSocketHandle> connection,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
int certificate_error_code,
bool is_secure);
// Return an available session for |key| that has an unclaimed push stream for
// |url| if such exists and |url| is not empty, or else an available session
// for |key| if such exists, or else nullptr.
- base::WeakPtr<SpdySession> FindAvailableSession(const SpdySessionKey& key,
- const GURL& url,
- const BoundNetLog& net_log);
+ base::WeakPtr<SpdySession> FindAvailableSession(
+ const SpdySessionKey& key,
+ const GURL& url,
+ const NetLogWithSource& net_log);
// Remove all mappings and aliases for the given session, which must
// still be available. Except for in tests, this must be called by
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc
index 66c71c3..e9fe0f2 100644
--- a/net/spdy/spdy_session_pool_unittest.cc
+++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -111,8 +111,8 @@
CreateNetworkSession();
// Setup the first session to the first host.
- base::WeakPtr<SpdySession> session =
- CreateInsecureSpdySession(http_session_.get(), test_key, BoundNetLog());
+ base::WeakPtr<SpdySession> session = CreateInsecureSpdySession(
+ http_session_.get(), test_key, NetLogWithSource());
// Flush the SpdySession::OnReadComplete() task.
base::RunLoop().RunUntilIdle();
@@ -121,10 +121,9 @@
EXPECT_TRUE(HasSpdySession(spdy_session_pool_, test_key));
// Set the stream to create a new session when it is closed.
- base::WeakPtr<SpdyStream> spdy_stream =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
- session, GURL("http://www.foo.com"),
- MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session, GURL("http://www.foo.com"), MEDIUM,
+ NetLogWithSource());
SessionOpeningDelegate delegate(spdy_session_pool_, test_key);
spdy_stream->SetDelegate(&delegate);
@@ -157,11 +156,10 @@
SpdySessionKey key1(test_host_port_pair1, ProxyServer::Direct(),
PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> session1 =
- CreateInsecureSpdySession(http_session_.get(), key1, BoundNetLog());
+ CreateInsecureSpdySession(http_session_.get(), key1, NetLogWithSource());
GURL url1(kTestHost1);
- base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
- session1, url1, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session1, url1, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
// Set up session 2
@@ -173,11 +171,10 @@
SpdySessionKey key2(test_host_port_pair2, ProxyServer::Direct(),
PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> session2 =
- CreateInsecureSpdySession(http_session_.get(), key2, BoundNetLog());
+ CreateInsecureSpdySession(http_session_.get(), key2, NetLogWithSource());
GURL url2(kTestHost2);
- base::WeakPtr<SpdyStream> spdy_stream2 =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
- session2, url2, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session2, url2, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream2);
// Set up session 3
@@ -189,11 +186,10 @@
SpdySessionKey key3(test_host_port_pair3, ProxyServer::Direct(),
PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> session3 =
- CreateInsecureSpdySession(http_session_.get(), key3, BoundNetLog());
+ CreateInsecureSpdySession(http_session_.get(), key3, NetLogWithSource());
GURL url3(kTestHost3);
- base::WeakPtr<SpdyStream> spdy_stream3 =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
- session3, url3, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream3 = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session3, url3, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream3);
// All sessions are active and not closed
@@ -286,8 +282,8 @@
CreateNetworkSession();
// Setup the first session to the first host.
- base::WeakPtr<SpdySession> session =
- CreateInsecureSpdySession(http_session_.get(), test_key, BoundNetLog());
+ base::WeakPtr<SpdySession> session = CreateInsecureSpdySession(
+ http_session_.get(), test_key, NetLogWithSource());
// Flush the SpdySession::OnReadComplete() task.
base::RunLoop().RunUntilIdle();
@@ -296,10 +292,9 @@
EXPECT_TRUE(HasSpdySession(spdy_session_pool_, test_key));
// Set the stream to create a new session when it is closed.
- base::WeakPtr<SpdyStream> spdy_stream =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
- session, GURL("http://www.foo.com"),
- MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session, GURL("http://www.foo.com"), MEDIUM,
+ NetLogWithSource());
SessionOpeningDelegate delegate(spdy_session_pool_, test_key);
spdy_stream->SetDelegate(&delegate);
@@ -351,7 +346,7 @@
HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort));
session_deps_.host_resolver->Resolve(
info, DEFAULT_PRIORITY, &test_hosts[i].addresses, CompletionCallback(),
- &request[i], BoundNetLog());
+ &request[i], NetLogWithSource());
// Setup a SpdySessionKey
test_hosts[i].key = SpdySessionKey(
@@ -375,7 +370,7 @@
// Setup the first session to the first host.
base::WeakPtr<SpdySession> session = CreateInsecureSpdySession(
- http_session_.get(), test_hosts[0].key, BoundNetLog());
+ http_session_.get(), test_hosts[0].key, NetLogWithSource());
// Flush the SpdySession::OnReadComplete() task.
base::RunLoop().RunUntilIdle();
@@ -400,7 +395,7 @@
data2.set_connect_data(connect_data);
session_deps_.socket_factory->AddSocketDataProvider(&data2);
base::WeakPtr<SpdySession> session2 = CreateInsecureSpdySession(
- http_session_.get(), test_hosts[2].key, BoundNetLog());
+ http_session_.get(), test_hosts[2].key, NetLogWithSource());
// Verify that we have sessions for everything.
EXPECT_TRUE(HasSpdySession(spdy_session_pool_, test_hosts[0].key));
@@ -411,7 +406,7 @@
// we got with host 0, and that is a different from host 2's session.
base::WeakPtr<SpdySession> session1 =
spdy_session_pool_->FindAvailableSession(
- test_hosts[1].key, GURL(test_hosts[1].url), BoundNetLog());
+ test_hosts[1].key, GURL(test_hosts[1].url), NetLogWithSource());
EXPECT_EQ(session.get(), session1.get());
EXPECT_NE(session2.get(), session1.get());
@@ -439,17 +434,16 @@
break;
case SPDY_POOL_CLOSE_IDLE_SESSIONS:
GURL url(test_hosts[0].url);
- base::WeakPtr<SpdyStream> spdy_stream =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
- session, url, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session, url, MEDIUM, NetLogWithSource());
GURL url1(test_hosts[1].url);
base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
- session1, url1, MEDIUM, BoundNetLog());
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session1, url1,
+ MEDIUM, NetLogWithSource());
GURL url2(test_hosts[2].url);
base::WeakPtr<SpdyStream> spdy_stream2 =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
- session2, url2, MEDIUM, BoundNetLog());
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session2, url2,
+ MEDIUM, NetLogWithSource());
// Close streams to make spdy_session and spdy_session1 inactive.
session->CloseCreatedStream(spdy_stream, OK);
@@ -541,11 +535,11 @@
SpdySessionKey keyA(
test_host_port_pairA, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> sessionA =
- CreateInsecureSpdySession(http_session_.get(), keyA, BoundNetLog());
+ CreateInsecureSpdySession(http_session_.get(), keyA, NetLogWithSource());
GURL urlA(kTestHostA);
base::WeakPtr<SpdyStream> spdy_streamA = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, sessionA, urlA, MEDIUM, BoundNetLog());
+ SPDY_BIDIRECTIONAL_STREAM, sessionA, urlA, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegateA(spdy_streamA);
spdy_streamA->SetDelegate(&delegateA);
@@ -569,12 +563,12 @@
SpdySessionKey keyB(
test_host_port_pairB, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> sessionB =
- CreateInsecureSpdySession(http_session_.get(), keyB, BoundNetLog());
+ CreateInsecureSpdySession(http_session_.get(), keyB, NetLogWithSource());
EXPECT_TRUE(sessionB->IsAvailable());
GURL urlB(kTestHostB);
base::WeakPtr<SpdyStream> spdy_streamB = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, sessionB, urlB, MEDIUM, BoundNetLog());
+ SPDY_BIDIRECTIONAL_STREAM, sessionB, urlB, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegateB(spdy_streamB);
spdy_streamB->SetDelegate(&delegateB);
@@ -588,7 +582,7 @@
SpdySessionKey keyC(
test_host_port_pairC, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> sessionC =
- CreateInsecureSpdySession(http_session_.get(), keyC, BoundNetLog());
+ CreateInsecureSpdySession(http_session_.get(), keyC, NetLogWithSource());
sessionC->CloseSessionOnError(ERR_SPDY_PROTOCOL_ERROR, "Error!");
EXPECT_TRUE(sessionC->IsDraining());
@@ -640,7 +634,7 @@
CreateNetworkSession();
base::WeakPtr<SpdySession> session =
- CreateInsecureSpdySession(http_session_.get(), key, BoundNetLog());
+ CreateInsecureSpdySession(http_session_.get(), key, NetLogWithSource());
// Flush the SpdySession::OnReadComplete() task.
base::RunLoop().RunUntilIdle();
@@ -649,14 +643,14 @@
// FindAvailableSession should return |session| if called with empty |url|.
base::WeakPtr<SpdySession> session1 =
- spdy_session_pool_->FindAvailableSession(key, GURL(), BoundNetLog());
+ spdy_session_pool_->FindAvailableSession(key, GURL(), NetLogWithSource());
EXPECT_EQ(session.get(), session1.get());
// FindAvailableSession should return |session| if called with |url| for which
// there is no pushed stream on any sessions owned by |spdy_session_pool_|.
base::WeakPtr<SpdySession> session2 =
spdy_session_pool_->FindAvailableSession(
- key, GURL("http://news.example.org/foo.html"), BoundNetLog());
+ key, GURL("http://news.example.org/foo.html"), NetLogWithSource());
EXPECT_EQ(session.get(), session2.get());
spdy_session_pool_->CloseCurrentSessions(ERR_ABORTED);
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index a03280fc..5bf1998 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -268,8 +268,9 @@
// Create the maximum number of concurrent streams.
for (size_t i = 0; i < kInitialMaxConcurrentStreams; ++i) {
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
}
@@ -277,16 +278,17 @@
std::unique_ptr<SpdyStreamRequest> request2(new SpdyStreamRequest);
StreamRequestDestroyingCallback callback1;
- ASSERT_EQ(
- ERR_IO_PENDING,
- request1.StartRequest(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
- MEDIUM, BoundNetLog(), callback1.MakeCallback()));
+ ASSERT_EQ(ERR_IO_PENDING,
+ request1.StartRequest(SPDY_BIDIRECTIONAL_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource(),
+ callback1.MakeCallback()));
// |callback2| is never called.
TestCompletionCallback callback2;
- ASSERT_EQ(ERR_IO_PENDING, request2->StartRequest(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
- MEDIUM, BoundNetLog(), callback2.callback()));
+ ASSERT_EQ(
+ ERR_IO_PENDING,
+ request2->StartRequest(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource(), callback2.callback()));
callback1.SetRequestToDestroy(std::move(request2));
@@ -332,7 +334,7 @@
CreateNetworkSession();
session_ = TryCreateInsecureSpdySessionExpectingFailure(
- http_session_.get(), key_, ERR_CONNECTION_CLOSED, BoundNetLog());
+ http_session_.get(), key_, ERR_CONNECTION_CLOSED, NetLogWithSource());
base::RunLoop().RunUntilIdle();
EXPECT_FALSE(session_);
@@ -363,13 +365,15 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate2(spdy_stream2);
spdy_stream2->SetDelegate(&delegate2);
@@ -429,8 +433,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
SpdyHeaderBlock headers1(spdy_util_.ConstructGetHeaderBlock(kDefaultUrl));
@@ -444,8 +449,9 @@
EXPECT_TRUE(session_->IsStreamActive(1));
// Create stream corresponding to the next request.
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
EXPECT_EQ(0u, spdy_stream2->stream_id());
@@ -486,13 +492,15 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate2(spdy_stream2);
spdy_stream2->SetDelegate(&delegate2);
@@ -551,13 +559,15 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate2(spdy_stream2);
spdy_stream2->SetDelegate(&delegate2);
@@ -635,8 +645,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -673,8 +684,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -696,7 +708,7 @@
SpdyStreamRequest stream_request;
int rv = stream_request.StartRequest(SPDY_REQUEST_RESPONSE_STREAM, session_,
- test_url_, MEDIUM, BoundNetLog(),
+ test_url_, MEDIUM, NetLogWithSource(),
CompletionCallback());
EXPECT_THAT(rv, IsError(ERR_FAILED));
@@ -730,8 +742,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -777,8 +790,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -836,8 +850,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
test::StreamDelegateSendImmediate delegate(spdy_stream1, nullptr);
spdy_stream1->SetDelegate(&delegate);
@@ -886,8 +901,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
test::StreamDelegateSendImmediate delegate(spdy_stream1, nullptr);
spdy_stream1->SetDelegate(&delegate);
@@ -928,8 +944,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -995,18 +1012,21 @@
session_->max_concurrent_streams_ = 3;
// Create three streams synchronously, and begin a fourth (which is stalled).
- base::WeakPtr<SpdyStream> stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate1(stream1);
stream1->SetDelegate(&delegate1);
- base::WeakPtr<SpdyStream> stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate2(stream2);
stream2->SetDelegate(&delegate2);
- base::WeakPtr<SpdyStream> stream3 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream3 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate3(stream3);
stream3->SetDelegate(&delegate3);
@@ -1015,7 +1035,7 @@
EXPECT_EQ(
ERR_IO_PENDING,
request4.StartRequest(SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_,
- MEDIUM, BoundNetLog(), callback4.callback()));
+ MEDIUM, NetLogWithSource(), callback4.callback()));
// Streams 1-3 were created. 4th is stalled. No streams are active yet.
EXPECT_EQ(0u, session_->num_active_streams());
@@ -1119,7 +1139,7 @@
TestCompletionCallback callback;
int rv =
request.StartRequest(SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_,
- MEDIUM, BoundNetLog(), callback.callback());
+ MEDIUM, NetLogWithSource(), callback.callback());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
// Stream is stalled.
@@ -1171,15 +1191,16 @@
session_->max_concurrent_streams_ = 1;
// Create two streams: one synchronously, and one which stalls.
- base::WeakPtr<SpdyStream> stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
SpdyStreamRequest request2;
TestCompletionCallback callback2;
EXPECT_EQ(
ERR_IO_PENDING,
request2.StartRequest(SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_,
- MEDIUM, BoundNetLog(), callback2.callback()));
+ MEDIUM, NetLogWithSource(), callback2.callback()));
EXPECT_EQ(1u, session_->num_created_streams());
EXPECT_EQ(1u, session_->pending_create_stream_queue_size(MEDIUM));
@@ -1192,8 +1213,9 @@
EXPECT_EQ(0u, session_->pending_create_stream_queue_size(MEDIUM));
// Create a third stream prior to the second stream's callback.
- base::WeakPtr<SpdyStream> stream3 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream3 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
EXPECT_EQ(1u, session_->num_created_streams());
EXPECT_EQ(0u, session_->pending_create_stream_queue_size(MEDIUM));
@@ -1243,8 +1265,9 @@
CreateInsecureSpdySession();
// Process the principal request, and the first push stream request & body.
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -1303,8 +1326,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
test::StreamDelegateSendImmediate delegate(spdy_stream1, nullptr);
spdy_stream1->SetDelegate(&delegate);
@@ -1368,8 +1392,9 @@
// Create the maximum number of concurrent streams.
for (size_t i = 0; i < kInitialMaxConcurrentStreams; ++i) {
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
}
@@ -1377,7 +1402,7 @@
SpdyStreamRequest request;
ASSERT_EQ(ERR_IO_PENDING,
request.StartRequest(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
- MEDIUM, BoundNetLog(),
+ MEDIUM, NetLogWithSource(),
stream_releaser.MakeCallback(&request)));
base::RunLoop().RunUntilIdle();
@@ -1418,14 +1443,16 @@
// Leave room for only one more stream to be created.
for (size_t i = 0; i < kInitialMaxConcurrentStreams - 1; ++i) {
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
}
// Create 2 more streams. First will succeed. Second will be pending.
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
// Use scoped_ptr to let us invalidate the memory when we want to, to trigger
@@ -1433,9 +1460,10 @@
std::unique_ptr<TestCompletionCallback> callback(new TestCompletionCallback);
SpdyStreamRequest request;
- ASSERT_EQ(ERR_IO_PENDING,
- request.StartRequest(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
- MEDIUM, BoundNetLog(), callback->callback()));
+ ASSERT_EQ(
+ ERR_IO_PENDING,
+ request.StartRequest(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource(), callback->callback()));
// Release the first one, this will allow the second to be created.
spdy_stream1->Cancel();
@@ -1661,8 +1689,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -1717,8 +1746,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream_lowest = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream_lowest =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream_lowest);
EXPECT_EQ(0u, spdy_stream_lowest->stream_id());
test::StreamDelegateDoNothing delegate_lowest(spdy_stream_lowest);
@@ -1726,7 +1756,7 @@
base::WeakPtr<SpdyStream> spdy_stream_highest =
CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
- test_url_, HIGHEST, BoundNetLog());
+ test_url_, HIGHEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream_highest);
EXPECT_EQ(0u, spdy_stream_highest->stream_id());
test::StreamDelegateDoNothing delegate_highest(spdy_stream_highest);
@@ -1778,14 +1808,15 @@
base::WeakPtr<SpdyStream> spdy_stream1 =
CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
- test_url_, HIGHEST, BoundNetLog());
+ test_url_, HIGHEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream2);
EXPECT_EQ(0u, spdy_stream2->stream_id());
test::StreamDelegateDoNothing delegate2(spdy_stream2);
@@ -1834,13 +1865,15 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, HIGHEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ HIGHEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream2);
EXPECT_EQ(0u, spdy_stream2->stream_id());
@@ -1884,13 +1917,15 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, HIGHEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ HIGHEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream2);
EXPECT_EQ(0u, spdy_stream2->stream_id());
@@ -1948,13 +1983,15 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream2);
EXPECT_EQ(0u, spdy_stream2->stream_id());
@@ -2017,13 +2054,15 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream2);
EXPECT_EQ(0u, spdy_stream2->stream_id());
@@ -2110,8 +2149,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
EXPECT_EQ(0u, spdy_stream->stream_id());
@@ -2255,8 +2295,9 @@
// Read the settings frame.
base::RunLoop().RunUntilIdle();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -2267,14 +2308,14 @@
ASSERT_EQ(
ERR_IO_PENDING,
request2.StartRequest(SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_,
- LOWEST, BoundNetLog(), callback2.callback()));
+ LOWEST, NetLogWithSource(), callback2.callback()));
TestCompletionCallback callback3;
SpdyStreamRequest request3;
ASSERT_EQ(
ERR_IO_PENDING,
request3.StartRequest(SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_,
- LOWEST, BoundNetLog(), callback3.callback()));
+ LOWEST, NetLogWithSource(), callback3.callback()));
EXPECT_EQ(0u, session_->num_active_streams());
EXPECT_EQ(1u, session_->num_created_streams());
@@ -2358,27 +2399,31 @@
// Leave room for only one more stream to be created.
for (size_t i = 0; i < kInitialMaxConcurrentStreams - 1; ++i) {
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
}
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
TestCompletionCallback callback2;
SpdyStreamRequest request2;
- ASSERT_EQ(ERR_IO_PENDING, request2.StartRequest(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
- LOWEST, BoundNetLog(), callback2.callback()));
+ ASSERT_EQ(
+ ERR_IO_PENDING,
+ request2.StartRequest(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ LOWEST, NetLogWithSource(), callback2.callback()));
TestCompletionCallback callback3;
SpdyStreamRequest request3;
- ASSERT_EQ(ERR_IO_PENDING, request3.StartRequest(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
- LOWEST, BoundNetLog(), callback3.callback()));
+ ASSERT_EQ(
+ ERR_IO_PENDING,
+ request3.StartRequest(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ LOWEST, NetLogWithSource(), callback3.callback()));
EXPECT_EQ(0u, session_->num_active_streams());
EXPECT_EQ(kInitialMaxConcurrentStreams, session_->num_created_streams());
@@ -2465,8 +2510,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -2524,8 +2570,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -2591,8 +2638,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -2669,8 +2717,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -2773,8 +2822,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -2834,8 +2884,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
ASSERT_TRUE(spdy_stream1);
@@ -2915,7 +2966,7 @@
EXPECT_EQ(ERR_IO_PENDING,
connection2->Init(host_port2.ToString(), params2, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool, BoundNetLog()));
+ callback2.callback(), pool, NetLogWithSource()));
EXPECT_TRUE(pool->IsStalled());
// The socket pool should close the connection asynchronously and establish a
@@ -2960,7 +3011,7 @@
SpdySessionKey key1(HostPortPair("1.com", 80), ProxyServer::Direct(),
PRIVACY_MODE_DISABLED);
base::WeakPtr<SpdySession> session1 = ::net::CreateInsecureSpdySession(
- http_session_.get(), key1, BoundNetLog());
+ http_session_.get(), key1, NetLogWithSource());
EXPECT_FALSE(pool->IsStalled());
// Set up an alias for the idle SPDY session, increasing its ref count to 2.
@@ -2973,10 +3024,11 @@
// order to create the alias.
session_deps_.host_resolver->Resolve(info, DEFAULT_PRIORITY, &addresses,
CompletionCallback(), &request,
- BoundNetLog());
+ NetLogWithSource());
// Get a session for |key2|, which should return the session created earlier.
base::WeakPtr<SpdySession> session2 =
- spdy_session_pool_->FindAvailableSession(key2, GURL(), BoundNetLog());
+ spdy_session_pool_->FindAvailableSession(key2, GURL(),
+ NetLogWithSource());
ASSERT_EQ(session1.get(), session2.get());
EXPECT_FALSE(pool->IsStalled());
@@ -2991,7 +3043,7 @@
EXPECT_EQ(ERR_IO_PENDING,
connection3->Init(host_port3.ToString(), params3, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback3.callback(), pool, BoundNetLog()));
+ callback3.callback(), pool, NetLogWithSource()));
EXPECT_TRUE(pool->IsStalled());
// The socket pool should close the connection asynchronously and establish a
@@ -3045,9 +3097,9 @@
// Create a stream using the session, and send a request.
TestCompletionCallback callback1;
- base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
- test_url_, DEFAULT_PRIORITY, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, DEFAULT_PRIORITY,
+ NetLogWithSource());
ASSERT_TRUE(spdy_stream1.get());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
@@ -3069,7 +3121,7 @@
EXPECT_EQ(ERR_IO_PENDING,
connection2->Init(host_port2.ToString(), params2, DEFAULT_PRIORITY,
ClientSocketPool::RespectLimits::ENABLED,
- callback2.callback(), pool, BoundNetLog()));
+ callback2.callback(), pool, NetLogWithSource()));
EXPECT_TRUE(pool->IsStalled());
// Running the message loop should cause the socket pool to ask the SPDY
@@ -3137,9 +3189,9 @@
void OnClose(int status) override {
GURL url(kDefaultUrl);
- ignore_result(
- CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
- session_, url, MEDIUM, BoundNetLog()));
+ ignore_result(CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
+ session_, url, MEDIUM,
+ NetLogWithSource()));
}
private:
@@ -3170,8 +3222,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
EXPECT_EQ(0u, spdy_stream->stream_id());
@@ -3231,8 +3284,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
TestCompletionCallback callback1;
EXPECT_NE(spdy_stream1->send_window_size(), window_size);
@@ -3246,8 +3300,9 @@
spdy_stream1->Cancel();
EXPECT_FALSE(spdy_stream1);
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(spdy_stream2);
EXPECT_EQ(spdy_stream2->send_window_size(), window_size);
spdy_stream2->Cancel();
@@ -3435,8 +3490,9 @@
pool_peer.SetStreamInitialRecvWindowSize(stream_max_recv_window_size);
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
EXPECT_EQ(stream_max_recv_window_size, spdy_stream->recv_window_size());
test::StreamDelegateDoNothing delegate(spdy_stream);
@@ -3568,8 +3624,9 @@
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -3652,8 +3709,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(stream);
EXPECT_EQ(0u, stream->stream_id());
@@ -3714,8 +3772,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(stream);
EXPECT_EQ(0u, stream->stream_id());
@@ -3794,8 +3853,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream =
+ CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM, session_, test_url_,
+ MEDIUM, NetLogWithSource());
ASSERT_TRUE(stream);
EXPECT_EQ(0u, stream->stream_id());
@@ -3889,8 +3949,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
test::StreamDelegateWithBody delegate(stream, kBodyDataStringPiece);
@@ -4008,15 +4069,17 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream1);
test::StreamDelegateWithBody delegate1(stream1, kBodyDataStringPiece);
stream1->SetDelegate(&delegate1);
- base::WeakPtr<SpdyStream> stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, MEDIUM, NetLogWithSource());
ASSERT_TRUE(stream2);
test::StreamDelegateWithBody delegate2(stream2, kBodyDataStringPiece);
@@ -4137,22 +4200,25 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream1);
test::StreamDelegateWithBody delegate1(stream1, kBodyDataStringPiece);
stream1->SetDelegate(&delegate1);
- base::WeakPtr<SpdyStream> stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream2);
StreamClosingDelegate delegate2(stream2, kBodyDataStringPiece);
stream2->SetDelegate(&delegate2);
- base::WeakPtr<SpdyStream> stream3 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream3 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream3);
test::StreamDelegateWithBody delegate3(stream3, kBodyDataStringPiece);
@@ -4266,15 +4332,17 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream1);
test::StreamDelegateWithBody delegate1(stream1, kBodyDataStringPiece);
stream1->SetDelegate(&delegate1);
- base::WeakPtr<SpdyStream> stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream2);
test::StreamDelegateWithBody delegate2(stream2, kBodyDataStringPiece);
@@ -4355,8 +4423,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
test::StreamDelegateDoNothing delegate(spdy_stream);
spdy_stream->SetDelegate(&delegate);
@@ -4413,8 +4482,9 @@
// Read the settings frame.
base::RunLoop().RunUntilIdle();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -4448,8 +4518,9 @@
// Second stream should not be stalled, although we have 2 active streams, but
// one of them is push stream and should not be taken into account when we
// create streams on the client.
- base::WeakPtr<SpdyStream> spdy_stream2 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream2 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
EXPECT_TRUE(spdy_stream2);
EXPECT_EQ(2u, session_->num_active_streams());
EXPECT_EQ(1u, session_->num_created_streams());
@@ -4488,8 +4559,9 @@
CreateInsecureSpdySession();
session_->set_max_concurrent_pushed_streams(1);
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -4591,8 +4663,9 @@
CreateNetworkSession();
CreateSecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
EXPECT_EQ(0u, spdy_stream->stream_id());
test::StreamDelegateDoNothing delegate(spdy_stream);
@@ -4680,8 +4753,9 @@
CreateNetworkSession();
CreateSecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream);
EXPECT_EQ(0u, spdy_stream->stream_id());
test::StreamDelegateDoNothing delegate(spdy_stream);
@@ -4742,8 +4816,9 @@
CreateInsecureSpdySession();
session_->set_max_concurrent_pushed_streams(1);
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -4825,8 +4900,9 @@
CreateNetworkSession();
CreateInsecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 =
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
+ test_url_, LOWEST, NetLogWithSource());
ASSERT_TRUE(spdy_stream1);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
@@ -4858,8 +4934,8 @@
EXPECT_EQ(0u, session_->num_active_pushed_streams());
base::WeakPtr<SpdyStream> pushed_stream;
- int rv =
- session_->GetPushStream(GURL(kPushedUrl), &pushed_stream, BoundNetLog());
+ int rv = session_->GetPushStream(GURL(kPushedUrl), &pushed_stream,
+ NetLogWithSource());
ASSERT_THAT(rv, IsOk());
ASSERT_TRUE(pushed_stream);
test::StreamDelegateCloseOnHeaders delegate2(pushed_stream);
@@ -4938,7 +5014,7 @@
void CreateSecureSpdySession() {
session_ = ::net::CreateSecureSpdySession(http_session_.get(), key_,
- BoundNetLog());
+ NetLogWithSource());
}
SpdyAltSvcWireFormat::AlternativeService alternative_service_;
@@ -5077,9 +5153,9 @@
CreateNetworkSession();
CreateSecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
- GURL(request_origin), MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session_, GURL(request_origin), MEDIUM,
+ NetLogWithSource());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
@@ -5131,9 +5207,9 @@
CreateNetworkSession();
CreateSecureSpdySession();
- base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM, session_,
- GURL(request_origin), MEDIUM, BoundNetLog());
+ base::WeakPtr<SpdyStream> spdy_stream1 = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session_, GURL(request_origin), MEDIUM,
+ NetLogWithSource());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 4d060b7..fecb0e3 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -89,7 +89,7 @@
RequestPriority priority,
int32_t initial_send_window_size,
int32_t max_recv_window_size,
- const BoundNetLog& net_log)
+ const NetLogWithSource& net_log)
: type_(type),
stream_id_(0),
url_(url),
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index ee3cec5..8a252f47 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -173,7 +173,7 @@
RequestPriority priority,
int32_t initial_send_window_size,
int32_t max_recv_window_size,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
~SpdyStream();
@@ -287,7 +287,7 @@
// writes.
bool WasEverUsed() const;
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
base::Time GetRequestTime() const;
void SetRequestTime(base::Time t);
@@ -547,7 +547,7 @@
// Not valid until the stream is closed.
int response_status_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
base::TimeTicks send_time_;
base::TimeTicks recv_first_byte_time_;
diff --git a/net/spdy/spdy_stream_unittest.cc b/net/spdy/spdy_stream_unittest.cc
index 3fd84ff..2c4f2721 100644
--- a/net/spdy/spdy_stream_unittest.cc
+++ b/net/spdy/spdy_stream_unittest.cc
@@ -68,7 +68,7 @@
base::WeakPtr<SpdySession> CreateDefaultSpdySession() {
SpdySessionKey key(HostPortPair("www.example.org", 80),
ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
- return CreateInsecureSpdySession(session_.get(), key, BoundNetLog());
+ return CreateInsecureSpdySession(session_.get(), key, NetLogWithSource());
}
void TearDown() override { base::RunLoop().RunUntilIdle(); }
@@ -161,9 +161,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateSendImmediate delegate(stream, kPostBodyStringPiece);
@@ -242,7 +241,7 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, BoundNetLog());
+ SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateWithTrailers delegate(stream, kPostBodyStringPiece);
@@ -282,9 +281,9 @@
// Conjure up a stream.
SpdyStreamRequest stream_request;
- int result = stream_request.StartRequest(SPDY_PUSH_STREAM, spdy_session,
- GURL(), DEFAULT_PRIORITY,
- BoundNetLog(), CompletionCallback());
+ int result = stream_request.StartRequest(
+ SPDY_PUSH_STREAM, spdy_session, GURL(), DEFAULT_PRIORITY,
+ NetLogWithSource(), CompletionCallback());
ASSERT_THAT(result, IsOk());
base::WeakPtr<SpdyStream> stream = stream_request.ReleaseStream();
ActivatePushStream(spdy_session.get(), stream.get());
@@ -438,9 +437,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
std::string body_data(3 * kMaxSpdyFrameChunkSize, 'x');
@@ -494,9 +492,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
std::string body_data(3 * kMaxSpdyFrameChunkSize, 'x');
@@ -548,9 +545,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateDoNothing delegate(stream);
@@ -600,9 +596,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateDoNothing delegate(stream);
@@ -618,7 +613,8 @@
data.RunUntilPaused();
base::WeakPtr<SpdyStream> push_stream;
- EXPECT_THAT(session->GetPushStream(url, &push_stream, BoundNetLog()), IsOk());
+ EXPECT_THAT(session->GetPushStream(url, &push_stream, NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(push_stream);
data.Resume();
@@ -667,9 +663,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateDoNothing delegate(stream);
@@ -685,13 +680,15 @@
data.RunUntilPaused();
base::WeakPtr<SpdyStream> push_stream;
- EXPECT_THAT(session->GetPushStream(url, &push_stream, BoundNetLog()), IsOk());
+ EXPECT_THAT(session->GetPushStream(url, &push_stream, NetLogWithSource()),
+ IsOk());
EXPECT_TRUE(push_stream);
data.Resume();
data.RunUntilPaused();
- EXPECT_THAT(session->GetPushStream(url, &push_stream, BoundNetLog()), IsOk());
+ EXPECT_THAT(session->GetPushStream(url, &push_stream, NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(push_stream);
data.Resume();
@@ -740,9 +737,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateDoNothing delegate(stream);
@@ -758,13 +754,15 @@
data.RunUntilPaused();
base::WeakPtr<SpdyStream> push_stream;
- EXPECT_THAT(session->GetPushStream(url, &push_stream, BoundNetLog()), IsOk());
+ EXPECT_THAT(session->GetPushStream(url, &push_stream, NetLogWithSource()),
+ IsOk());
EXPECT_TRUE(push_stream);
data.Resume();
data.RunUntilPaused();
- EXPECT_THAT(session->GetPushStream(url, &push_stream, BoundNetLog()), IsOk());
+ EXPECT_THAT(session->GetPushStream(url, &push_stream, NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(push_stream);
data.Resume();
@@ -889,9 +887,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateWithBody delegate(stream, kPostBodyStringPiece);
@@ -969,9 +966,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_BIDIRECTIONAL_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateSendImmediate delegate(stream, kPostBodyStringPiece);
@@ -1051,9 +1047,8 @@
base::WeakPtr<SpdySession> session(CreateDefaultSpdySession());
- base::WeakPtr<SpdyStream> stream =
- CreateStreamSynchronously(
- SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, BoundNetLog());
+ base::WeakPtr<SpdyStream> stream = CreateStreamSynchronously(
+ SPDY_REQUEST_RESPONSE_STREAM, session, url, LOWEST, NetLogWithSource());
ASSERT_TRUE(stream);
StreamDelegateDoNothing delegate(stream);
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 1cd5c5d5..21a4703b 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -251,7 +251,7 @@
const base::WeakPtr<SpdySession>& session,
const GURL& url,
RequestPriority priority,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
SpdyStreamRequest stream_request;
int rv = stream_request.StartRequest(type, session, url, priority, net_log,
CompletionCallback());
@@ -412,7 +412,7 @@
ct::CertPolicyCompliance DoesConformToCertPolicy(
X509Certificate* cert,
const SCTList& verified_scts,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS;
}
@@ -420,7 +420,7 @@
X509Certificate* cert,
const ct::EVCertsWhitelist* ev_whitelist,
const SCTList& verified_scts,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS;
}
};
@@ -434,7 +434,7 @@
const std::string& stapled_ocsp_response,
const std::string& sct_list_from_tls_extension,
net::ct::CTVerifyResult* result,
- const net::BoundNetLog& net_log) override {
+ const net::NetLogWithSource& net_log) override {
return net::OK;
}
@@ -486,7 +486,7 @@
bool HasSpdySession(SpdySessionPool* pool, const SpdySessionKey& key) {
return static_cast<bool>(
- pool->FindAvailableSession(key, GURL(), BoundNetLog()));
+ pool->FindAvailableSession(key, GURL(), NetLogWithSource()));
}
namespace {
@@ -494,7 +494,7 @@
base::WeakPtr<SpdySession> CreateSpdySessionHelper(
HttpNetworkSession* http_session,
const SpdySessionKey& key,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
Error expected_status,
bool is_secure) {
EXPECT_FALSE(HasSpdySession(http_session->spdy_session_pool(), key));
@@ -552,7 +552,7 @@
base::WeakPtr<SpdySession> CreateInsecureSpdySession(
HttpNetworkSession* http_session,
const SpdySessionKey& key,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
return CreateSpdySessionHelper(http_session, key, net_log,
OK, false /* is_secure */);
}
@@ -561,7 +561,7 @@
HttpNetworkSession* http_session,
const SpdySessionKey& key,
Error expected_error,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
DCHECK_LT(expected_error, ERR_IO_PENDING);
return CreateSpdySessionHelper(http_session, key, net_log,
expected_error, false /* is_secure */);
@@ -570,7 +570,7 @@
base::WeakPtr<SpdySession> CreateSecureSpdySession(
HttpNetworkSession* http_session,
const SpdySessionKey& key,
- const BoundNetLog& net_log) {
+ const NetLogWithSource& net_log) {
return CreateSpdySessionHelper(http_session, key, net_log,
OK, true /* is_secure */);
}
@@ -581,7 +581,7 @@
class FakeSpdySessionClientSocket : public MockClientSocket {
public:
explicit FakeSpdySessionClientSocket(int read_result)
- : MockClientSocket(BoundNetLog()), read_result_(read_result) {}
+ : MockClientSocket(NetLogWithSource()), read_result_(read_result) {}
~FakeSpdySessionClientSocket() override {}
@@ -643,7 +643,7 @@
expected_status == OK ? ERR_IO_PENDING : expected_status)));
base::WeakPtr<SpdySession> spdy_session =
pool->CreateAvailableSessionFromSocket(
- key, std::move(handle), BoundNetLog(), OK, true /* is_secure */);
+ key, std::move(handle), NetLogWithSource(), OK, true /* is_secure */);
// Failure is reported asynchronously.
EXPECT_TRUE(spdy_session);
EXPECT_TRUE(HasSpdySession(pool, key));
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h
index 7d2a1bc..2f3c290 100644
--- a/net/spdy/spdy_test_util_common.h
+++ b/net/spdy/spdy_test_util_common.h
@@ -40,7 +40,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class CTVerifier;
class CTPolicyEnforcer;
class HostPortPair;
@@ -105,7 +105,7 @@
const base::WeakPtr<SpdySession>& session,
const GURL& url,
RequestPriority priority,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Helper class used by some tests to release a stream as soon as it's
// created.
@@ -221,7 +221,8 @@
URLRequestContextStorage storage_;
};
-// Equivalent to pool->GetIfExists(spdy_session_key, BoundNetLog()) != NULL.
+// Equivalent to pool->GetIfExists(spdy_session_key, NetLogWithSource()) !=
+// NULL.
bool HasSpdySession(SpdySessionPool* pool, const SpdySessionKey& key);
// Creates a SPDY session for the given key and puts it in the SPDY
@@ -230,7 +231,7 @@
base::WeakPtr<SpdySession> CreateInsecureSpdySession(
HttpNetworkSession* http_session,
const SpdySessionKey& key,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Tries to create a SPDY session for the given key but expects the
// attempt to fail with the given error. A SPDY session for |key| must
@@ -240,13 +241,13 @@
HttpNetworkSession* http_session,
const SpdySessionKey& key,
Error expected_error,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Like CreateInsecureSpdySession(), but uses TLS.
base::WeakPtr<SpdySession> CreateSecureSpdySession(
HttpNetworkSession* http_session,
const SpdySessionKey& key,
- const BoundNetLog& net_log);
+ const NetLogWithSource& net_log);
// Creates an insecure SPDY session for the given key and puts it in
// |pool|. The returned session will neither receive nor send any
diff --git a/net/spdy/spdy_write_queue_unittest.cc b/net/spdy/spdy_write_queue_unittest.cc
index bcf4078..9eae926 100644
--- a/net/spdy/spdy_write_queue_unittest.cc
+++ b/net/spdy/spdy_write_queue_unittest.cc
@@ -95,9 +95,8 @@
// -- be careful to not call any functions that expect the session to
// be there.
SpdyStream* MakeTestStream(RequestPriority priority) {
- return new SpdyStream(
- SPDY_BIDIRECTIONAL_STREAM, base::WeakPtr<SpdySession>(),
- GURL(), priority, 0, 0, BoundNetLog());
+ return new SpdyStream(SPDY_BIDIRECTIONAL_STREAM, base::WeakPtr<SpdySession>(),
+ GURL(), priority, 0, 0, NetLogWithSource());
}
// Add some frame producers of different priority. The producers
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index 793304f..c535794 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -354,7 +354,7 @@
TestCompletionCallback callback;
std::unique_ptr<HostResolver::Request> request;
int rv = resolver->Resolve(info, DEFAULT_PRIORITY, address_list,
- callback.callback(), &request, BoundNetLog());
+ callback.callback(), &request, NetLogWithSource());
if (rv == ERR_IO_PENDING)
rv = callback.WaitForResult();
if (rv != OK) {
diff --git a/net/tools/gdig/file_net_log.cc b/net/tools/gdig/file_net_log.cc
index 1281f8a..735263d 100644
--- a/net/tools/gdig/file_net_log.cc
+++ b/net/tools/gdig/file_net_log.cc
@@ -23,7 +23,7 @@
}
void FileNetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) {
- // Only BoundNetLogs without a NetLog should have an invalid source.
+ // Only NetLogWithSources without a NetLog should have an invalid source.
DCHECK(entry.source().IsValid());
const char* source = NetLog::SourceTypeToString(entry.source().type);
diff --git a/net/tools/gdig/gdig.cc b/net/tools/gdig/gdig.cc
index 5af22a7..64e63582 100644
--- a/net/tools/gdig/gdig.cc
+++ b/net/tools/gdig/gdig.cc
@@ -471,7 +471,7 @@
++replay_log_index_;
int ret = resolver_->Resolve(
info, DEFAULT_PRIORITY, addrlist, callback, &request_,
- BoundNetLog::Make(log_.get(), net::NetLogSourceType::NONE));
+ NetLogWithSource::Make(log_.get(), net::NetLogSourceType::NONE));
if (ret != ERR_IO_PENDING)
callback.Run(ret);
}
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc
index 065bb995..f01b67d 100644
--- a/net/tools/quic/quic_client_bin.cc
+++ b/net/tools/quic/quic_client_bin.cc
@@ -113,7 +113,7 @@
net::CertVerifyResult* verify_result,
const net::CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const net::BoundNetLog& net_log) override {
+ const net::NetLogWithSource& net_log) override {
return net::OK;
}
diff --git a/net/tools/quic/quic_client_session.cc b/net/tools/quic/quic_client_session.cc
index f86eebc..d221bac 100644
--- a/net/tools/quic/quic_client_session.cc
+++ b/net/tools/quic/quic_client_session.cc
@@ -122,7 +122,7 @@
QuicCryptoClientStreamBase* QuicClientSession::CreateQuicCryptoStream() {
return new QuicCryptoClientStream(
- server_id_, this, new ProofVerifyContextChromium(0, BoundNetLog()),
+ server_id_, this, new ProofVerifyContextChromium(0, NetLogWithSource()),
crypto_config_, this);
}
diff --git a/net/tools/quic/quic_simple_client.cc b/net/tools/quic/quic_simple_client.cc
index 156d0716..a5bf6f3 100644
--- a/net/tools/quic/quic_simple_client.cc
+++ b/net/tools/quic/quic_simple_client.cc
@@ -148,7 +148,7 @@
packet_reader_.reset(new QuicChromiumPacketReader(
socket_.get(), &clock_, this, kQuicYieldAfterPacketsRead,
QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
- BoundNetLog()));
+ NetLogWithSource()));
if (socket != nullptr) {
socket->Close();
diff --git a/net/tools/quic/quic_simple_client_bin.cc b/net/tools/quic/quic_simple_client_bin.cc
index 33423db..cf6f52b1e 100644
--- a/net/tools/quic/quic_simple_client_bin.cc
+++ b/net/tools/quic/quic_simple_client_bin.cc
@@ -113,7 +113,7 @@
net::CertVerifyResult* verify_result,
const net::CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
- const net::BoundNetLog& net_log) override {
+ const net::NetLogWithSource& net_log) override {
return net::OK;
}
diff --git a/net/tools/quic/synchronous_host_resolver.cc b/net/tools/quic/synchronous_host_resolver.cc
index 5010679b..24c26221 100644
--- a/net/tools/quic/synchronous_host_resolver.cc
+++ b/net/tools/quic/synchronous_host_resolver.cc
@@ -68,7 +68,7 @@
DEFAULT_PRIORITY, addresses_,
base::Bind(&ResolverThread::OnResolutionComplete,
weak_factory_.GetWeakPtr()),
- &request, BoundNetLog());
+ &request, NetLogWithSource());
if (rv_ != ERR_IO_PENDING)
return;
diff --git a/net/udp/datagram_socket.h b/net/udp/datagram_socket.h
index 1993697..13858a0 100644
--- a/net/udp/datagram_socket.h
+++ b/net/udp/datagram_socket.h
@@ -9,7 +9,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class IPEndPoint;
// A datagram socket is an interface to a protocol which exchanges
@@ -46,7 +46,7 @@
virtual int SetDoNotFragment() = 0;
// Gets the NetLog for this socket.
- virtual const BoundNetLog& NetLog() const = 0;
+ virtual const NetLogWithSource& NetLog() const = 0;
};
} // namespace net
diff --git a/net/udp/fuzzed_datagram_client_socket.cc b/net/udp/fuzzed_datagram_client_socket.cc
index e1dbcc2c..0f9eaef 100644
--- a/net/udp/fuzzed_datagram_client_socket.cc
+++ b/net/udp/fuzzed_datagram_client_socket.cc
@@ -88,7 +88,7 @@
void FuzzedDatagramClientSocket::UseNonBlockingIO() {}
-const BoundNetLog& FuzzedDatagramClientSocket::NetLog() const {
+const NetLogWithSource& FuzzedDatagramClientSocket::NetLog() const {
return net_log_;
}
diff --git a/net/udp/fuzzed_datagram_client_socket.h b/net/udp/fuzzed_datagram_client_socket.h
index f42aa88..7a674af 100644
--- a/net/udp/fuzzed_datagram_client_socket.h
+++ b/net/udp/fuzzed_datagram_client_socket.h
@@ -44,7 +44,7 @@
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
void UseNonBlockingIO() override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
// Socket implementation:
int Read(IOBuffer* buf,
@@ -67,7 +67,7 @@
bool read_pending_ = false;
bool write_pending_ = false;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
IPEndPoint remote_address_;
diff --git a/net/udp/udp_client_socket.cc b/net/udp/udp_client_socket.cc
index 1856b28..5cb9551 100644
--- a/net/udp/udp_client_socket.cc
+++ b/net/udp/udp_client_socket.cc
@@ -113,7 +113,7 @@
return socket_.SetDoNotFragment();
}
-const BoundNetLog& UDPClientSocket::NetLog() const {
+const NetLogWithSource& UDPClientSocket::NetLog() const {
return socket_.NetLog();
}
diff --git a/net/udp/udp_client_socket.h b/net/udp/udp_client_socket.h
index ed00863..6381d33 100644
--- a/net/udp/udp_client_socket.h
+++ b/net/udp/udp_client_socket.h
@@ -15,7 +15,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
// A client socket that uses UDP as the transport layer.
class NET_EXPORT_PRIVATE UDPClientSocket : public DatagramClientSocket {
@@ -45,7 +45,7 @@
int SetReceiveBufferSize(int32_t size) override;
int SetSendBufferSize(int32_t size) override;
int SetDoNotFragment() override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
// Switch to use non-blocking IO. Must be called right after construction and
// before other calls.
diff --git a/net/udp/udp_server_socket.cc b/net/udp/udp_server_socket.cc
index 696432b4..3290cfe6 100644
--- a/net/udp/udp_server_socket.cc
+++ b/net/udp/udp_server_socket.cc
@@ -84,7 +84,7 @@
return socket_.GetLocalAddress(address);
}
-const BoundNetLog& UDPServerSocket::NetLog() const {
+const NetLogWithSource& UDPServerSocket::NetLog() const {
return socket_.NetLog();
}
diff --git a/net/udp/udp_server_socket.h b/net/udp/udp_server_socket.h
index 3f7032b..df9c85c 100644
--- a/net/udp/udp_server_socket.h
+++ b/net/udp/udp_server_socket.h
@@ -16,7 +16,7 @@
class IPAddress;
class IPEndPoint;
-class BoundNetLog;
+class NetLogWithSource;
// A client socket that uses UDP as the transport layer.
class NET_EXPORT UDPServerSocket : public DatagramServerSocket {
@@ -41,7 +41,7 @@
int GetPeerAddress(IPEndPoint* address) const override;
int GetLocalAddress(IPEndPoint* address) const override;
void UseNonBlockingIO() override;
- const BoundNetLog& NetLog() const override;
+ const NetLogWithSource& NetLog() const override;
void AllowAddressReuse() override;
void AllowBroadcast() override;
int JoinGroup(const IPAddress& group_address) const override;
diff --git a/net/udp/udp_socket_posix.cc b/net/udp/udp_socket_posix.cc
index 34763f4..296b540 100644
--- a/net/udp/udp_socket_posix.cc
+++ b/net/udp/udp_socket_posix.cc
@@ -90,7 +90,7 @@
read_buf_len_(0),
recv_from_address_(NULL),
write_buf_len_(0),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::UDP_SOCKET)),
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::UDP_SOCKET)),
bound_network_(NetworkChangeNotifier::kInvalidNetworkHandle) {
net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE,
source.ToEventParametersCallback());
diff --git a/net/udp/udp_socket_posix.h b/net/udp/udp_socket_posix.h
index b6f4f4b..0f29f4a 100644
--- a/net/udp/udp_socket_posix.h
+++ b/net/udp/udp_socket_posix.h
@@ -129,7 +129,7 @@
// Returns true if the socket is already connected or bound.
bool is_connected() const { return is_connected_; }
- const BoundNetLog& NetLog() const { return net_log_; }
+ const NetLogWithSource& NetLog() const { return net_log_; }
// Sets corresponding flags in |socket_options_| to allow the socket
// to share the local address to which the socket will be bound with
@@ -315,7 +315,7 @@
// External callback; called when write is complete.
CompletionCallback write_callback_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// Network that this socket is bound to via BindToNetwork().
NetworkChangeNotifier::NetworkHandle bound_network_;
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
index 5b4ae14..3a007747 100644
--- a/net/udp/udp_socket_win.cc
+++ b/net/udp/udp_socket_win.cc
@@ -257,7 +257,7 @@
read_iobuffer_len_(0),
write_iobuffer_len_(0),
recv_from_address_(NULL),
- net_log_(BoundNetLog::Make(net_log, NetLogSourceType::UDP_SOCKET)),
+ net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::UDP_SOCKET)),
qos_handle_(NULL),
qos_flow_id_(0) {
EnsureWinsockInit();
diff --git a/net/udp/udp_socket_win.h b/net/udp/udp_socket_win.h
index c4ef4129..59eee4d2 100644
--- a/net/udp/udp_socket_win.h
+++ b/net/udp/udp_socket_win.h
@@ -134,7 +134,7 @@
// Returns true if the socket is already connected or bound.
bool is_connected() const { return is_connected_; }
- const BoundNetLog& NetLog() const { return net_log_; }
+ const NetLogWithSource& NetLog() const { return net_log_; }
// Sets corresponding flags in |socket_options_| to allow the socket
// to share the local address to which the socket will be bound with
@@ -317,7 +317,7 @@
// External callback; called when write is complete.
CompletionCallback write_callback_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// QWAVE data. Used to set DSCP bits on outgoing packets.
HANDLE qos_handle_;
diff --git a/net/url_request/sdch_dictionary_fetcher.h b/net/url_request/sdch_dictionary_fetcher.h
index 96330e9..a21124d 100644
--- a/net/url_request/sdch_dictionary_fetcher.h
+++ b/net/url_request/sdch_dictionary_fetcher.h
@@ -24,7 +24,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class URLRequest;
class URLRequestThrottlerEntryInterface;
@@ -38,7 +38,7 @@
public:
typedef base::Callback<void(const std::string& dictionary_text,
const GURL& dictionary_url,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool was_from_cache)>
OnDictionaryFetchedCallback;
diff --git a/net/url_request/sdch_dictionary_fetcher_unittest.cc b/net/url_request/sdch_dictionary_fetcher_unittest.cc
index 02a9987..2b1f2d36 100644
--- a/net/url_request/sdch_dictionary_fetcher_unittest.cc
+++ b/net/url_request/sdch_dictionary_fetcher_unittest.cc
@@ -285,7 +285,7 @@
void OnDictionaryFetched(const std::string& dictionary_text,
const GURL& dictionary_url,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
bool was_from_cache) {
dictionary_additions_.push_back(
DictionaryAdditions(dictionary_text, dictionary_url));
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 1c55b40..fa003e4 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -565,8 +565,8 @@
: context_(context),
network_delegate_(network_delegate ? network_delegate
: context->network_delegate()),
- net_log_(
- BoundNetLog::Make(context->net_log(), NetLogSourceType::URL_REQUEST)),
+ net_log_(NetLogWithSource::Make(context->net_log(),
+ NetLogSourceType::URL_REQUEST)),
url_chain_(1, url),
method_("GET"),
referrer_policy_(CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE),
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 981c906..6e8c8a6b 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -605,7 +605,7 @@
// Used to specify the context (cookie store, cache) for this request.
const URLRequestContext* context() const;
- const BoundNetLog& net_log() const { return net_log_; }
+ const NetLogWithSource& net_log() const { return net_log_; }
// Returns the expected content size if available
int64_t GetExpectedContentSize() const;
@@ -751,7 +751,7 @@
NetworkDelegate* network_delegate_;
// Tracks the time spent in various load states throughout this request.
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
std::unique_ptr<URLRequestJob> job_;
std::unique_ptr<UploadDataStream> upload_data_stream_;
diff --git a/net/url_request/url_request_context_builder_unittest.cc b/net/url_request/url_request_context_builder_unittest.cc
index 18349618..cbccbfe5 100644
--- a/net/url_request/url_request_context_builder_unittest.cc
+++ b/net/url_request/url_request_context_builder_unittest.cc
@@ -41,7 +41,7 @@
const GURL& origin,
CreateReason reason,
int nonce_count,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override {
handler->reset();
@@ -109,7 +109,7 @@
EXPECT_EQ(OK,
context->http_auth_handler_factory()->CreateAuthHandlerFromString(
"basic", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
- BoundNetLog(), &handler));
+ NetLogWithSource(), &handler));
}
TEST_F(URLRequestContextBuilderTest, CustomHttpAuthHandlerFactory) {
@@ -125,19 +125,19 @@
EXPECT_EQ(kBasicReturnCode,
context->http_auth_handler_factory()->CreateAuthHandlerFromString(
"ExtraScheme", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
- BoundNetLog(), &handler));
+ NetLogWithSource(), &handler));
// Verify that the default basic handler isn't present
EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME,
context->http_auth_handler_factory()->CreateAuthHandlerFromString(
"basic", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
- BoundNetLog(), &handler));
+ NetLogWithSource(), &handler));
// Verify that a handler isn't returned for a bogus scheme.
EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME,
context->http_auth_handler_factory()->CreateAuthHandlerFromString(
"Bogus", HttpAuth::AUTH_SERVER, null_ssl_info, gurl,
- BoundNetLog(), &handler));
+ NetLogWithSource(), &handler));
}
} // namespace
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 590b571d..f842db2e 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -194,14 +194,14 @@
int GetResponseCode() const override;
const URLRequestContext* GetURLRequestContext() const override;
void RecordPacketStats(StatisticSelector statistic) const override;
- const BoundNetLog& GetNetLog() const override;
+ const NetLogWithSource& GetNetLog() const override;
private:
URLRequestHttpJob* job_;
// URLRequestHttpJob may be detached from URLRequest, but we still need to
// return something.
- BoundNetLog dummy_log_;
+ NetLogWithSource dummy_log_;
DISALLOW_COPY_AND_ASSIGN(HttpFilterContext);
};
@@ -257,7 +257,8 @@
job_->RecordPacketStats(statistic);
}
-const BoundNetLog& URLRequestHttpJob::HttpFilterContext::GetNetLog() const {
+const NetLogWithSource& URLRequestHttpJob::HttpFilterContext::GetNetLog()
+ const {
return job_->request() ? job_->request()->net_log() : dummy_log_;
}
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc
index 8bc38b3..4d93df71 100644
--- a/net/url_request/url_request_http_job_unittest.cc
+++ b/net/url_request/url_request_http_job_unittest.cc
@@ -850,7 +850,7 @@
// Fake implementation of HttpStreamBase methods.
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override {
initialize_stream_was_called_ = true;
return ERR_IO_PENDING;
diff --git a/net/url_request/url_request_throttler_entry.cc b/net/url_request/url_request_throttler_entry.cc
index ce7778d..a41758f 100644
--- a/net/url_request/url_request_throttler_entry.cc
+++ b/net/url_request/url_request_throttler_entry.cc
@@ -73,9 +73,9 @@
backoff_entry_(&backoff_policy_),
manager_(manager),
url_id_(url_id),
- net_log_(
- BoundNetLog::Make(manager->net_log(),
- NetLogSourceType::EXPONENTIAL_BACKOFF_THROTTLING)) {
+ net_log_(NetLogWithSource::Make(
+ manager->net_log(),
+ NetLogSourceType::EXPONENTIAL_BACKOFF_THROTTLING)) {
DCHECK(manager_);
Initialize();
}
diff --git a/net/url_request/url_request_throttler_entry.h b/net/url_request/url_request_throttler_entry.h
index bd64c26..17b54eae 100644
--- a/net/url_request/url_request_throttler_entry.h
+++ b/net/url_request/url_request_throttler_entry.h
@@ -154,7 +154,7 @@
// Canonicalized URL string that this entry is for; used for logging only.
std::string url_id_;
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerEntry);
};
diff --git a/net/url_request/url_request_throttler_manager.cc b/net/url_request/url_request_throttler_manager.cc
index 77a30b3..1238267 100644
--- a/net/url_request/url_request_throttler_manager.cc
+++ b/net/url_request/url_request_throttler_manager.cc
@@ -122,7 +122,7 @@
void URLRequestThrottlerManager::set_net_log(NetLog* net_log) {
DCHECK(net_log);
- net_log_ = BoundNetLog::Make(
+ net_log_ = NetLogWithSource::Make(
net_log, NetLogSourceType::EXPONENTIAL_BACKOFF_THROTTLING);
}
diff --git a/net/url_request/url_request_throttler_manager.h b/net/url_request/url_request_throttler_manager.h
index 855ef931..12fb9eec 100644
--- a/net/url_request/url_request_throttler_manager.h
+++ b/net/url_request/url_request_throttler_manager.h
@@ -20,7 +20,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class NetLog;
// Class that registers URL request throttler entries for URLs being accessed
@@ -141,7 +141,7 @@
bool logged_for_localhost_disabled_;
// NetLog to use, if configured.
- BoundNetLog net_log_;
+ NetLogWithSource net_log_;
// Valid once we've registered for network notifications.
base::PlatformThreadId registered_from_thread_;
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index fece053..b7b5db7 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -6356,7 +6356,7 @@
const std::string& stapled_ocsp_response,
const std::string& sct_list_from_tls_extension,
ct::CTVerifyResult* result,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return net::OK;
}
@@ -6375,7 +6375,7 @@
ct::CertPolicyCompliance DoesConformToCertPolicy(
X509Certificate* cert,
const SCTList& verified_scts,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return default_result_;
}
@@ -8977,7 +8977,7 @@
ct::CertPolicyCompliance DoesConformToCertPolicy(
X509Certificate* cert,
const SCTList& verified_scts,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS;
}
@@ -8985,7 +8985,7 @@
X509Certificate* cert,
const ct::EVCertsWhitelist* ev_whitelist,
const SCTList& verified_scts,
- const BoundNetLog& net_log) override {
+ const NetLogWithSource& net_log) override {
return ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS;
}
};
diff --git a/net/websockets/websocket_basic_handshake_stream.cc b/net/websockets/websocket_basic_handshake_stream.cc
index 424033ba..efe263a 100644
--- a/net/websockets/websocket_basic_handshake_stream.cc
+++ b/net/websockets/websocket_basic_handshake_stream.cc
@@ -312,7 +312,7 @@
int WebSocketBasicHandshakeStream::InitializeStream(
const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) {
url_ = request_info->url;
state_.Initialize(request_info, priority, net_log, callback);
diff --git a/net/websockets/websocket_basic_handshake_stream.h b/net/websockets/websocket_basic_handshake_stream.h
index 59e7d50..dffe472e 100644
--- a/net/websockets/websocket_basic_handshake_stream.h
+++ b/net/websockets/websocket_basic_handshake_stream.h
@@ -45,7 +45,7 @@
// HttpStreamBase methods
int InitializeStream(const HttpRequestInfo* request_info,
RequestPriority priority,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
const CompletionCallback& callback) override;
int SendRequest(const HttpRequestHeaders& request_headers,
HttpResponseInfo* response,
diff --git a/net/websockets/websocket_basic_stream_test.cc b/net/websockets/websocket_basic_stream_test.cc
index 54ed6de3..7061e4b 100644
--- a/net/websockets/websocket_basic_stream_test.cc
+++ b/net/websockets/websocket_basic_stream_test.cc
@@ -134,9 +134,9 @@
std::unique_ptr<ClientSocketHandle> transport_socket(
new ClientSocketHandle);
scoped_refptr<MockTransportSocketParams> params;
- transport_socket->Init(
- "a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, bound_net_log_.bound());
+ transport_socket->Init("a", params, MEDIUM,
+ ClientSocketPool::RespectLimits::ENABLED,
+ CompletionCallback(), &pool_, net_log_.bound());
return transport_socket;
}
@@ -169,7 +169,7 @@
std::unique_ptr<SocketDataProvider> socket_data_;
MockClientSocketFactory factory_;
MockTransportClientSocketPool pool_;
- BoundTestNetLog(bound_net_log_);
+ BoundTestNetLog(net_log_);
std::vector<std::unique_ptr<WebSocketFrame>> frames_;
TestCompletionCallback cb_;
scoped_refptr<GrowableIOBuffer> http_read_buffer_;
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index d932c6d..d9876e2 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -586,7 +586,7 @@
requested_subprotocols));
stream_request_ = callback.Run(socket_url_, std::move(create_helper), origin,
first_party_for_cookies, additional_headers,
- url_request_context_, BoundNetLog(),
+ url_request_context_, NetLogWithSource(),
std::move(connect_delegate));
SetState(CONNECTING);
}
diff --git a/net/websockets/websocket_channel.h b/net/websockets/websocket_channel.h
index 2f97f66..9ff1c69 100644
--- a/net/websockets/websocket_channel.h
+++ b/net/websockets/websocket_channel.h
@@ -31,7 +31,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class IOBuffer;
class URLRequestContext;
struct WebSocketHandshakeRequestInfo;
@@ -54,7 +54,7 @@
const GURL&,
const std::string&,
URLRequestContext*,
- const BoundNetLog&,
+ const NetLogWithSource&,
std::unique_ptr<WebSocketStream::ConnectDelegate>)>
WebSocketStreamRequestCreationCallback;
diff --git a/net/websockets/websocket_channel_test.cc b/net/websockets/websocket_channel_test.cc
index f411f58..32dae8a 100644
--- a/net/websockets/websocket_channel_test.cc
+++ b/net/websockets/websocket_channel_test.cc
@@ -711,7 +711,7 @@
const GURL& first_party_for_cookies,
const std::string& additional_headers,
URLRequestContext* url_request_context,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate) {
this->socket_url = socket_url;
this->create_helper = std::move(create_helper);
@@ -728,7 +728,7 @@
url::Origin origin;
GURL first_party_for_cookies;
URLRequestContext* url_request_context;
- BoundNetLog net_log;
+ NetLogWithSource net_log;
std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate;
};
diff --git a/net/websockets/websocket_handshake_stream_create_helper_test.cc b/net/websockets/websocket_handshake_stream_create_helper_test.cc
index f19fddc..0155025 100644
--- a/net/websockets/websocket_handshake_stream_create_helper_test.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper_test.cc
@@ -49,7 +49,7 @@
std::unique_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle);
socket_handle->Init("a", scoped_refptr<MockTransportSocketParams>(), MEDIUM,
ClientSocketPool::RespectLimits::ENABLED,
- CompletionCallback(), &pool_, BoundNetLog());
+ CompletionCallback(), &pool_, NetLogWithSource());
return socket_handle;
}
@@ -119,8 +119,9 @@
request_info.url = GURL("ws://localhost/");
request_info.method = "GET";
request_info.load_flags = LOAD_DISABLE_CACHE;
- int rv = handshake->InitializeStream(
- &request_info, DEFAULT_PRIORITY, BoundNetLog(), CompletionCallback());
+ int rv =
+ handshake->InitializeStream(&request_info, DEFAULT_PRIORITY,
+ NetLogWithSource(), CompletionCallback());
EXPECT_THAT(rv, IsOk());
HttpRequestHeaders headers;
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc
index 3fa3c8e..ef62c24 100644
--- a/net/websockets/websocket_stream.cc
+++ b/net/websockets/websocket_stream.cc
@@ -364,7 +364,7 @@
const GURL& first_party_for_cookies,
const std::string& additional_headers,
URLRequestContext* url_request_context,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<ConnectDelegate> connect_delegate) {
std::unique_ptr<WebSocketStreamRequestImpl> request(
new WebSocketStreamRequestImpl(
@@ -383,7 +383,7 @@
const GURL& first_party_for_cookies,
const std::string& additional_headers,
URLRequestContext* url_request_context,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
std::unique_ptr<base::Timer> timer) {
std::unique_ptr<WebSocketStreamRequestImpl> request(
diff --git a/net/websockets/websocket_stream.h b/net/websockets/websocket_stream.h
index 86f15eb..389e092 100644
--- a/net/websockets/websocket_stream.h
+++ b/net/websockets/websocket_stream.h
@@ -31,7 +31,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class URLRequestContext;
struct WebSocketFrame;
class WebSocketHandshakeStreamBase;
@@ -116,7 +116,7 @@
const GURL& first_party_for_cookies,
const std::string& additional_headers,
URLRequestContext* url_request_context,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<ConnectDelegate> connect_delegate);
// Alternate version of CreateAndConnectStream() for testing use only. It
@@ -129,7 +129,7 @@
const GURL& first_party_for_cookies,
const std::string& additional_headers,
URLRequestContext* url_request_context,
- const BoundNetLog& net_log,
+ const NetLogWithSource& net_log,
std::unique_ptr<ConnectDelegate> connect_delegate,
std::unique_ptr<base::Timer> timer);
diff --git a/net/websockets/websocket_stream_create_test_base.cc b/net/websockets/websocket_stream_create_test_base.cc
index 032d3d5..3af9688 100644
--- a/net/websockets/websocket_stream_create_test_base.cc
+++ b/net/websockets/websocket_stream_create_test_base.cc
@@ -117,7 +117,7 @@
stream_request_ = WebSocketStream::CreateAndConnectStreamForTesting(
socket_url, std::move(create_helper), origin, first_party_for_cookies,
additional_headers, url_request_context_host_.GetURLRequestContext(),
- BoundNetLog(), std::move(connect_delegate),
+ NetLogWithSource(), std::move(connect_delegate),
timer ? std::move(timer)
: std::unique_ptr<base::Timer>(new base::Timer(false, false)));
}
diff --git a/net/websockets/websocket_test_util.h b/net/websockets/websocket_test_util.h
index 6944cba..434da5d 100644
--- a/net/websockets/websocket_test_util.h
+++ b/net/websockets/websocket_test_util.h
@@ -26,7 +26,7 @@
namespace net {
-class BoundNetLog;
+class NetLogWithSource;
class MockClientSocketFactory;
class ProxyService;
class SequencedSocketData;