Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: net/quic/chromium/quic_stream_factory.cc

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: REBASE Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/chromium/quic_stream_factory.cc
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index a949274c79408c798250c19a6e57dc3fd2f29d84..8eba8fe2143521efdcb0a35ef85e4c07150537b5 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -113,9 +113,9 @@ std::unique_ptr<base::Value> NetLogQuicConnectionMigrationSuccessCallback(
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 @@ class ScopedConnectionMigrationEventLog {
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 @@ void HistogramCreateSessionFailure(enum CreateSessionFailure error) {
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 @@ class QuicStreamFactory::CertVerifierJob {
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 @@ class QuicStreamFactory::CertVerifierJob {
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 @@ class QuicStreamFactory::Job {
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 @@ class QuicStreamFactory::Job {
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 @@ QuicStreamFactory::Job::Job(QuicStreamFactory* factory,
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 QuicStreamRequest::Request(const HostPortPair& destination,
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 QuicStreamFactory::Create(const QuicServerId& server_id,
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 @@ bool QuicStreamFactory::QuicSessionKey::operator==(
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 @@ NetworkHandle QuicStreamFactory::FindAlternateNetwork(
void QuicStreamFactory::MaybeMigrateOrCloseSessions(
NetworkHandle new_network,
bool close_if_cannot_migrate,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& bound_net_log) {
QuicStreamFactory::SessionIdMap::iterator it = all_sessions_.begin();
while (it != all_sessions_.end()) {
QuicChromiumClientSession* session = it->first;
@@ -1425,7 +1425,7 @@ MigrationResult QuicStreamFactory::MaybeMigrateSingleSession(
void QuicStreamFactory::MigrateSessionToNewPeerAddress(
QuicChromiumClientSession* session,
IPEndPoint peer_address,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& bound_net_log) {
if (!allow_server_migration_)
return;
@@ -1444,7 +1444,7 @@ MigrationResult QuicStreamFactory::MigrateSessionToNewNetwork(
QuicChromiumClientSession* session,
NetworkHandle network,
bool close_session_on_error,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& bound_net_log) {
return MigrateSessionInner(session, session->connection()->peer_address(),
network, close_session_on_error, bound_net_log);
}
@@ -1454,7 +1454,7 @@ MigrationResult QuicStreamFactory::MigrateSessionInner(
IPEndPoint peer_address,
NetworkHandle network,
bool close_session_on_error,
- const BoundNetLog& bound_net_log) {
+ const NetLogWithSource& bound_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.
@@ -1601,7 +1601,7 @@ int QuicStreamFactory::CreateSession(
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 +1763,7 @@ bool QuicStreamFactory::CryptoConfigCacheIsEmpty(
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 =

Powered by Google App Engine
This is Rietveld 408576698