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

Unified Diff: chrome/browser/extensions/api/settings_private/settings_private_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/settings_private/settings_private_api.cc
diff --git a/chrome/browser/extensions/api/settings_private/settings_private_api.cc b/chrome/browser/extensions/api/settings_private/settings_private_api.cc
index 7a510d00dc25897a063c267b50b3aab78bb607ea..cfacf75e77159376dd2dfcde4ceb1381307ee9af 100644
--- a/chrome/browser/extensions/api/settings_private/settings_private_api.cc
+++ b/chrome/browser/extensions/api/settings_private/settings_private_api.cc
@@ -28,7 +28,7 @@ SettingsPrivateSetPrefFunction::~SettingsPrivateSetPrefFunction() {
}
ExtensionFunction::ResponseAction SettingsPrivateSetPrefFunction::Run() {
- scoped_ptr<api::settings_private::SetPref::Params> parameters =
+ std::unique_ptr<api::settings_private::SetPref::Params> parameters =
api::settings_private::SetPref::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(parameters.get());
@@ -83,7 +83,7 @@ SettingsPrivateGetPrefFunction::~SettingsPrivateGetPrefFunction() {
}
ExtensionFunction::ResponseAction SettingsPrivateGetPrefFunction::Run() {
- scoped_ptr<api::settings_private::GetPref::Params> parameters =
+ std::unique_ptr<api::settings_private::GetPref::Params> parameters =
api::settings_private::GetPref::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(parameters.get());
@@ -92,7 +92,7 @@ ExtensionFunction::ResponseAction SettingsPrivateGetPrefFunction::Run() {
if (delegate == nullptr)
return RespondNow(Error(kDelegateIsNull));
- scoped_ptr<base::Value> value = delegate->GetPref(parameters->name);
+ std::unique_ptr<base::Value> value = delegate->GetPref(parameters->name);
if (value->IsType(base::Value::TYPE_NULL))
return RespondNow(Error("Pref * does not exist", parameters->name));
else
@@ -128,8 +128,9 @@ SettingsPrivateSetDefaultZoomPercentFunction::
ExtensionFunction::ResponseAction
SettingsPrivateSetDefaultZoomPercentFunction::Run() {
- scoped_ptr<api::settings_private::SetDefaultZoomPercent::Params> parameters =
- api::settings_private::SetDefaultZoomPercent::Params::Create(*args_);
+ std::unique_ptr<api::settings_private::SetDefaultZoomPercent::Params>
+ parameters =
+ api::settings_private::SetDefaultZoomPercent::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(parameters.get());
SettingsPrivateDelegate* delegate =

Powered by Google App Engine
This is Rietveld 408576698