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

Unified Diff: content/browser/devtools/render_view_devtools_agent_host.cc

Issue 13305002: Remove redundant DevToolsManager methods and clean up its clients. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 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 side-by-side diff with in-line comments
Download patch
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 3687766c5ea1b797f22dfc48fa232215de13fe5e..839061ce557b030c84c6698469ece4890318f095 100644
--- a/content/browser/devtools/render_view_devtools_agent_host.cc
+++ b/content/browser/devtools/render_view_devtools_agent_host.cc
@@ -99,7 +99,7 @@ bool DevToolsAgentHost::IsDebuggerAttached(WebContents* web_contents) {
RenderViewHost* rvh = (*it)->render_view_host_;
if (rvh && rvh->GetDelegate() != delegate)
continue;
- if (devtools_manager->GetDevToolsClientHostFor(*it))
+ if ((*it)->IsAttached())
return true;
}
return false;
@@ -232,12 +232,11 @@ void RenderViewDevToolsAgentHost::NotifyClientDetaching() {
if (!render_view_host_)
return;
- DevToolsManager* devtools_manager = DevToolsManager::GetInstance();
bool process_has_agents = false;
RenderProcessHost* render_process_host = render_view_host_->GetProcess();
for (Instances::iterator it = g_instances.Get().begin();
it != g_instances.Get().end(); ++it) {
- if (*it == this || !devtools_manager->GetDevToolsClientHostFor(*it))
+ if (*it == this || !(*it)->IsAttached())
continue;
RenderViewHost* rvh = (*it)->render_view_host();
if (rvh && rvh->GetProcess() == render_process_host)
« no previous file with comments | « content/browser/devtools/devtools_manager_unittest.cc ('k') | content/browser/devtools/worker_devtools_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698