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

Unified Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 502293002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/devtools/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « chrome/browser/devtools/devtools_sanity_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « chrome/browser/devtools/devtools_sanity_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698