Index: chrome/browser/devtools/devtools_ui_bindings.cc |
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc |
index d29d181d27d16a8768b05e9fa06a5f251edf0c4d..d4b9c9ba14beb58d3bf4777bdeb3de310f63cef0 100644 |
--- a/chrome/browser/devtools/devtools_ui_bindings.cc |
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc |
@@ -258,7 +258,7 @@ void DevToolsUIBindings::FrontendWebContentsObserver::RenderProcessGone( |
case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: |
case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: |
case base::TERMINATION_STATUS_PROCESS_CRASHED: |
- if (devtools_bindings_->agent_host_) |
+ if (devtools_bindings_->agent_host_.get()) |
devtools_bindings_->Detach(); |
break; |
default: |
@@ -354,7 +354,7 @@ DevToolsUIBindings::DevToolsUIBindings(content::WebContents* web_contents) |
} |
DevToolsUIBindings::~DevToolsUIBindings() { |
- if (agent_host_) |
+ if (agent_host_.get()) |
agent_host_->DetachClient(); |
for (IndexingJobsMap::const_iterator jobs_it(indexing_jobs_.begin()); |
@@ -414,7 +414,7 @@ void DevToolsUIBindings::HandleMessageFromDevToolsFrontend( |
void DevToolsUIBindings::HandleMessageFromDevToolsFrontendToBackend( |
const std::string& message) { |
- if (agent_host_) |
+ if (agent_host_.get()) |
agent_host_->DispatchProtocolMessage(message); |
} |
@@ -638,7 +638,7 @@ void DevToolsUIBindings::SetDevicesUpdatesEnabled(bool enabled) { |
} |
void DevToolsUIBindings::SendMessageToBrowser(const std::string& message) { |
- if (agent_host_) |
+ if (agent_host_.get()) |
agent_host_->DispatchProtocolMessage(message); |
} |
@@ -794,26 +794,26 @@ void DevToolsUIBindings::SetDelegate(Delegate* delegate) { |
} |
void DevToolsUIBindings::AttachTo(content::DevToolsAgentHost* agent_host) { |
- if (agent_host_) |
+ if (agent_host_.get()) |
Detach(); |
agent_host_ = agent_host; |
agent_host_->AttachClient(this); |
} |
void DevToolsUIBindings::Reattach() { |
- DCHECK(agent_host_); |
+ DCHECK(agent_host_.get()); |
agent_host_->DetachClient(); |
agent_host_->AttachClient(this); |
} |
void DevToolsUIBindings::Detach() { |
- if (agent_host_) |
+ if (agent_host_.get()) |
agent_host_->DetachClient(); |
agent_host_ = NULL; |
} |
bool DevToolsUIBindings::IsAttachedTo(content::DevToolsAgentHost* agent_host) { |
- return agent_host_ == agent_host; |
+ return agent_host_.get() == agent_host; |
} |
void DevToolsUIBindings::CallClientFunction(const std::string& function_name, |