diff options
author | kaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-23 14:01:14 +0000 |
---|---|---|
committer | kaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-23 14:01:14 +0000 |
commit | fa471b9f13e741d9e5576b46ea37c5c9309bfa93 (patch) | |
tree | 404ff72db8494724971af2e6d97afd3a4210b9ff /content | |
parent | 9cf8cd44c8c18b3a42759fb2d682714dd208695f (diff) | |
download | chromium_src-fa471b9f13e741d9e5576b46ea37c5c9309bfa93.zip chromium_src-fa471b9f13e741d9e5576b46ea37c5c9309bfa93.tar.gz chromium_src-fa471b9f13e741d9e5576b46ea37c5c9309bfa93.tar.bz2 |
DevTools: Move EscapeForHTML call from DevToolsTarget implementations to the client code
TBR=pfeldman,bulach,mnaganov
BUG=None
Review URL: https://codereview.chromium.org/36303006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/devtools/devtools_http_handler_impl.cc | 4 | ||||
-rw-r--r-- | content/shell/browser/shell_devtools_delegate.cc | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/content/browser/devtools/devtools_http_handler_impl.cc b/content/browser/devtools/devtools_http_handler_impl.cc index f56ea6b..bdea96f 100644 --- a/content/browser/devtools/devtools_http_handler_impl.cc +++ b/content/browser/devtools/devtools_http_handler_impl.cc @@ -32,6 +32,7 @@ #include "content/public/common/content_client.h" #include "content/public/common/url_constants.h" #include "grit/devtools_resources_map.h" +#include "net/base/escape.h" #include "net/base/io_buffer.h" #include "net/base/ip_endpoint.h" #include "net/server/http_server_request_info.h" @@ -738,7 +739,8 @@ base::DictionaryValue* DevToolsHttpHandlerImpl::SerializeTarget( std::string id = target.GetId(); dictionary->SetString(kTargetIdField, id); dictionary->SetString(kTargetTypeField, target.GetType()); - dictionary->SetString(kTargetTitleField, target.GetTitle()); + dictionary->SetString(kTargetTitleField, + net::EscapeForHTML(target.GetTitle())); dictionary->SetString(kTargetDescriptionField, target.GetDescription()); GURL url = target.GetUrl(); diff --git a/content/shell/browser/shell_devtools_delegate.cc b/content/shell/browser/shell_devtools_delegate.cc index 8e05bc3..801ca42 100644 --- a/content/shell/browser/shell_devtools_delegate.cc +++ b/content/shell/browser/shell_devtools_delegate.cc @@ -21,7 +21,6 @@ #include "content/public/common/url_constants.h" #include "content/shell/browser/shell.h" #include "grit/shell_resources.h" -#include "net/base/escape.h" #include "net/socket/tcp_listen_socket.h" #include "ui/base/resource/resource_bundle.h" @@ -102,7 +101,7 @@ Target::Target(WebContents* web_contents) { agent_host_ = DevToolsAgentHost::GetOrCreateFor(web_contents->GetRenderViewHost()); id_ = agent_host_->GetId(); - title_ = UTF16ToUTF8(net::EscapeForHTML(web_contents->GetTitle())); + title_ = UTF16ToUTF8(web_contents->GetTitle()); url_ = web_contents->GetURL(); content::NavigationController& controller = web_contents->GetController(); content::NavigationEntry* entry = controller.GetActiveEntry(); |