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

Unified Diff: chrome/browser/extensions/api/gcm/gcm_api.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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
Index: chrome/browser/extensions/api/gcm/gcm_api.cc
diff --git a/chrome/browser/extensions/api/gcm/gcm_api.cc b/chrome/browser/extensions/api/gcm/gcm_api.cc
index abb68abb8de3c8b97dd5c7314590ba0920fcb398..cebe90e0833314bd2d7d4cc64058fba5b51655d3 100644
--- a/chrome/browser/extensions/api/gcm/gcm_api.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_api.cc
@@ -112,7 +112,7 @@ GcmRegisterFunction::GcmRegisterFunction() {}
GcmRegisterFunction::~GcmRegisterFunction() {}
bool GcmRegisterFunction::DoWork() {
- scoped_ptr<api::gcm::Register::Params> params(
+ std::unique_ptr<api::gcm::Register::Params> params(
api::gcm::Register::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -157,7 +157,7 @@ GcmSendFunction::GcmSendFunction() {}
GcmSendFunction::~GcmSendFunction() {}
bool GcmSendFunction::DoWork() {
- scoped_ptr<api::gcm::Send::Params> params(
+ std::unique_ptr<api::gcm::Send::Params> params(
api::gcm::Send::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
EXTENSION_FUNCTION_VALIDATE(
@@ -217,7 +217,7 @@ void GcmJsEventRouter::OnMessage(const std::string& app_id,
if (!message.collapse_key.empty())
message_arg.collapse_key.reset(new std::string(message.collapse_key));
- scoped_ptr<Event> event(
+ std::unique_ptr<Event> event(
new Event(events::GCM_ON_MESSAGE, api::gcm::OnMessage::kEventName,
api::gcm::OnMessage::Create(message_arg), profile_));
EventRouter::Get(profile_)
@@ -225,7 +225,7 @@ void GcmJsEventRouter::OnMessage(const std::string& app_id,
}
void GcmJsEventRouter::OnMessagesDeleted(const std::string& app_id) {
- scoped_ptr<Event> event(new Event(
+ std::unique_ptr<Event> event(new Event(
events::GCM_ON_MESSAGES_DELETED, api::gcm::OnMessagesDeleted::kEventName,
api::gcm::OnMessagesDeleted::Create(), profile_));
EventRouter::Get(profile_)
@@ -240,7 +240,7 @@ void GcmJsEventRouter::OnSendError(
error.error_message = GcmResultToError(send_error_details.result);
error.details.additional_properties = send_error_details.additional_data;
- scoped_ptr<Event> event(
+ std::unique_ptr<Event> event(
new Event(events::GCM_ON_SEND_ERROR, api::gcm::OnSendError::kEventName,
api::gcm::OnSendError::Create(error), profile_));
EventRouter::Get(profile_)

Powered by Google App Engine
This is Rietveld 408576698