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

Unified Diff: content/renderer/pepper/pepper_broker_impl.cc

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code 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: content/renderer/pepper/pepper_broker_impl.cc
diff --git a/content/renderer/pepper/pepper_broker_impl.cc b/content/renderer/pepper/pepper_broker_impl.cc
index 550c3be9fb0395dbd18119b7eca7380e04bf00e2..842c56f5a60360e18a3b9e1b02ce1405356da4ef 100644
--- a/content/renderer/pepper/pepper_broker_impl.cc
+++ b/content/renderer/pepper/pepper_broker_impl.cc
@@ -112,7 +112,7 @@ PepperBrokerImpl::PepperBrokerImpl(webkit::ppapi::PluginModule* plugin_module,
: plugin_module_(plugin_module),
delegate_(delegate->AsWeakPtr()) {
DCHECK(plugin_module_);
- DCHECK(delegate_);
+ DCHECK(delegate_.get());
plugin_module_->SetBroker(this);
}
@@ -161,7 +161,7 @@ void PepperBrokerImpl::Disconnect(webkit::ppapi::PPB_Broker_Impl* client) {
// instance of this object.
// This doesn't solve all potential problems, but it helps with the ones
// we can influence.
- if (delegate_) {
+ if (delegate_.get()) {
bool stopped = delegate_->StopWaitingForBrokerConnection(this);
// Verify the assumption that there are no references other than the one
@@ -197,8 +197,8 @@ void PepperBrokerImpl::OnBrokerChannelConnected(
continue;
}
- if (weak_ptr)
- ConnectPluginToBroker(weak_ptr);
+ if (weak_ptr.get())
+ ConnectPluginToBroker(weak_ptr.get());
pending_connects_.erase(i++);
}
@@ -211,7 +211,7 @@ void PepperBrokerImpl::OnBrokerPermissionResult(
if (entry == pending_connects_.end())
return;
- if (!entry->second.client) {
+ if (!entry->second.client.get()) {
// Client has gone away.
pending_connects_.erase(entry);
return;
@@ -251,7 +251,7 @@ void PepperBrokerImpl::ReportFailureToClients(int error_code) {
i != pending_connects_.end(); ++i) {
base::WeakPtr<webkit::ppapi::PPB_Broker_Impl>& weak_ptr =
i->second.client;
- if (weak_ptr) {
+ if (weak_ptr.get()) {
weak_ptr->BrokerConnected(
ppapi::PlatformFileToInt(base::kInvalidPlatformFileValue),
error_code);
« no previous file with comments | « content/renderer/media/renderer_gpu_video_decoder_factories.cc ('k') | content/renderer/pepper/pepper_file_chooser_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698