| Index: content/browser/devtools/render_view_devtools_agent_host.cc
|
| diff --git a/content/browser/devtools/render_view_devtools_agent_host.cc b/content/browser/devtools/render_view_devtools_agent_host.cc
|
| index 26b14bf59886f502c74ddf9c310cb7fc4b9cbcb5..16fbf839a19ef7b7322629673e624fe938043068 100644
|
| --- a/content/browser/devtools/render_view_devtools_agent_host.cc
|
| +++ b/content/browser/devtools/render_view_devtools_agent_host.cc
|
| @@ -104,20 +104,23 @@ bool DevToolsAgentHost::IsDebuggerAttached(WebContents* web_contents) {
|
| }
|
|
|
| // static
|
| -int DevToolsAgentHost::DisconnectRenderViewHost(RenderViewHost* rvh) {
|
| +const std::string DevToolsAgentHost::NullId;
|
| +
|
| +// static
|
| +std::string DevToolsAgentHost::DisconnectRenderViewHost(RenderViewHost* rvh) {
|
| RenderViewDevToolsAgentHost* agent_host = FindAgentHost(rvh);
|
| if (!agent_host)
|
| - return -1;
|
| + return NullId;
|
| agent_host->DisconnectRenderViewHost();
|
| - return agent_host->id();
|
| + return agent_host->GetId();
|
| }
|
|
|
| // static
|
| -void DevToolsAgentHost::ConnectRenderViewHost(int cookie,
|
| +void DevToolsAgentHost::ConnectRenderViewHost(const std::string& cookie,
|
| RenderViewHost* rvh) {
|
| for (Instances::iterator it = g_instances.Get().begin();
|
| it != g_instances.Get().end(); ++it) {
|
| - if (cookie == (*it)->id()) {
|
| + if (cookie == (*it)->GetId()) {
|
| (*it)->ConnectRenderViewHost(rvh, true);
|
| break;
|
| }
|
| @@ -128,8 +131,8 @@ void DevToolsAgentHost::ConnectRenderViewHost(int cookie,
|
| void RenderViewDevToolsAgentHost::OnCancelPendingNavigation(
|
| RenderViewHost* pending,
|
| RenderViewHost* current) {
|
| - int cookie = DevToolsAgentHost::DisconnectRenderViewHost(pending);
|
| - if (cookie != -1)
|
| + std::string cookie = DevToolsAgentHost::DisconnectRenderViewHost(pending);
|
| + if (cookie != NullId)
|
| DevToolsAgentHost::ConnectRenderViewHost(cookie, current);
|
| }
|
|
|
|
|