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

Unified Diff: chrome/browser/extensions/api/notification_provider/notification_provider_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/notification_provider/notification_provider_api.cc
diff --git a/chrome/browser/extensions/api/notification_provider/notification_provider_api.cc b/chrome/browser/extensions/api/notification_provider/notification_provider_api.cc
index 4b30b9046aa8b241bfa9bac93593993025b331c3..01de9042518bc4141439f19f9426458c0881507b 100644
--- a/chrome/browser/extensions/api/notification_provider/notification_provider_api.cc
+++ b/chrome/browser/extensions/api/notification_provider/notification_provider_api.cc
@@ -61,11 +61,11 @@ void NotificationProviderEventRouter::Create(
const std::string& sender_id,
const std::string& notification_id,
const api::notifications::NotificationOptions& options) {
- scoped_ptr<base::ListValue> args =
- api::notification_provider::OnCreated::Create(
- sender_id, notification_id, options);
+ std::unique_ptr<base::ListValue> args =
+ api::notification_provider::OnCreated::Create(sender_id, notification_id,
+ options);
- scoped_ptr<Event> event(new Event(
+ std::unique_ptr<Event> event(new Event(
events::NOTIFICATION_PROVIDER_ON_CREATED,
api::notification_provider::OnCreated::kEventName, std::move(args)));
@@ -78,11 +78,11 @@ void NotificationProviderEventRouter::Update(
const std::string& sender_id,
const std::string& notification_id,
const api::notifications::NotificationOptions& options) {
- scoped_ptr<base::ListValue> args =
- api::notification_provider::OnUpdated::Create(
- sender_id, notification_id, options);
+ std::unique_ptr<base::ListValue> args =
+ api::notification_provider::OnUpdated::Create(sender_id, notification_id,
+ options);
- scoped_ptr<Event> event(new Event(
+ std::unique_ptr<Event> event(new Event(
events::NOTIFICATION_PROVIDER_ON_UPDATED,
api::notification_provider::OnUpdated::kEventName, std::move(args)));
@@ -94,10 +94,10 @@ void NotificationProviderEventRouter::Clear(
const std::string& notification_provider_id,
const std::string& sender_id,
const std::string& notification_id) {
- scoped_ptr<base::ListValue> args =
+ std::unique_ptr<base::ListValue> args =
api::notification_provider::OnCleared::Create(sender_id, notification_id);
- scoped_ptr<Event> event(new Event(
+ std::unique_ptr<Event> event(new Event(
events::NOTIFICATION_PROVIDER_ON_CLEARED,
api::notification_provider::OnCleared::kEventName, std::move(args)));
@@ -115,7 +115,7 @@ NotificationProviderNotifyOnClearedFunction::
ExtensionFunction::ResponseAction
NotificationProviderNotifyOnClearedFunction::Run() {
- scoped_ptr<api::notification_provider::NotifyOnCleared::Params> params =
+ std::unique_ptr<api::notification_provider::NotifyOnCleared::Params> params =
api::notification_provider::NotifyOnCleared::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -143,7 +143,7 @@ NotificationProviderNotifyOnClickedFunction::
ExtensionFunction::ResponseAction
NotificationProviderNotifyOnClickedFunction::Run() {
- scoped_ptr<api::notification_provider::NotifyOnClicked::Params> params =
+ std::unique_ptr<api::notification_provider::NotifyOnClicked::Params> params =
api::notification_provider::NotifyOnClicked::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -171,8 +171,10 @@ NotificationProviderNotifyOnButtonClickedFunction::
ExtensionFunction::ResponseAction
NotificationProviderNotifyOnButtonClickedFunction::Run() {
- scoped_ptr<api::notification_provider::NotifyOnButtonClicked::Params> params =
- api::notification_provider::NotifyOnButtonClicked::Params::Create(*args_);
+ std::unique_ptr<api::notification_provider::NotifyOnButtonClicked::Params>
+ params =
+ api::notification_provider::NotifyOnButtonClicked::Params::Create(
+ *args_);
EXTENSION_FUNCTION_VALIDATE(params.get());
const Notification* notification =
@@ -199,7 +201,8 @@ NotificationProviderNotifyOnPermissionLevelChangedFunction::
ExtensionFunction::ResponseAction
NotificationProviderNotifyOnPermissionLevelChangedFunction::Run() {
- scoped_ptr<api::notification_provider::NotifyOnPermissionLevelChanged::Params>
+ std::unique_ptr<
+ api::notification_provider::NotifyOnPermissionLevelChanged::Params>
params = api::notification_provider::NotifyOnPermissionLevelChanged::
Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -241,8 +244,9 @@ NotificationProviderNotifyOnShowSettingsFunction::
ExtensionFunction::ResponseAction
NotificationProviderNotifyOnShowSettingsFunction::Run() {
- scoped_ptr<api::notification_provider::NotifyOnShowSettings::Params> params =
- api::notification_provider::NotifyOnShowSettings::Params::Create(*args_);
+ std::unique_ptr<api::notification_provider::NotifyOnShowSettings::Params>
+ params = api::notification_provider::NotifyOnShowSettings::Params::Create(
+ *args_);
EXTENSION_FUNCTION_VALIDATE(params.get());
bool has_advanced_settings;

Powered by Google App Engine
This is Rietveld 408576698