| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_ui.h" | 5 #include "chrome/browser/ui/webui/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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 net::HttpStreamFactory::spdy_enabled())); | 1184 net::HttpStreamFactory::spdy_enabled())); |
| 1185 status_dict->Set("use_alternate_protocols", | 1185 status_dict->Set("use_alternate_protocols", |
| 1186 Value::CreateBooleanValue( | 1186 Value::CreateBooleanValue( |
| 1187 net::HttpStreamFactory::use_alternate_protocols())); | 1187 net::HttpStreamFactory::use_alternate_protocols())); |
| 1188 status_dict->Set("force_spdy_over_ssl", | 1188 status_dict->Set("force_spdy_over_ssl", |
| 1189 Value::CreateBooleanValue( | 1189 Value::CreateBooleanValue( |
| 1190 net::HttpStreamFactory::force_spdy_over_ssl())); | 1190 net::HttpStreamFactory::force_spdy_over_ssl())); |
| 1191 status_dict->Set("force_spdy_always", | 1191 status_dict->Set("force_spdy_always", |
| 1192 Value::CreateBooleanValue( | 1192 Value::CreateBooleanValue( |
| 1193 net::HttpStreamFactory::force_spdy_always())); | 1193 net::HttpStreamFactory::force_spdy_always())); |
| 1194 status_dict->Set("next_protos", | 1194 |
| 1195 Value::CreateStringValue( | 1195 // The next_protos may not be specified for certain configurations of SPDY. |
| 1196 *net::HttpStreamFactory::next_protos())); | 1196 Value* next_protos_value = net::HttpStreamFactory::next_protos() ? |
| 1197 Value::CreateStringValue(*net::HttpStreamFactory::next_protos()) : |
| 1198 Value::CreateStringValue(""); |
| 1199 |
| 1200 status_dict->Set("next_protos", next_protos_value); |
| 1197 | 1201 |
| 1198 SendJavascriptCommand(L"receivedSpdyStatus", status_dict); | 1202 SendJavascriptCommand(L"receivedSpdyStatus", status_dict); |
| 1199 } | 1203 } |
| 1200 | 1204 |
| 1201 void | 1205 void |
| 1202 NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings( | 1206 NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings( |
| 1203 const ListValue* list) { | 1207 const ListValue* list) { |
| 1204 net::HttpNetworkSession* http_network_session = | 1208 net::HttpNetworkSession* http_network_session = |
| 1205 GetHttpNetworkSession(context_getter_->GetURLRequestContext()); | 1209 GetHttpNetworkSession(context_getter_->GetURLRequestContext()); |
| 1206 | 1210 |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1554 return constants_dict; | 1558 return constants_dict; |
| 1555 } | 1559 } |
| 1556 | 1560 |
| 1557 NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) { | 1561 NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) { |
| 1558 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this)); | 1562 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this)); |
| 1559 | 1563 |
| 1560 // Set up the chrome://net-internals/ source. | 1564 // Set up the chrome://net-internals/ source. |
| 1561 GetProfile()->GetChromeURLDataManager()->AddDataSource( | 1565 GetProfile()->GetChromeURLDataManager()->AddDataSource( |
| 1562 CreateNetInternalsHTMLSource()); | 1566 CreateNetInternalsHTMLSource()); |
| 1563 } | 1567 } |
| OLD | NEW |