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

Side by Side Diff: net/http/http_proxy_client_socket_pool.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 years, 6 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 | « media/cdm/json_web_key.cc ('k') | net/reporting/reporting_delivery_agent.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/http/http_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/ptr_util.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "base/values.h" 13 #include "base/values.h"
13 #include "net/base/load_flags.h" 14 #include "net/base/load_flags.h"
14 #include "net/base/net_errors.h" 15 #include "net/base/net_errors.h"
15 #include "net/base/proxy_delegate.h" 16 #include "net/base/proxy_delegate.h"
16 #include "net/http/http_network_session.h" 17 #include "net/http/http_network_session.h"
17 #include "net/http/http_proxy_client_socket_wrapper.h" 18 #include "net/http/http_proxy_client_socket_wrapper.h"
18 #include "net/log/net_log_source_type.h" 19 #include "net/log/net_log_source_type.h"
19 #include "net/log/net_log_with_source.h" 20 #include "net/log/net_log_with_source.h"
20 #include "net/socket/client_socket_factory.h" 21 #include "net/socket/client_socket_factory.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 const std::string& group_name, const ClientSocketHandle* handle) const { 285 const std::string& group_name, const ClientSocketHandle* handle) const {
285 return base_.GetLoadState(group_name, handle); 286 return base_.GetLoadState(group_name, handle);
286 } 287 }
287 288
288 std::unique_ptr<base::DictionaryValue> 289 std::unique_ptr<base::DictionaryValue>
289 HttpProxyClientSocketPool::GetInfoAsValue(const std::string& name, 290 HttpProxyClientSocketPool::GetInfoAsValue(const std::string& name,
290 const std::string& type, 291 const std::string& type,
291 bool include_nested_pools) const { 292 bool include_nested_pools) const {
292 std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type)); 293 std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
293 if (include_nested_pools) { 294 if (include_nested_pools) {
294 base::ListValue* list = new base::ListValue(); 295 auto list = base::MakeUnique<base::ListValue>();
295 if (transport_pool_) { 296 if (transport_pool_) {
296 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", 297 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
297 "transport_socket_pool", 298 "transport_socket_pool",
298 true)); 299 true));
299 } 300 }
300 if (ssl_pool_) { 301 if (ssl_pool_) {
301 list->Append(ssl_pool_->GetInfoAsValue("ssl_socket_pool", 302 list->Append(ssl_pool_->GetInfoAsValue("ssl_socket_pool",
302 "ssl_socket_pool", 303 "ssl_socket_pool",
303 true)); 304 true));
304 } 305 }
305 dict->Set("nested_pools", list); 306 dict->Set("nested_pools", std::move(list));
306 } 307 }
307 return dict; 308 return dict;
308 } 309 }
309 310
310 base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const { 311 base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const {
311 return base_.ConnectionTimeout(); 312 return base_.ConnectionTimeout();
312 } 313 }
313 314
314 bool HttpProxyClientSocketPool::IsStalled() const { 315 bool HttpProxyClientSocketPool::IsStalled() const {
315 return base_.IsStalled(); 316 return base_.IsStalled();
316 } 317 }
317 318
318 void HttpProxyClientSocketPool::AddHigherLayeredPool( 319 void HttpProxyClientSocketPool::AddHigherLayeredPool(
319 HigherLayeredPool* higher_pool) { 320 HigherLayeredPool* higher_pool) {
320 base_.AddHigherLayeredPool(higher_pool); 321 base_.AddHigherLayeredPool(higher_pool);
321 } 322 }
322 323
323 void HttpProxyClientSocketPool::RemoveHigherLayeredPool( 324 void HttpProxyClientSocketPool::RemoveHigherLayeredPool(
324 HigherLayeredPool* higher_pool) { 325 HigherLayeredPool* higher_pool) {
325 base_.RemoveHigherLayeredPool(higher_pool); 326 base_.RemoveHigherLayeredPool(higher_pool);
326 } 327 }
327 328
328 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { 329 bool HttpProxyClientSocketPool::CloseOneIdleConnection() {
329 if (base_.CloseOneIdleSocket()) 330 if (base_.CloseOneIdleSocket())
330 return true; 331 return true;
331 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 332 return base_.CloseOneIdleConnectionInHigherLayeredPool();
332 } 333 }
333 334
334 } // namespace net 335 } // namespace net
OLDNEW
« no previous file with comments | « media/cdm/json_web_key.cc ('k') | net/reporting/reporting_delivery_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698