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

Side by Side Diff: trunk/src/content/browser/devtools/devtools_http_handler_impl.cc

Issue 192283002: Revert 255858 "Simplify the user agent code some more since afte..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 "content/browser/devtools/devtools_http_handler_impl.h" 5 #include "content/browser/devtools/devtools_http_handler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 19 matching lines...) Expand all
30 #include "content/public/browser/devtools_manager.h" 30 #include "content/public/browser/devtools_manager.h"
31 #include "content/public/browser/devtools_target.h" 31 #include "content/public/browser/devtools_target.h"
32 #include "content/public/common/content_client.h" 32 #include "content/public/common/content_client.h"
33 #include "content/public/common/url_constants.h" 33 #include "content/public/common/url_constants.h"
34 #include "grit/devtools_resources_map.h" 34 #include "grit/devtools_resources_map.h"
35 #include "net/base/escape.h" 35 #include "net/base/escape.h"
36 #include "net/base/io_buffer.h" 36 #include "net/base/io_buffer.h"
37 #include "net/base/ip_endpoint.h" 37 #include "net/base/ip_endpoint.h"
38 #include "net/server/http_server_request_info.h" 38 #include "net/server/http_server_request_info.h"
39 #include "net/server/http_server_response_info.h" 39 #include "net/server/http_server_response_info.h"
40 #include "webkit/common/user_agent/user_agent.h"
40 #include "webkit/common/user_agent/user_agent_util.h" 41 #include "webkit/common/user_agent/user_agent_util.h"
41 42
42 #if defined(OS_ANDROID) 43 #if defined(OS_ANDROID)
43 #include "base/android/build_info.h" 44 #include "base/android/build_info.h"
44 #endif 45 #endif
45 46
46 namespace content { 47 namespace content {
47 48
48 namespace { 49 namespace {
49 50
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 net::HTTP_NOT_FOUND, 447 net::HTTP_NOT_FOUND,
447 NULL, 448 NULL,
448 "Malformed query: " + info.path); 449 "Malformed query: " + info.path);
449 return; 450 return;
450 } 451 }
451 452
452 if (command == "version") { 453 if (command == "version") {
453 base::DictionaryValue version; 454 base::DictionaryValue version;
454 version.SetString("Protocol-Version", kProtocolVersion); 455 version.SetString("Protocol-Version", kProtocolVersion);
455 version.SetString("WebKit-Version", webkit_glue::GetWebKitVersion()); 456 version.SetString("WebKit-Version", webkit_glue::GetWebKitVersion());
456 version.SetString("Browser", GetContentClient()->GetProduct()); 457 version.SetString("Browser", content::GetContentClient()->GetProduct());
457 version.SetString("User-Agent", GetContentClient()->GetUserAgent()); 458 version.SetString("User-Agent",
459 webkit_glue::GetUserAgent(GURL(kAboutBlankURL)));
458 #if defined(OS_ANDROID) 460 #if defined(OS_ANDROID)
459 version.SetString("Android-Package", 461 version.SetString("Android-Package",
460 base::android::BuildInfo::GetInstance()->package_name()); 462 base::android::BuildInfo::GetInstance()->package_name());
461 #endif 463 #endif
462 SendJson(connection_id, net::HTTP_OK, &version, std::string()); 464 SendJson(connection_id, net::HTTP_OK, &version, std::string());
463 return; 465 return;
464 } 466 }
465 467
466 if (command == "list") { 468 if (command == "list") {
467 std::string host = info.headers["host"]; 469 std::string host = info.headers["host"];
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 id.c_str(), 780 id.c_str(),
779 host); 781 host);
780 dictionary->SetString( 782 dictionary->SetString(
781 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); 783 kTargetDevtoolsFrontendUrlField, devtools_frontend_url);
782 } 784 }
783 785
784 return dictionary; 786 return dictionary;
785 } 787 }
786 788
787 } // namespace content 789 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/app/content_main_runner.cc ('k') | trunk/src/content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698