| Index: content/browser/devtools/render_frame_devtools_agent_host.cc
|
| diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
|
| index 1ff54defe1e9d8c58981b4db9fc3ac9d8f1b988b..62adf6fb220a075f3f616e56f458b3a9d9d5e9a7 100644
|
| --- a/content/browser/devtools/render_frame_devtools_agent_host.cc
|
| +++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
|
| @@ -56,16 +56,16 @@
|
|
|
| namespace content {
|
|
|
| -typedef std::vector<RenderFrameDevToolsAgentHost*> Instances;
|
| +typedef std::vector<RenderFrameDevToolsAgentHost*> AgentHostArray;
|
|
|
| namespace {
|
| -base::LazyInstance<Instances>::Leaky g_instances = LAZY_INSTANCE_INITIALIZER;
|
| +base::LazyInstance<AgentHostArray>::Leaky g_agent_host_instances = LAZY_INSTANCE_INITIALIZER;
|
|
|
| RenderFrameDevToolsAgentHost* FindAgentHost(FrameTreeNode* frame_tree_node) {
|
| - if (g_instances == NULL)
|
| + if (g_agent_host_instances == NULL)
|
| return NULL;
|
| - for (Instances::iterator it = g_instances.Get().begin();
|
| - it != g_instances.Get().end(); ++it) {
|
| + for (AgentHostArray::iterator it = g_agent_host_instances.Get().begin();
|
| + it != g_agent_host_instances.Get().end(); ++it) {
|
| if ((*it)->frame_tree_node() == frame_tree_node)
|
| return *it;
|
| }
|
| @@ -462,7 +462,7 @@ RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost(
|
| current_frame_crashed_ = true;
|
| }
|
|
|
| - g_instances.Get().push_back(this);
|
| + g_agent_host_instances.Get().push_back(this);
|
| AddRef(); // Balanced in RenderFrameHostDestroyed.
|
|
|
| NotifyCreated();
|
| @@ -647,11 +647,11 @@ void RenderFrameDevToolsAgentHost::OnClientsDetached() {
|
| }
|
|
|
| RenderFrameDevToolsAgentHost::~RenderFrameDevToolsAgentHost() {
|
| - Instances::iterator it = std::find(g_instances.Get().begin(),
|
| - g_instances.Get().end(),
|
| + AgentHostArray::iterator it = std::find(g_agent_host_instances.Get().begin(),
|
| + g_agent_host_instances.Get().end(),
|
| this);
|
| - if (it != g_instances.Get().end())
|
| - g_instances.Get().erase(it);
|
| + if (it != g_agent_host_instances.Get().end())
|
| + g_agent_host_instances.Get().erase(it);
|
| }
|
|
|
| void RenderFrameDevToolsAgentHost::ReadyToCommitNavigation(
|
| @@ -786,7 +786,7 @@ void RenderFrameDevToolsAgentHost::RevokePolicy(RenderFrameHostImpl* host) {
|
|
|
| bool process_has_agents = false;
|
| RenderProcessHost* process_host = host->GetProcess();
|
| - for (RenderFrameDevToolsAgentHost* agent : g_instances.Get()) {
|
| + for (RenderFrameDevToolsAgentHost* agent : g_agent_host_instances.Get()) {
|
| if (!agent->IsAttached())
|
| continue;
|
| if (IsBrowserSideNavigationEnabled()) {
|
|
|