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

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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 Value::CreateBooleanValue( 1179 Value::CreateBooleanValue(
1180 net::HttpStreamFactory::use_alternate_protocols())); 1180 net::HttpStreamFactory::use_alternate_protocols()));
1181 status_dict->Set("force_spdy_over_ssl", 1181 status_dict->Set("force_spdy_over_ssl",
1182 Value::CreateBooleanValue( 1182 Value::CreateBooleanValue(
1183 net::HttpStreamFactory::force_spdy_over_ssl())); 1183 net::HttpStreamFactory::force_spdy_over_ssl()));
1184 status_dict->Set("force_spdy_always", 1184 status_dict->Set("force_spdy_always",
1185 Value::CreateBooleanValue( 1185 Value::CreateBooleanValue(
1186 net::HttpStreamFactory::force_spdy_always())); 1186 net::HttpStreamFactory::force_spdy_always()));
1187 1187
1188 // The next_protos may not be specified for certain configurations of SPDY. 1188 // The next_protos may not be specified for certain configurations of SPDY.
1189 Value* next_protos_value = net::HttpStreamFactory::next_protos() ? 1189 Value* next_protos_value;
1190 Value::CreateStringValue(*net::HttpStreamFactory::next_protos()) : 1190 if (net::HttpStreamFactory::has_next_protos()) {
1191 Value::CreateStringValue(""); 1191 next_protos_value = Value::CreateStringValue(
1192 1192 JoinString(net::HttpStreamFactory::next_protos(), ','));
wtc 2011/10/11 23:43:04 IMPORTANT: this means the protocol strings must no
agl 2011/10/17 17:37:24 This is just for debugging and has a number of lim
1193 } else {
1194 next_protos_value = Value::CreateStringValue("");
1195 }
1193 status_dict->Set("next_protos", next_protos_value); 1196 status_dict->Set("next_protos", next_protos_value);
1194 1197
1195 SendJavascriptCommand(L"receivedSpdyStatus", status_dict); 1198 SendJavascriptCommand(L"receivedSpdyStatus", status_dict);
1196 } 1199 }
1197 1200
1198 void 1201 void
1199 NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings( 1202 NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings(
1200 const ListValue* list) { 1203 const ListValue* list) {
1201 net::HttpNetworkSession* http_network_session = 1204 net::HttpNetworkSession* http_network_session =
1202 GetHttpNetworkSession(context_getter_->GetURLRequestContext()); 1205 GetHttpNetworkSession(context_getter_->GetURLRequestContext());
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 return constants_dict; 1549 return constants_dict;
1547 } 1550 }
1548 1551
1549 NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) { 1552 NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) {
1550 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this)); 1553 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this));
1551 1554
1552 // Set up the chrome://net-internals/ source. 1555 // Set up the chrome://net-internals/ source.
1553 GetProfile()->GetChromeURLDataManager()->AddDataSource( 1556 GetProfile()->GetChromeURLDataManager()->AddDataSource(
1554 CreateNetInternalsHTMLSource()); 1557 CreateNetInternalsHTMLSource());
1555 } 1558 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698