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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 9860044: Coverity: check null returns. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler.cc ('k') | no next file » | 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 "chrome/browser/ui/webui/net_internals/net_internals_ui.h" 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpPipeliningStatus( 1262 void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpPipeliningStatus(
1263 const ListValue* list) { 1263 const ListValue* list) {
1264 DictionaryValue* status_dict = new DictionaryValue(); 1264 DictionaryValue* status_dict = new DictionaryValue();
1265 1265
1266 status_dict->Set("pipelining_enabled", 1266 status_dict->Set("pipelining_enabled",
1267 Value::CreateBooleanValue( 1267 Value::CreateBooleanValue(
1268 net::HttpStreamFactory::http_pipelining_enabled())); 1268 net::HttpStreamFactory::http_pipelining_enabled()));
1269 1269
1270 net::HttpNetworkSession* http_network_session = 1270 net::HttpNetworkSession* http_network_session =
1271 GetHttpNetworkSession(context_getter_->GetURLRequestContext()); 1271 GetHttpNetworkSession(context_getter_->GetURLRequestContext());
1272 Value* pipelined_conneciton_info = 1272 Value* pipelined_connection_info = NULL;
1273 http_network_session->http_stream_factory()->PipelineInfoToValue(); 1273 if (http_network_session) {
1274 status_dict->Set("pipelined_connection_info", pipelined_conneciton_info); 1274 pipelined_connection_info =
1275 http_network_session->http_stream_factory()->PipelineInfoToValue();
1276 }
1277 status_dict->Set("pipelined_connection_info", pipelined_connection_info);
1275 1278
1276 const net::HttpServerProperties& http_server_properties = 1279 const net::HttpServerProperties& http_server_properties =
1277 *context_getter_->GetURLRequestContext()->http_server_properties(); 1280 *context_getter_->GetURLRequestContext()->http_server_properties();
1278 1281
1279 // TODO(simonjam): This call is slow. 1282 // TODO(simonjam): This call is slow.
1280 const net::PipelineCapabilityMap pipeline_capability_map = 1283 const net::PipelineCapabilityMap pipeline_capability_map =
1281 http_server_properties.GetPipelineCapabilityMap(); 1284 http_server_properties.GetPipelineCapabilityMap();
1282 1285
1283 ListValue* known_hosts_list = new ListValue(); 1286 ListValue* known_hosts_list = new ListValue();
1284 net::PipelineCapabilityMap::const_iterator it; 1287 net::PipelineCapabilityMap::const_iterator it;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 1570
1568 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1571 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1569 : WebUIController(web_ui) { 1572 : WebUIController(web_ui) {
1570 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1573 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1571 1574
1572 // Set up the chrome://net-internals/ source. 1575 // Set up the chrome://net-internals/ source.
1573 Profile* profile = Profile::FromWebUI(web_ui); 1576 Profile* profile = Profile::FromWebUI(web_ui);
1574 profile->GetChromeURLDataManager()->AddDataSource( 1577 profile->GetChromeURLDataManager()->AddDataSource(
1575 CreateNetInternalsHTMLSource()); 1578 CreateNetInternalsHTMLSource());
1576 } 1579 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698