Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "content/browser/devtools/render_view_devtools_agent_host.h" |
| 6 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 7 | #include "base/basictypes.h" |
| 8 | #include "base/lazy_instance.h" |
| 9 | #include "content/browser/child_process_security_policy_impl.h" |
| 10 | #include "content/browser/devtools/devtools_manager_impl.h" |
| 11 | #include "content/browser/devtools/devtools_protocol.h" |
| 12 | #include "content/browser/devtools/devtools_protocol_constants.h" |
Ben Murdoch | ca12bfa | 2013-07-23 11:17:05 +0100 | [diff] [blame] | 13 | #include "content/browser/devtools/devtools_tracing_handler.h" |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 14 | #include "content/browser/devtools/renderer_overrides_handler.h" |
| 15 | #include "content/browser/renderer_host/render_process_host_impl.h" |
| 16 | #include "content/browser/renderer_host/render_view_host_impl.h" |
| 17 | #include "content/browser/site_instance_impl.h" |
| 18 | #include "content/browser/web_contents/web_contents_impl.h" |
| 19 | #include "content/common/devtools_messages.h" |
| 20 | #include "content/public/browser/content_browser_client.h" |
| 21 | #include "content/public/browser/notification_service.h" |
| 22 | #include "content/public/browser/notification_types.h" |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 23 | |
| 24 | namespace content { |
| 25 | |
| 26 | typedef std::vector<RenderViewDevToolsAgentHost*> Instances; |
| 27 | |
| 28 | namespace { |
| 29 | base::LazyInstance<Instances>::Leaky g_instances = LAZY_INSTANCE_INITIALIZER; |
| 30 | |
| 31 | static RenderViewDevToolsAgentHost* FindAgentHost(RenderViewHost* rvh) { |
| 32 | if (g_instances == NULL) |
| 33 | return NULL; |
| 34 | for (Instances::iterator it = g_instances.Get().begin(); |
| 35 | it != g_instances.Get().end(); ++it) { |
| 36 | if (rvh == (*it)->render_view_host()) |
| 37 | return *it; |
| 38 | } |
| 39 | return NULL; |
| 40 | } |
| 41 | |
| 42 | } // namespace |
| 43 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 44 | class RenderViewDevToolsAgentHost::DevToolsAgentHostRvhObserver |
| 45 | : public RenderViewHostObserver { |
| 46 | public: |
| 47 | DevToolsAgentHostRvhObserver(RenderViewHost* rvh, |
| 48 | RenderViewDevToolsAgentHost* agent_host) |
| 49 | : RenderViewHostObserver(rvh), |
| 50 | agent_host_(agent_host) { |
| 51 | } |
| 52 | virtual ~DevToolsAgentHostRvhObserver() {} |
| 53 | |
| 54 | // RenderViewHostObserver overrides. |
| 55 | virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE { |
| 56 | agent_host_->RenderViewHostDestroyed(rvh); |
| 57 | } |
| 58 | virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { |
| 59 | return agent_host_->OnRvhMessageReceived(message); |
| 60 | } |
| 61 | private: |
| 62 | RenderViewDevToolsAgentHost* agent_host_; |
| 63 | DISALLOW_COPY_AND_ASSIGN(DevToolsAgentHostRvhObserver); |
| 64 | }; |
| 65 | |
| 66 | // static |
| 67 | scoped_refptr<DevToolsAgentHost> |
| 68 | DevToolsAgentHost::GetOrCreateFor(RenderViewHost* rvh) { |
| 69 | RenderViewDevToolsAgentHost* result = FindAgentHost(rvh); |
| 70 | if (!result) |
| 71 | result = new RenderViewDevToolsAgentHost(rvh); |
| 72 | return result; |
| 73 | } |
| 74 | |
| 75 | // static |
| 76 | bool DevToolsAgentHost::HasFor(RenderViewHost* rvh) { |
| 77 | return FindAgentHost(rvh) != NULL; |
| 78 | } |
| 79 | |
| 80 | // static |
| 81 | bool DevToolsAgentHost::IsDebuggerAttached(WebContents* web_contents) { |
| 82 | if (g_instances == NULL) |
| 83 | return false; |
| 84 | DevToolsManager* devtools_manager = DevToolsManager::GetInstance(); |
| 85 | if (!devtools_manager) |
| 86 | return false; |
| 87 | RenderViewHostDelegate* delegate = |
| 88 | static_cast<WebContentsImpl*>(web_contents); |
| 89 | for (Instances::iterator it = g_instances.Get().begin(); |
| 90 | it != g_instances.Get().end(); ++it) { |
| 91 | RenderViewHost* rvh = (*it)->render_view_host_; |
| 92 | if (rvh && rvh->GetDelegate() != delegate) |
| 93 | continue; |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 94 | if ((*it)->IsAttached()) |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 95 | return true; |
| 96 | } |
| 97 | return false; |
| 98 | } |
| 99 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 100 | //static |
| 101 | std::vector<RenderViewHost*> DevToolsAgentHost::GetValidRenderViewHosts() { |
| 102 | std::vector<RenderViewHost*> result; |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 103 | RenderWidgetHost::List widgets = RenderWidgetHost::GetRenderWidgetHosts(); |
| 104 | for (size_t i = 0; i < widgets.size(); ++i) { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 105 | // Ignore processes that don't have a connection, such as crashed contents. |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 106 | if (!widgets[i]->GetProcess()->HasConnection()) |
| 107 | continue; |
| 108 | if (!widgets[i]->IsRenderView()) |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 109 | continue; |
| 110 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 111 | RenderViewHost* rvh = RenderViewHost::From(widgets[i]); |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 112 | WebContents* web_contents = WebContents::FromRenderViewHost(rvh); |
| 113 | // Don't report a RenderViewHost if it is not the current RenderViewHost |
| 114 | // for some WebContents. |
| 115 | if (!web_contents || rvh != web_contents->GetRenderViewHost()) |
| 116 | continue; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 117 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 118 | result.push_back(rvh); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 119 | } |
| 120 | return result; |
| 121 | } |
| 122 | |
| 123 | // static |
| 124 | void RenderViewDevToolsAgentHost::OnCancelPendingNavigation( |
| 125 | RenderViewHost* pending, |
| 126 | RenderViewHost* current) { |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 127 | RenderViewDevToolsAgentHost* agent_host = FindAgentHost(pending); |
| 128 | if (!agent_host) |
| 129 | return; |
| 130 | agent_host->DisconnectRenderViewHost(); |
| 131 | agent_host->ConnectRenderViewHost(current); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | RenderViewDevToolsAgentHost::RenderViewDevToolsAgentHost( |
| 135 | RenderViewHost* rvh) |
Ben Murdoch | ca12bfa | 2013-07-23 11:17:05 +0100 | [diff] [blame] | 136 | : overrides_handler_(new RendererOverridesHandler(this)), |
| 137 | tracing_handler_(new DevToolsTracingHandler()) |
| 138 | { |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 139 | SetRenderViewHost(rvh); |
Ben Murdoch | ca12bfa | 2013-07-23 11:17:05 +0100 | [diff] [blame] | 140 | DevToolsProtocol::Notifier notifier(base::Bind( |
| 141 | &RenderViewDevToolsAgentHost::OnDispatchOnInspectorFrontend, |
| 142 | base::Unretained(this))); |
| 143 | overrides_handler_->SetNotifier(notifier); |
| 144 | tracing_handler_->SetNotifier(notifier); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 145 | g_instances.Get().push_back(this); |
| 146 | RenderViewHostDelegate* delegate = render_view_host_->GetDelegate(); |
| 147 | if (delegate && delegate->GetAsWebContents()) |
| 148 | Observe(delegate->GetAsWebContents()); |
| 149 | AddRef(); // Balanced in RenderViewHostDestroyed. |
| 150 | } |
| 151 | |
| 152 | RenderViewHost* RenderViewDevToolsAgentHost::GetRenderViewHost() { |
| 153 | return render_view_host_; |
| 154 | } |
| 155 | |
| 156 | void RenderViewDevToolsAgentHost::DispatchOnInspectorBackend( |
| 157 | const std::string& message) { |
| 158 | std::string error_message; |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 159 | scoped_refptr<DevToolsProtocol::Command> command = |
| 160 | DevToolsProtocol::ParseCommand(message, &error_message); |
| 161 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 162 | if (command) { |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 163 | scoped_refptr<DevToolsProtocol::Response> overridden_response = |
| 164 | overrides_handler_->HandleCommand(command); |
Ben Murdoch | ca12bfa | 2013-07-23 11:17:05 +0100 | [diff] [blame] | 165 | if (!overridden_response) |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 166 | overridden_response = tracing_handler_->HandleCommand(command); |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 167 | if (overridden_response) { |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 168 | if (!overridden_response->is_async_promise()) |
| 169 | OnDispatchOnInspectorFrontend(overridden_response->Serialize()); |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 170 | return; |
| 171 | } |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 172 | } |
| 173 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 174 | IPCDevToolsAgentHost::DispatchOnInspectorBackend(message); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) { |
| 178 | if (!render_view_host_) |
| 179 | return; |
| 180 | msg->set_routing_id(render_view_host_->GetRoutingID()); |
| 181 | render_view_host_->Send(msg); |
| 182 | } |
| 183 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 184 | void RenderViewDevToolsAgentHost::OnClientAttached() { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 185 | if (!render_view_host_) |
| 186 | return; |
| 187 | |
| 188 | ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadRawCookies( |
| 189 | render_view_host_->GetProcess()->GetID()); |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 190 | |
| 191 | // TODO(kaznacheev): Move this call back to DevToolsManagerImpl when |
| 192 | // ExtensionProcessManager no longer relies on this notification. |
| 193 | DevToolsManagerImpl::GetInstance()->NotifyObservers(this, true); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 194 | } |
| 195 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 196 | void RenderViewDevToolsAgentHost::OnClientDetached() { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 197 | if (!render_view_host_) |
| 198 | return; |
| 199 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 200 | bool process_has_agents = false; |
| 201 | RenderProcessHost* render_process_host = render_view_host_->GetProcess(); |
| 202 | for (Instances::iterator it = g_instances.Get().begin(); |
| 203 | it != g_instances.Get().end(); ++it) { |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 204 | if (*it == this || !(*it)->IsAttached()) |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 205 | continue; |
| 206 | RenderViewHost* rvh = (*it)->render_view_host(); |
| 207 | if (rvh && rvh->GetProcess() == render_process_host) |
| 208 | process_has_agents = true; |
| 209 | } |
| 210 | |
| 211 | // We are the last to disconnect from the renderer -> revoke permissions. |
| 212 | if (!process_has_agents) { |
| 213 | ChildProcessSecurityPolicyImpl::GetInstance()->RevokeReadRawCookies( |
| 214 | render_process_host->GetID()); |
| 215 | } |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 216 | |
| 217 | // TODO(kaznacheev): Move this call back to DevToolsManagerImpl when |
| 218 | // ExtensionProcessManager no longer relies on this notification. |
| 219 | DevToolsManagerImpl::GetInstance()->NotifyObservers(this, false); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | RenderViewDevToolsAgentHost::~RenderViewDevToolsAgentHost() { |
| 223 | Instances::iterator it = std::find(g_instances.Get().begin(), |
| 224 | g_instances.Get().end(), |
| 225 | this); |
| 226 | if (it != g_instances.Get().end()) |
| 227 | g_instances.Get().erase(it); |
| 228 | } |
| 229 | |
| 230 | void RenderViewDevToolsAgentHost::AboutToNavigateRenderView( |
| 231 | RenderViewHost* dest_rvh) { |
| 232 | if (!render_view_host_) |
| 233 | return; |
| 234 | |
| 235 | if (render_view_host_ == dest_rvh && static_cast<RenderViewHostImpl*>( |
| 236 | render_view_host_)->render_view_termination_status() == |
| 237 | base::TERMINATION_STATUS_STILL_RUNNING) |
| 238 | return; |
| 239 | DisconnectRenderViewHost(); |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 240 | ConnectRenderViewHost(dest_rvh); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 241 | } |
| 242 | |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 243 | void RenderViewDevToolsAgentHost::RenderProcessGone( |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 244 | base::TerminationStatus status) { |
| 245 | switch(status) { |
| 246 | case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: |
| 247 | case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: |
| 248 | case base::TERMINATION_STATUS_PROCESS_CRASHED: |
| 249 | RenderViewCrashed(); |
| 250 | break; |
| 251 | default: |
| 252 | break; |
| 253 | } |
| 254 | } |
| 255 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 256 | void RenderViewDevToolsAgentHost::DidAttachInterstitialPage() { |
| 257 | if (!render_view_host_) |
| 258 | return; |
| 259 | // The rvh set in AboutToNavigateRenderView turned out to be interstitial. |
| 260 | // Connect back to the real one. |
| 261 | WebContents* web_contents = |
| 262 | WebContents::FromRenderViewHost(render_view_host_); |
| 263 | if (!web_contents) |
| 264 | return; |
| 265 | DisconnectRenderViewHost(); |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 266 | ConnectRenderViewHost(web_contents->GetRenderViewHost()); |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 267 | } |
| 268 | |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 269 | void RenderViewDevToolsAgentHost::SetRenderViewHost(RenderViewHost* rvh) { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 270 | render_view_host_ = rvh; |
| 271 | rvh_observer_.reset(new DevToolsAgentHostRvhObserver(rvh, this)); |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 272 | } |
| 273 | |
| 274 | void RenderViewDevToolsAgentHost::ConnectRenderViewHost(RenderViewHost* rvh) { |
| 275 | SetRenderViewHost(rvh); |
| 276 | Reattach(state_); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 277 | } |
| 278 | |
| 279 | void RenderViewDevToolsAgentHost::DisconnectRenderViewHost() { |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 280 | OnClientDetached(); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 281 | rvh_observer_.reset(); |
| 282 | render_view_host_ = NULL; |
| 283 | } |
| 284 | |
| 285 | void RenderViewDevToolsAgentHost::RenderViewHostDestroyed( |
| 286 | RenderViewHost* rvh) { |
| 287 | DCHECK(render_view_host_); |
| 288 | scoped_refptr<RenderViewDevToolsAgentHost> protect(this); |
| 289 | NotifyCloseListener(); |
| 290 | render_view_host_ = NULL; |
| 291 | Release(); |
| 292 | } |
| 293 | |
| 294 | void RenderViewDevToolsAgentHost::RenderViewCrashed() { |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 295 | scoped_refptr<DevToolsProtocol::Notification> notification = |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 296 | DevToolsProtocol::CreateNotification( |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 297 | devtools::Inspector::targetCrashed::kName, NULL); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 298 | DevToolsManagerImpl::GetInstance()-> |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 299 | DispatchOnInspectorFrontend(this, notification->Serialize()); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 300 | } |
| 301 | |
| 302 | bool RenderViewDevToolsAgentHost::OnRvhMessageReceived( |
| 303 | const IPC::Message& message) { |
| 304 | bool handled = true; |
| 305 | IPC_BEGIN_MESSAGE_MAP(RenderViewDevToolsAgentHost, message) |
| 306 | IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchOnInspectorFrontend, |
| 307 | OnDispatchOnInspectorFrontend) |
| 308 | IPC_MESSAGE_HANDLER(DevToolsHostMsg_SaveAgentRuntimeState, |
| 309 | OnSaveAgentRuntimeState) |
| 310 | IPC_MESSAGE_HANDLER(DevToolsHostMsg_ClearBrowserCache, OnClearBrowserCache) |
| 311 | IPC_MESSAGE_HANDLER(DevToolsHostMsg_ClearBrowserCookies, |
| 312 | OnClearBrowserCookies) |
| 313 | IPC_MESSAGE_UNHANDLED(handled = false) |
| 314 | IPC_END_MESSAGE_MAP() |
| 315 | return handled; |
| 316 | } |
| 317 | |
| 318 | void RenderViewDevToolsAgentHost::OnSaveAgentRuntimeState( |
| 319 | const std::string& state) { |
| 320 | if (!render_view_host_) |
| 321 | return; |
| 322 | state_ = state; |
| 323 | } |
| 324 | |
| 325 | void RenderViewDevToolsAgentHost::OnDispatchOnInspectorFrontend( |
| 326 | const std::string& message) { |
| 327 | if (!render_view_host_) |
| 328 | return; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 329 | DevToolsManagerImpl::GetInstance()->DispatchOnInspectorFrontend( |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 330 | this, message); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 331 | } |
| 332 | |
| 333 | void RenderViewDevToolsAgentHost::OnClearBrowserCache() { |
| 334 | if (render_view_host_) |
| 335 | GetContentClient()->browser()->ClearCache(render_view_host_); |
| 336 | } |
| 337 | |
| 338 | void RenderViewDevToolsAgentHost::OnClearBrowserCookies() { |
| 339 | if (render_view_host_) |
| 340 | GetContentClient()->browser()->ClearCookies(render_view_host_); |
| 341 | } |
| 342 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 343 | } // namespace content |