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

Unified Diff: ppapi/proxy/message_handler.cc

Issue 1864293002: Convert //ppapi to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more nullptr Created 4 years, 8 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/proxy/message_handler.h ('k') | ppapi/proxy/nacl_message_scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/message_handler.cc
diff --git a/ppapi/proxy/message_handler.cc b/ppapi/proxy/message_handler.cc
index b2f3929c248a5f4a343ec2ee4ba4c3a206621c78..909123b92a03234cabde6ca83e2f7cd2a6839613 100644
--- a/ppapi/proxy/message_handler.cc
+++ b/ppapi/proxy/message_handler.cc
@@ -36,7 +36,7 @@ void HandleBlockingMessageWrapper(HandleBlockingMessageFunc function,
PP_Instance instance,
void* user_data,
ScopedPPVar message_data,
- scoped_ptr<IPC::Message> reply_msg) {
+ std::unique_ptr<IPC::Message> reply_msg) {
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
if (!dispatcher)
return;
@@ -57,13 +57,13 @@ void HandleBlockingMessageWrapper(HandleBlockingMessageFunc function,
} // namespace
// static
-scoped_ptr<MessageHandler> MessageHandler::Create(
- PP_Instance instance,
- const PPP_MessageHandler_0_2* handler_if,
- void* user_data,
- PP_Resource message_loop,
- int32_t* error) {
- scoped_ptr<MessageHandler> result;
+std::unique_ptr<MessageHandler> MessageHandler::Create(
+ PP_Instance instance,
+ const PPP_MessageHandler_0_2* handler_if,
+ void* user_data,
+ PP_Resource message_loop,
+ int32_t* error) {
+ std::unique_ptr<MessageHandler> result;
// The interface and all function pointers must be valid.
if (!handler_if ||
!handler_if->HandleMessage ||
@@ -113,8 +113,9 @@ void MessageHandler::HandleMessage(ScopedPPVar var) {
instance_, user_data_, var)));
}
-void MessageHandler::HandleBlockingMessage(ScopedPPVar var,
- scoped_ptr<IPC::Message> reply_msg) {
+void MessageHandler::HandleBlockingMessage(
+ ScopedPPVar var,
+ std::unique_ptr<IPC::Message> reply_msg) {
message_loop_->task_runner()->PostTask(
FROM_HERE,
RunWhileLocked(base::Bind(
« no previous file with comments | « ppapi/proxy/message_handler.h ('k') | ppapi/proxy/nacl_message_scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698