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

Side by Side Diff: net/socket/client_socket_pool_base.cc

Issue 2037933002: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « net/quic/quic_connection_logger.cc ('k') | net/spdy/spdy_session.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/socket/client_socket_pool_base.h" 5 #include "net/socket/client_socket_pool_base.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"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 } 616 }
617 617
618 group_dict->SetInteger("active_socket_count", group->active_socket_count()); 618 group_dict->SetInteger("active_socket_count", group->active_socket_count());
619 619
620 base::ListValue* idle_socket_list = new base::ListValue(); 620 base::ListValue* idle_socket_list = new base::ListValue();
621 std::list<IdleSocket>::const_iterator idle_socket; 621 std::list<IdleSocket>::const_iterator idle_socket;
622 for (idle_socket = group->idle_sockets().begin(); 622 for (idle_socket = group->idle_sockets().begin();
623 idle_socket != group->idle_sockets().end(); 623 idle_socket != group->idle_sockets().end();
624 idle_socket++) { 624 idle_socket++) {
625 int source_id = idle_socket->socket->NetLog().source().id; 625 int source_id = idle_socket->socket->NetLog().source().id;
626 idle_socket_list->Append(new base::FundamentalValue(source_id)); 626 idle_socket_list->AppendInteger(source_id);
627 } 627 }
628 group_dict->Set("idle_sockets", idle_socket_list); 628 group_dict->Set("idle_sockets", idle_socket_list);
629 629
630 base::ListValue* connect_jobs_list = new base::ListValue(); 630 base::ListValue* connect_jobs_list = new base::ListValue();
631 std::list<ConnectJob*>::const_iterator job = group->jobs().begin(); 631 std::list<ConnectJob*>::const_iterator job = group->jobs().begin();
632 for (job = group->jobs().begin(); job != group->jobs().end(); job++) { 632 for (job = group->jobs().begin(); job != group->jobs().end(); job++) {
633 int source_id = (*job)->net_log().source().id; 633 int source_id = (*job)->net_log().source().id;
634 connect_jobs_list->Append(new base::FundamentalValue(source_id)); 634 connect_jobs_list->AppendInteger(source_id);
635 } 635 }
636 group_dict->Set("connect_jobs", connect_jobs_list); 636 group_dict->Set("connect_jobs", connect_jobs_list);
637 637
638 group_dict->SetBoolean("is_stalled", group->CanUseAdditionalSocketSlot( 638 group_dict->SetBoolean("is_stalled", group->CanUseAdditionalSocketSlot(
639 max_sockets_per_group_)); 639 max_sockets_per_group_));
640 group_dict->SetBoolean("backup_job_timer_is_running", 640 group_dict->SetBoolean("backup_job_timer_is_running",
641 group->BackupJobTimerIsRunning()); 641 group->BackupJobTimerIsRunning());
642 642
643 all_groups_dict->SetWithoutPathExpansion(it->first, group_dict); 643 all_groups_dict->SetWithoutPathExpansion(it->first, group_dict);
644 } 644 }
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 // If there are no more requests, kill the backup timer. 1309 // If there are no more requests, kill the backup timer.
1310 if (pending_requests_.empty()) 1310 if (pending_requests_.empty())
1311 backup_job_timer_.Stop(); 1311 backup_job_timer_.Stop();
1312 request->CrashIfInvalid(); 1312 request->CrashIfInvalid();
1313 return request; 1313 return request;
1314 } 1314 }
1315 1315
1316 } // namespace internal 1316 } // namespace internal
1317 1317
1318 } // namespace net 1318 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698