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

Side by Side Diff: content/browser/devtools/devtools_http_handler.cc

Issue 2779893005: Continue to clean c_str() calls. (Closed)
Patch Set: Revert changes in font_service_app.cc Created 3 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
« no previous file with comments | « components/webcrypto/algorithms/test_helpers.cc ('k') | content/browser/gpu/compositor_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 SendJson(connection_id, 514 SendJson(connection_id,
515 net::HTTP_NOT_FOUND, 515 net::HTTP_NOT_FOUND,
516 NULL, 516 NULL,
517 "Malformed query: " + info.path); 517 "Malformed query: " + info.path);
518 return; 518 return;
519 } 519 }
520 520
521 if (command == "version") { 521 if (command == "version") {
522 base::DictionaryValue version; 522 base::DictionaryValue version;
523 version.SetString("Protocol-Version", 523 version.SetString("Protocol-Version",
524 DevToolsAgentHost::GetProtocolVersion().c_str()); 524 DevToolsAgentHost::GetProtocolVersion());
525 version.SetString("WebKit-Version", GetWebKitVersion()); 525 version.SetString("WebKit-Version", GetWebKitVersion());
526 version.SetString("Browser", product_name_); 526 version.SetString("Browser", product_name_);
527 version.SetString("User-Agent", user_agent_); 527 version.SetString("User-Agent", user_agent_);
528 version.SetString("V8-Version", V8_VERSION_STRING); 528 version.SetString("V8-Version", V8_VERSION_STRING);
529 #if defined(OS_ANDROID) 529 #if defined(OS_ANDROID)
530 version.SetString("Android-Package", 530 version.SetString("Android-Package",
531 base::android::BuildInfo::GetInstance()->package_name()); 531 base::android::BuildInfo::GetInstance()->package_name());
532 #endif 532 #endif
533 SendJson(connection_id, net::HTTP_OK, &version, std::string()); 533 SendJson(connection_id, net::HTTP_OK, &version, std::string());
534 return; 534 return;
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 GURL favicon_url = agent_host->GetFaviconURL(); 845 GURL favicon_url = agent_host->GetFaviconURL();
846 if (favicon_url.is_valid()) 846 if (favicon_url.is_valid())
847 dictionary->SetString(kTargetFaviconUrlField, favicon_url.spec()); 847 dictionary->SetString(kTargetFaviconUrlField, favicon_url.spec());
848 848
849 if (!agent_host->IsAttached()) { 849 if (!agent_host->IsAttached()) {
850 dictionary->SetString(kTargetWebSocketDebuggerUrlField, 850 dictionary->SetString(kTargetWebSocketDebuggerUrlField,
851 base::StringPrintf("ws://%s%s%s", 851 base::StringPrintf("ws://%s%s%s",
852 host.c_str(), 852 host.c_str(),
853 kPageUrlPrefix, 853 kPageUrlPrefix,
854 id.c_str())); 854 id.c_str()));
855 std::string devtools_frontend_url = GetFrontendURLInternal( 855 std::string devtools_frontend_url = GetFrontendURLInternal(id, host);
856 id.c_str(),
857 host);
858 dictionary->SetString( 856 dictionary->SetString(
859 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); 857 kTargetDevtoolsFrontendUrlField, devtools_frontend_url);
860 } 858 }
861 859
862 return dictionary; 860 return dictionary;
863 } 861 }
864 862
865 } // namespace content 863 } // namespace content
OLDNEW
« no previous file with comments | « components/webcrypto/algorithms/test_helpers.cc ('k') | content/browser/gpu/compositor_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698