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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 status_dict->Set("force_spdy_always", 1402 status_dict->Set("force_spdy_always",
1403 Value::CreateBooleanValue( 1403 Value::CreateBooleanValue(
1404 net::HttpStreamFactory::force_spdy_always())); 1404 net::HttpStreamFactory::force_spdy_always()));
1405 1405
1406 // The next_protos may not be specified for certain configurations of SPDY. 1406 // The next_protos may not be specified for certain configurations of SPDY.
1407 Value* next_protos_value; 1407 Value* next_protos_value;
1408 if (net::HttpStreamFactory::has_next_protos()) { 1408 if (net::HttpStreamFactory::has_next_protos()) {
1409 next_protos_value = Value::CreateStringValue( 1409 next_protos_value = Value::CreateStringValue(
1410 JoinString(net::HttpStreamFactory::next_protos(), ',')); 1410 JoinString(net::HttpStreamFactory::next_protos(), ','));
1411 } else { 1411 } else {
1412 next_protos_value = Value::CreateStringValue(""); 1412 next_protos_value = Value::CreateStringValue(std::string());
1413 } 1413 }
1414 status_dict->Set("next_protos", next_protos_value); 1414 status_dict->Set("next_protos", next_protos_value);
1415 1415
1416 SendJavascriptCommand("receivedSpdyStatus", status_dict); 1416 SendJavascriptCommand("receivedSpdyStatus", status_dict);
1417 } 1417 }
1418 1418
1419 void 1419 void
1420 NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings( 1420 NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings(
1421 const ListValue* list) { 1421 const ListValue* list) {
1422 DCHECK(!list); 1422 DCHECK(!list);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 } 1938 }
1939 1939
1940 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1940 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1941 : WebUIController(web_ui) { 1941 : WebUIController(web_ui) {
1942 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1942 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1943 1943
1944 // Set up the chrome://net-internals/ source. 1944 // Set up the chrome://net-internals/ source.
1945 Profile* profile = Profile::FromWebUI(web_ui); 1945 Profile* profile = Profile::FromWebUI(web_ui);
1946 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1946 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1947 } 1947 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/instant_ui.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698