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

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

Issue 8156001: net: rework the NPN patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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
OLDNEW
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 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 Value::CreateBooleanValue( 1192 Value::CreateBooleanValue(
1193 net::HttpStreamFactory::use_alternate_protocols())); 1193 net::HttpStreamFactory::use_alternate_protocols()));
1194 status_dict->Set("force_spdy_over_ssl", 1194 status_dict->Set("force_spdy_over_ssl",
1195 Value::CreateBooleanValue( 1195 Value::CreateBooleanValue(
1196 net::HttpStreamFactory::force_spdy_over_ssl())); 1196 net::HttpStreamFactory::force_spdy_over_ssl()));
1197 status_dict->Set("force_spdy_always", 1197 status_dict->Set("force_spdy_always",
1198 Value::CreateBooleanValue( 1198 Value::CreateBooleanValue(
1199 net::HttpStreamFactory::force_spdy_always())); 1199 net::HttpStreamFactory::force_spdy_always()));
1200 1200
1201 // The next_protos may not be specified for certain configurations of SPDY. 1201 // The next_protos may not be specified for certain configurations of SPDY.
1202 Value* next_protos_value = net::HttpStreamFactory::next_protos() ? 1202 Value* next_protos_value;
1203 Value::CreateStringValue(*net::HttpStreamFactory::next_protos()) : 1203 if (net::HttpStreamFactory::has_next_protos()) {
1204 Value::CreateStringValue(""); 1204 next_protos_value = Value::CreateStringValue(
1205 1205 JoinString(net::HttpStreamFactory::next_protos(), ','));
1206 } else {
1207 next_protos_value = Value::CreateStringValue("");
1208 }
wtc 2011/10/05 23:34:25 Just wanted to doublecheck: you intentionally repl
agl 2011/10/07 19:19:17 Yes
1206 status_dict->Set("next_protos", next_protos_value); 1209 status_dict->Set("next_protos", next_protos_value);
1207 1210
1208 SendJavascriptCommand(L"receivedSpdyStatus", status_dict); 1211 SendJavascriptCommand(L"receivedSpdyStatus", status_dict);
1209 } 1212 }
1210 1213
1211 void 1214 void
1212 NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings( 1215 NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings(
1213 const ListValue* list) { 1216 const ListValue* list) {
1214 net::HttpNetworkSession* http_network_session = 1217 net::HttpNetworkSession* http_network_session =
1215 GetHttpNetworkSession(context_getter_->GetURLRequestContext()); 1218 GetHttpNetworkSession(context_getter_->GetURLRequestContext());
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 return constants_dict; 1567 return constants_dict;
1565 } 1568 }
1566 1569
1567 NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) { 1570 NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) {
1568 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this)); 1571 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this));
1569 1572
1570 // Set up the chrome://net-internals/ source. 1573 // Set up the chrome://net-internals/ source.
1571 GetProfile()->GetChromeURLDataManager()->AddDataSource( 1574 GetProfile()->GetChromeURLDataManager()->AddDataSource(
1572 CreateNetInternalsHTMLSource()); 1575 CreateNetInternalsHTMLSource());
1573 } 1576 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698