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

Side by Side Diff: net/quic/quic_client_session.cc

Issue 1135373002: Updated NetLog::ParametersCallback & all related calbacks returning value as scoped_ptr<base::Value… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 STATE_HANDSHAKE_CONFIRMED = 2, 89 STATE_HANDSHAKE_CONFIRMED = 2,
90 STATE_FAILED = 3, 90 STATE_FAILED = 3,
91 NUM_HANDSHAKE_STATES = 4 91 NUM_HANDSHAKE_STATES = 4
92 }; 92 };
93 93
94 void RecordHandshakeState(HandshakeState state) { 94 void RecordHandshakeState(HandshakeState state) {
95 UMA_HISTOGRAM_ENUMERATION("Net.QuicHandshakeState", state, 95 UMA_HISTOGRAM_ENUMERATION("Net.QuicHandshakeState", state,
96 NUM_HANDSHAKE_STATES); 96 NUM_HANDSHAKE_STATES);
97 } 97 }
98 98
99 base::Value* NetLogQuicClientSessionCallback( 99 scoped_ptr<base::Value> NetLogQuicClientSessionCallback(
100 const QuicServerId* server_id, 100 const QuicServerId* server_id,
101 bool require_confirmation, 101 bool require_confirmation,
102 NetLogCaptureMode /* capture_mode */) { 102 NetLogCaptureMode /* capture_mode */) {
103 base::DictionaryValue* dict = new base::DictionaryValue(); 103 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
104 dict->SetString("host", server_id->host()); 104 dict->SetString("host", server_id->host());
105 dict->SetInteger("port", server_id->port()); 105 dict->SetInteger("port", server_id->port());
106 dict->SetBoolean("is_https", server_id->is_https()); 106 dict->SetBoolean("is_https", server_id->is_https());
107 dict->SetBoolean("privacy_mode", 107 dict->SetBoolean("privacy_mode",
108 server_id->privacy_mode() == PRIVACY_MODE_ENABLED); 108 server_id->privacy_mode() == PRIVACY_MODE_ENABLED);
109 dict->SetBoolean("require_confirmation", require_confirmation); 109 dict->SetBoolean("require_confirmation", require_confirmation);
110 return dict; 110 return dict.Pass();
111 } 111 }
112 112
113 } // namespace 113 } // namespace
114 114
115 QuicClientSession::StreamRequest::StreamRequest() : stream_(nullptr) {} 115 QuicClientSession::StreamRequest::StreamRequest() : stream_(nullptr) {}
116 116
117 QuicClientSession::StreamRequest::~StreamRequest() { 117 QuicClientSession::StreamRequest::~StreamRequest() {
118 CancelRequest(); 118 CancelRequest();
119 } 119 }
120 120
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 return; 933 return;
934 934
935 // TODO(rch): re-enable this code once beta is cut. 935 // TODO(rch): re-enable this code once beta is cut.
936 // if (stream_factory_) 936 // if (stream_factory_)
937 // stream_factory_->OnSessionConnectTimeout(this); 937 // stream_factory_->OnSessionConnectTimeout(this);
938 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); 938 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED);
939 // DCHECK_EQ(0u, GetNumOpenStreams()); 939 // DCHECK_EQ(0u, GetNumOpenStreams());
940 } 940 }
941 941
942 } // namespace net 942 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698