diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-13 22:50:27 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-13 22:50:27 +0000 |
commit | ea5ef4c89bd17065f32e1f294d8b922a0735fd25 (patch) | |
tree | 530a4633c162b39a7149714d83b34a24ef1220e2 /net/http | |
parent | abf7641841f0ade77b8339e3f1368c9f3ff711bd (diff) | |
download | chromium_src-ea5ef4c89bd17065f32e1f294d8b922a0735fd25.zip chromium_src-ea5ef4c89bd17065f32e1f294d8b922a0735fd25.tar.gz chromium_src-ea5ef4c89bd17065f32e1f294d8b922a0735fd25.tar.bz2 |
Make net and ipc explicitly use the base namespace for Values.
They're currently relying on a using in values.h that we want to remove. I removed several usings in net for consistency.
BUG=
R=willchan@chromium.org
Review URL: https://codereview.chromium.org/15662008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_session.cc | 6 | ||||
-rw-r--r-- | net/http/http_network_transaction.cc | 13 | ||||
-rw-r--r-- | net/http/http_network_transaction_spdy2_unittest.cc | 4 | ||||
-rw-r--r-- | net/http/http_network_transaction_spdy3_unittest.cc | 4 | ||||
-rw-r--r-- | net/http/http_pipelined_connection_impl.cc | 25 | ||||
-rw-r--r-- | net/http/http_pipelined_host_forced.cc | 10 | ||||
-rw-r--r-- | net/http/http_pipelined_host_impl.cc | 10 | ||||
-rw-r--r-- | net/http/http_pipelined_host_pool.cc | 9 | ||||
-rw-r--r-- | net/http/http_proxy_client_socket_pool.cc | 6 | ||||
-rw-r--r-- | net/http/http_request_headers.cc | 12 | ||||
-rw-r--r-- | net/http/http_response_headers.cc | 14 | ||||
-rw-r--r-- | net/http/http_server_properties_impl.cc | 2 | ||||
-rw-r--r-- | net/http/http_stream_factory_impl_job.cc | 14 | ||||
-rw-r--r-- | net/http/http_stream_parser.cc | 11 |
14 files changed, 64 insertions, 76 deletions
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc index 0ea7d94..4762c71 100644 --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc @@ -179,16 +179,16 @@ SSLClientSocketPool* HttpNetworkSession::GetSocketPoolForSSLWithProxy( proxy_server); } -Value* HttpNetworkSession::SocketPoolInfoToValue() const { +base::Value* HttpNetworkSession::SocketPoolInfoToValue() const { // TODO(yutak): Should merge values from normal pools and WebSocket pools. return normal_socket_pool_manager_->SocketPoolInfoToValue(); } -Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { +base::Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { return spdy_session_pool_.SpdySessionPoolInfoToValue(); } -Value* HttpNetworkSession::QuicInfoToValue() const { +base::Value* HttpNetworkSession::QuicInfoToValue() const { base::DictionaryValue* dict = new base::DictionaryValue(); dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); dict->SetBoolean("quic_enabled", params_.enable_quic); diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index efdd310..1cccbe5 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -96,12 +96,13 @@ bool IsClientCertificateError(int error) { } } -Value* NetLogSSLVersionFallbackCallback(const GURL* url, - int net_error, - uint16 version_before, - uint16 version_after, - NetLog::LogLevel /* log_level */) { - DictionaryValue* dict = new DictionaryValue(); +base::Value* NetLogSSLVersionFallbackCallback( + const GURL* url, + int net_error, + uint16 version_before, + uint16 version_after, + NetLog::LogLevel /* log_level */) { + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString("host_and_port", GetHostAndPort(*url)); dict->SetInteger("net_error", net_error); dict->SetInteger("version_before", version_before); diff --git a/net/http/http_network_transaction_spdy2_unittest.cc b/net/http/http_network_transaction_spdy2_unittest.cc index e2976f1..ffe23b2 100644 --- a/net/http/http_network_transaction_spdy2_unittest.cc +++ b/net/http/http_network_transaction_spdy2_unittest.cc @@ -122,10 +122,10 @@ int GetIdleSocketCountInSSLSocketPool(net::HttpNetworkSession* session) { // Takes in a Value created from a NetLogHttpResponseParameter, and returns // a JSONified list of headers as a single string. Uses single quotes instead // of double quotes for easier comparison. Returns false on failure. -bool GetHeaders(DictionaryValue* params, std::string* headers) { +bool GetHeaders(base::DictionaryValue* params, std::string* headers) { if (!params) return false; - ListValue* header_list; + base::ListValue* header_list; if (!params->GetList("headers", &header_list)) return false; std::string double_quote_headers; diff --git a/net/http/http_network_transaction_spdy3_unittest.cc b/net/http/http_network_transaction_spdy3_unittest.cc index c4055c9..c33de98 100644 --- a/net/http/http_network_transaction_spdy3_unittest.cc +++ b/net/http/http_network_transaction_spdy3_unittest.cc @@ -133,10 +133,10 @@ HttpNetworkSession* CreateSession(SpdySessionDependencies* session_deps) { // Takes in a Value created from a NetLogHttpResponseParameter, and returns // a JSONified list of headers as a single string. Uses single quotes instead // of double quotes for easier comparison. Returns false on failure. -bool GetHeaders(DictionaryValue* params, std::string* headers) { +bool GetHeaders(base::DictionaryValue* params, std::string* headers) { if (!params) return false; - ListValue* header_list; + base::ListValue* header_list; if (!params->GetList("headers", &header_list)) return false; std::string double_quote_headers; diff --git a/net/http/http_pipelined_connection_impl.cc b/net/http/http_pipelined_connection_impl.cc index 471b26adef..b72f8e8 100644 --- a/net/http/http_pipelined_connection_impl.cc +++ b/net/http/http_pipelined_connection_impl.cc @@ -18,34 +18,31 @@ #include "net/http/http_version.h" #include "net/socket/client_socket_handle.h" -using base::DictionaryValue; -using base::Value; - namespace net { namespace { -Value* NetLogReceivedHeadersCallback(const NetLog::Source& source, - const std::string* feedback, - NetLog::LogLevel /* log_level */) { - DictionaryValue* dict = new DictionaryValue; +base::Value* NetLogReceivedHeadersCallback(const NetLog::Source& source, + const std::string* feedback, + NetLog::LogLevel /* log_level */) { + base::DictionaryValue* dict = new base::DictionaryValue; source.AddToEventParameters(dict); dict->SetString("feedback", *feedback); return dict; } -Value* NetLogStreamClosedCallback(const NetLog::Source& source, - bool not_reusable, - NetLog::LogLevel /* log_level */) { - DictionaryValue* dict = new DictionaryValue; +base::Value* NetLogStreamClosedCallback(const NetLog::Source& source, + bool not_reusable, + NetLog::LogLevel /* log_level */) { + base::DictionaryValue* dict = new base::DictionaryValue; source.AddToEventParameters(dict); dict->SetBoolean("not_reusable", not_reusable); return dict; } -Value* NetLogHostPortPairCallback(const HostPortPair* host_port_pair, - NetLog::LogLevel /* log_level */) { - DictionaryValue* dict = new DictionaryValue; +base::Value* NetLogHostPortPairCallback(const HostPortPair* host_port_pair, + NetLog::LogLevel /* log_level */) { + base::DictionaryValue* dict = new base::DictionaryValue; dict->SetString("host_and_port", host_port_pair->ToString()); return dict; } diff --git a/net/http/http_pipelined_host_forced.cc b/net/http/http_pipelined_host_forced.cc index 000936c..8179e86 100644 --- a/net/http/http_pipelined_host_forced.cc +++ b/net/http/http_pipelined_host_forced.cc @@ -10,10 +10,6 @@ #include "net/socket/buffered_write_stream_socket.h" #include "net/socket/client_socket_handle.h" -using base::DictionaryValue; -using base::ListValue; -using base::Value; - namespace net { HttpPipelinedHostForced::HttpPipelinedHostForced( @@ -89,10 +85,10 @@ void HttpPipelinedHostForced::OnPipelineFeedback( // We don't care. We always pipeline. } -Value* HttpPipelinedHostForced::PipelineInfoToValue() const { - ListValue* list_value = new ListValue(); +base::Value* HttpPipelinedHostForced::PipelineInfoToValue() const { + base::ListValue* list_value = new base::ListValue(); if (pipeline_.get()) { - DictionaryValue* pipeline_dict = new DictionaryValue; + base::DictionaryValue* pipeline_dict = new base::DictionaryValue; pipeline_dict->SetString("host", key_.origin().ToString()); pipeline_dict->SetBoolean("forced", true); pipeline_dict->SetInteger("depth", pipeline_->depth()); diff --git a/net/http/http_pipelined_host_impl.cc b/net/http/http_pipelined_host_impl.cc index 2c8238a..2a41ca4 100644 --- a/net/http/http_pipelined_host_impl.cc +++ b/net/http/http_pipelined_host_impl.cc @@ -9,10 +9,6 @@ #include "net/http/http_pipelined_connection_impl.h" #include "net/http/http_pipelined_stream.h" -using base::DictionaryValue; -using base::ListValue; -using base::Value; - namespace net { // TODO(simonjam): Run experiments to see what value minimizes evictions without @@ -190,11 +186,11 @@ void HttpPipelinedHostImpl::NotifyAllPipelinesHaveCapacity() { } } -Value* HttpPipelinedHostImpl::PipelineInfoToValue() const { - ListValue* list_value = new ListValue(); +base::Value* HttpPipelinedHostImpl::PipelineInfoToValue() const { + base::ListValue* list_value = new base::ListValue(); for (PipelineInfoMap::const_iterator it = pipelines_.begin(); it != pipelines_.end(); ++it) { - DictionaryValue* pipeline_dict = new DictionaryValue; + base::DictionaryValue* pipeline_dict = new base::DictionaryValue; pipeline_dict->SetString("host", key_.origin().ToString()); pipeline_dict->SetBoolean("forced", false); pipeline_dict->SetInteger("depth", it->first->depth()); diff --git a/net/http/http_pipelined_host_pool.cc b/net/http/http_pipelined_host_pool.cc index 7b00e7e..b8fec2a 100644 --- a/net/http/http_pipelined_host_pool.cc +++ b/net/http/http_pipelined_host_pool.cc @@ -12,9 +12,6 @@ #include "net/http/http_pipelined_host_impl.h" #include "net/http/http_server_properties.h" -using base::ListValue; -using base::Value; - namespace net { class HttpPipelinedHostImplFactory : public HttpPipelinedHost::Factory { @@ -135,11 +132,11 @@ void HttpPipelinedHostPool::OnHostDeterminedCapability( capability); } -Value* HttpPipelinedHostPool::PipelineInfoToValue() const { - ListValue* list = new ListValue(); +base::Value* HttpPipelinedHostPool::PipelineInfoToValue() const { + base::ListValue* list = new base::ListValue(); for (HostMap::const_iterator it = host_map_.begin(); it != host_map_.end(); ++it) { - Value* value = it->second->PipelineInfoToValue(); + base::Value* value = it->second->PipelineInfoToValue(); list->Append(value); } return list; diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc index 4b4fabc..448c8fd 100644 --- a/net/http/http_proxy_client_socket_pool.cc +++ b/net/http/http_proxy_client_socket_pool.cc @@ -502,13 +502,13 @@ void HttpProxyClientSocketPool::RemoveLayeredPool(LayeredPool* layered_pool) { base_.RemoveLayeredPool(layered_pool); } -DictionaryValue* HttpProxyClientSocketPool::GetInfoAsValue( +base::DictionaryValue* HttpProxyClientSocketPool::GetInfoAsValue( const std::string& name, const std::string& type, bool include_nested_pools) const { - DictionaryValue* dict = base_.GetInfoAsValue(name, type); + base::DictionaryValue* dict = base_.GetInfoAsValue(name, type); if (include_nested_pools) { - ListValue* list = new ListValue(); + base::ListValue* list = new base::ListValue(); if (transport_pool_) { list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", "transport_socket_pool", diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc index 15eee0c..bf557df 100644 --- a/net/http/http_request_headers.cc +++ b/net/http/http_request_headers.cc @@ -183,18 +183,18 @@ std::string HttpRequestHeaders::ToString() const { return output; } -Value* HttpRequestHeaders::NetLogCallback( +base::Value* HttpRequestHeaders::NetLogCallback( const std::string* request_line, NetLog::LogLevel /* log_level */) const { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString("line", *request_line); - ListValue* headers = new ListValue(); + base::ListValue* headers = new base::ListValue(); for (HeaderVector::const_iterator it = headers_.begin(); it != headers_.end(); ++it) { headers->Append( - new StringValue(base::StringPrintf("%s: %s", - it->key.c_str(), - it->value.c_str()))); + new base::StringValue(base::StringPrintf("%s: %s", + it->key.c_str(), + it->value.c_str()))); } dict->Set("headers", headers); return dict; diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc index 279149f..bffa004 100644 --- a/net/http/http_response_headers.cc +++ b/net/http/http_response_headers.cc @@ -1299,19 +1299,19 @@ bool HttpResponseHeaders::GetContentRange(int64* first_byte_position, return true; } -Value* HttpResponseHeaders::NetLogCallback( +base::Value* HttpResponseHeaders::NetLogCallback( NetLog::LogLevel /* log_level */) const { - DictionaryValue* dict = new DictionaryValue(); - ListValue* headers = new ListValue(); - headers->Append(new StringValue(GetStatusLine())); + base::DictionaryValue* dict = new base::DictionaryValue(); + base::ListValue* headers = new base::ListValue(); + headers->Append(new base::StringValue(GetStatusLine())); void* iterator = NULL; std::string name; std::string value; while (EnumerateHeaderLines(&iterator, &name, &value)) { headers->Append( - new StringValue(base::StringPrintf("%s: %s", - name.c_str(), - value.c_str()))); + new base::StringValue(base::StringPrintf("%s: %s", + name.c_str(), + value.c_str()))); } dict->Set("headers", headers); return dict; diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc index 12f9847..f56dea8 100644 --- a/net/http/http_server_properties_impl.cc +++ b/net/http/http_server_properties_impl.cc @@ -81,7 +81,7 @@ void HttpServerPropertiesImpl::GetSpdyServerList( it != spdy_servers_table_.end(); ++it) { const std::string spdy_server_host_port = it->first; if (it->second) - spdy_server_list->Append(new StringValue(spdy_server_host_port)); + spdy_server_list->Append(new base::StringValue(spdy_server_host_port)); } } diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc index 6bfef1e..179d8c4 100644 --- a/net/http/http_stream_factory_impl_job.cc +++ b/net/http/http_stream_factory_impl_job.cc @@ -42,11 +42,11 @@ namespace net { // Returns parameters associated with the start of a HTTP stream job. -Value* NetLogHttpStreamJobCallback(const GURL* original_url, - const GURL* url, - RequestPriority priority, - NetLog::LogLevel /* log_level */) { - DictionaryValue* dict = new DictionaryValue(); +base::Value* NetLogHttpStreamJobCallback(const GURL* original_url, + const GURL* url, + RequestPriority priority, + NetLog::LogLevel /* log_level */) { + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString("original_url", original_url->GetOrigin().spec()); dict->SetString("url", url->GetOrigin().spec()); dict->SetInteger("priority", priority); @@ -55,12 +55,12 @@ Value* NetLogHttpStreamJobCallback(const GURL* original_url, // Returns parameters associated with the Proto (with NPN negotiation) of a HTTP // stream. -Value* NetLogHttpStreamProtoCallback( +base::Value* NetLogHttpStreamProtoCallback( const SSLClientSocket::NextProtoStatus status, const std::string* proto, const std::string* server_protos, NetLog::LogLevel /* log_level */) { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString("next_proto_status", SSLClientSocket::NextProtoStatusToString(status)); diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc index 4bec46f..e53aafd 100644 --- a/net/http/http_stream_parser.cc +++ b/net/http/http_stream_parser.cc @@ -56,11 +56,12 @@ bool HeadersContainMultipleCopiesOfField( return false; } -Value* NetLogSendRequestBodyCallback(int length, - bool is_chunked, - bool did_merge, - net::NetLog::LogLevel /* log_level */) { - DictionaryValue* dict = new DictionaryValue(); +base::Value* NetLogSendRequestBodyCallback( + int length, + bool is_chunked, + bool did_merge, + net::NetLog::LogLevel /* log_level */) { + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger("length", length); dict->SetBoolean("is_chunked", is_chunked); dict->SetBoolean("did_merge", did_merge); |