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

Unified Diff: chrome/browser/extensions/api/settings_private/settings_private_delegate.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_delegate.cc
diff --git a/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc b/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
index 5cf66b8b12af4d68a84ee61c66671458ca736af5..8395e36b08fed1d267a119e0ebb8d12a6ca4c15a 100644
--- a/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
+++ b/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
@@ -31,21 +31,21 @@ SettingsPrivateDelegate::SettingsPrivateDelegate(Profile* profile)
SettingsPrivateDelegate::~SettingsPrivateDelegate() {
}
-scoped_ptr<base::Value> SettingsPrivateDelegate::GetPref(
+std::unique_ptr<base::Value> SettingsPrivateDelegate::GetPref(
const std::string& name) {
- scoped_ptr<api::settings_private::PrefObject> pref =
+ std::unique_ptr<api::settings_private::PrefObject> pref =
prefs_util_->GetPref(name);
if (!pref)
return base::Value::CreateNullValue();
return pref->ToValue();
}
-scoped_ptr<base::Value> SettingsPrivateDelegate::GetAllPrefs() {
- scoped_ptr<base::ListValue> prefs(new base::ListValue());
+std::unique_ptr<base::Value> SettingsPrivateDelegate::GetAllPrefs() {
+ std::unique_ptr<base::ListValue> prefs(new base::ListValue());
const TypedPrefMap& keys = prefs_util_->GetWhitelistedKeys();
for (const auto& it : keys) {
- scoped_ptr<base::Value> pref = GetPref(it.first);
+ std::unique_ptr<base::Value> pref = GetPref(it.first);
if (!pref->IsType(base::Value::TYPE_NULL))
prefs->Append(pref.release());
}
@@ -58,10 +58,10 @@ PrefsUtil::SetPrefResult SettingsPrivateDelegate::SetPref(
return prefs_util_->SetPref(pref_name, value);
}
-scoped_ptr<base::Value> SettingsPrivateDelegate::GetDefaultZoomPercent() {
+std::unique_ptr<base::Value> SettingsPrivateDelegate::GetDefaultZoomPercent() {
double zoom = content::ZoomLevelToZoomFactor(
profile_->GetZoomLevelPrefs()->GetDefaultZoomLevelPref()) * 100;
- scoped_ptr<base::Value> value(new base::FundamentalValue(zoom));
+ std::unique_ptr<base::Value> value(new base::FundamentalValue(zoom));
return value;
}

Powered by Google App Engine
This is Rietveld 408576698