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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 15987009: Update chrome/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index ed9815a804c963ecfa70cbc379c1a8c2829a733e..ec44ef2c9d3f078515761db26cef42d6e1bf42f9 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -195,7 +195,7 @@ namespace {
// Helper to reply asynchronously if |automation| is still valid.
void SendSuccessReply(base::WeakPtr<AutomationProvider> automation,
IPC::Message* reply_message) {
- if (automation)
+ if (automation.get())
AutomationJSONReply(automation.get(), reply_message).SendSuccess(NULL);
}
@@ -208,9 +208,9 @@ void DidEnablePlugin(base::WeakPtr<AutomationProvider> automation,
if (did_enable) {
SendSuccessReply(automation, reply_message);
} else {
- if (automation) {
- AutomationJSONReply(automation.get(), reply_message).SendError(
- base::StringPrintf(error_msg.c_str(), path.c_str()));
+ if (automation.get()) {
+ AutomationJSONReply(automation.get(), reply_message)
+ .SendError(base::StringPrintf(error_msg.c_str(), path.c_str()));
}
}
}
@@ -4040,7 +4040,7 @@ namespace {
void SendSuccessIfAlive(
base::WeakPtr<AutomationProvider> provider,
IPC::Message* reply_message) {
- if (provider)
+ if (provider.get())
AutomationJSONReply(provider.get(), reply_message).SendSuccess(NULL);
}
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/chrome_to_mobile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698