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

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

Issue 399493002: Remove many instances of CreateBooleanValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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) 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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 } 1361 }
1362 1362
1363 void NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyStatus( 1363 void NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyStatus(
1364 const base::ListValue* list) { 1364 const base::ListValue* list) {
1365 DCHECK(!list); 1365 DCHECK(!list);
1366 base::DictionaryValue* status_dict = new base::DictionaryValue(); 1366 base::DictionaryValue* status_dict = new base::DictionaryValue();
1367 1367
1368 net::HttpNetworkSession* http_network_session = 1368 net::HttpNetworkSession* http_network_session =
1369 GetHttpNetworkSession(GetMainContext()); 1369 GetHttpNetworkSession(GetMainContext());
1370 1370
1371 status_dict->Set("spdy_enabled", 1371 status_dict->SetBoolean("spdy_enabled",
1372 base::Value::CreateBooleanValue( 1372 net::HttpStreamFactory::spdy_enabled());
1373 net::HttpStreamFactory::spdy_enabled())); 1373 status_dict->SetBoolean(
1374 status_dict->Set("use_alternate_protocols", 1374 "use_alternate_protocols",
1375 base::Value::CreateBooleanValue( 1375 http_network_session->params().use_alternate_protocols);
1376 http_network_session->params().use_alternate_protocols)); 1376 status_dict->SetBoolean("force_spdy_over_ssl",
1377 status_dict->Set("force_spdy_over_ssl", 1377 http_network_session->params().force_spdy_over_ssl);
1378 base::Value::CreateBooleanValue( 1378 status_dict->SetBoolean("force_spdy_always",
1379 http_network_session->params().force_spdy_over_ssl)); 1379 http_network_session->params().force_spdy_always);
1380 status_dict->Set("force_spdy_always",
1381 base::Value::CreateBooleanValue(
1382 http_network_session->params().force_spdy_always));
1383 1380
1384 std::vector<std::string> next_protos; 1381 std::vector<std::string> next_protos;
1385 http_network_session->GetNextProtos(&next_protos); 1382 http_network_session->GetNextProtos(&next_protos);
1386 std::string next_protos_string = JoinString(next_protos, ','); 1383 std::string next_protos_string = JoinString(next_protos, ',');
1387 status_dict->SetString("next_protos", next_protos_string); 1384 status_dict->SetString("next_protos", next_protos_string);
1388 1385
1389 SendJavascriptCommand("receivedSpdyStatus", status_dict); 1386 SendJavascriptCommand("receivedSpdyStatus", status_dict);
1390 } 1387 }
1391 1388
1392 void 1389 void
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 } 1781 }
1785 1782
1786 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1783 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1787 : WebUIController(web_ui) { 1784 : WebUIController(web_ui) {
1788 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1785 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1789 1786
1790 // Set up the chrome://net-internals/ source. 1787 // Set up the chrome://net-internals/ source.
1791 Profile* profile = Profile::FromWebUI(web_ui); 1788 Profile* profile = Profile::FromWebUI(web_ui);
1792 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1789 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1793 } 1790 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/extension_api/tts_extension_api.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698