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

Unified Diff: ppapi/host/ppapi_host.cc

Issue 1649623002: Update ppapi to not use linked_ptr or ScopedVector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark RawVarDataGraph as DISALLOW_COPY_AND_ASSIGN Created 4 years, 11 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 | « ppapi/host/ppapi_host.h ('k') | ppapi/proxy/raw_var_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/host/ppapi_host.cc
diff --git a/ppapi/host/ppapi_host.cc b/ppapi/host/ppapi_host.cc
index b8a1a01ce6797b4b0e27716ff60d93a5199d749d..a194c235f0ac306ee6efc9ed29705d64bf9f1011 100644
--- a/ppapi/host/ppapi_host.cc
+++ b/ppapi/host/ppapi_host.cc
@@ -6,6 +6,8 @@
#include <stddef.h>
+#include <utility>
+
#include "base/logging.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/host_factory.h"
@@ -152,18 +154,17 @@ int PpapiHost::AddPendingResourceHost(scoped_ptr<ResourceHost> resource_host) {
}
int pending_id = next_pending_resource_host_id_++;
- pending_resource_hosts_[pending_id] =
- linked_ptr<ResourceHost>(resource_host.release());
+ pending_resource_hosts_[pending_id] = std::move(resource_host);
return pending_id;
}
void PpapiHost::AddHostFactoryFilter(scoped_ptr<HostFactory> filter) {
- host_factory_filters_.push_back(filter.release());
+ host_factory_filters_.push_back(std::move(filter));
}
void PpapiHost::AddInstanceMessageFilter(
scoped_ptr<InstanceMessageFilter> filter) {
- instance_message_filters_.push_back(filter.release());
+ instance_message_filters_.push_back(std::move(filter));
}
void PpapiHost::OnHostMsgResourceCall(
@@ -245,8 +246,7 @@ void PpapiHost::OnHostMsgResourceCreated(
// Resource should have been assigned a nonzero PP_Resource.
DCHECK(resource_host->pp_resource());
- resources_[params.pp_resource()] =
- linked_ptr<ResourceHost>(resource_host.release());
+ resources_[params.pp_resource()] = std::move(resource_host);
}
void PpapiHost::OnHostMsgAttachToPendingHost(PP_Resource pp_resource,
@@ -259,7 +259,7 @@ void PpapiHost::OnHostMsgAttachToPendingHost(PP_Resource pp_resource,
return;
}
found->second->SetPPResourceForPendingHost(pp_resource);
- resources_[pp_resource] = found->second;
+ resources_[pp_resource] = std::move(found->second);
pending_resource_hosts_.erase(found);
}
@@ -274,7 +274,7 @@ void PpapiHost::OnHostMsgResourceDestroyed(PP_Resource resource) {
// element will be there or not. Therefore, we delay destruction of the
// HostResource until after we've made sure the map no longer contains
// |resource|.
- linked_ptr<ResourceHost> delete_at_end_of_scope(found->second);
+ scoped_ptr<ResourceHost> delete_at_end_of_scope(std::move(found->second));
resources_.erase(found);
}
« no previous file with comments | « ppapi/host/ppapi_host.h ('k') | ppapi/proxy/raw_var_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698