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

Unified Diff: chrome/browser/extensions/api/font_settings/font_settings_api.cc

Issue 2806283002: Revert of Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Created 3 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/font_settings/font_settings_api.cc
diff --git a/chrome/browser/extensions/api/font_settings/font_settings_api.cc b/chrome/browser/extensions/api/font_settings/font_settings_api.cc
index b3e2457e5cc9210fb477e05f2c6af6ac9cd1f7c1..b417664a7ef3dd09481fdc5f33497f7f4bf5ef34 100644
--- a/chrome/browser/extensions/api/font_settings/font_settings_api.cc
+++ b/chrome/browser/extensions/api/font_settings/font_settings_api.cc
@@ -15,7 +15,6 @@
#include "base/command_line.h"
#include "base/json/json_writer.h"
#include "base/lazy_instance.h"
-#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -187,7 +186,7 @@
base::ListValue args;
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
- dict->Set(key, pref->GetValue()->CreateDeepCopy());
+ dict->Set(key, pref->GetValue()->DeepCopy());
args.Append(std::move(dict));
extensions::preference_helpers::DispatchEventToExtensions(
@@ -320,9 +319,8 @@
std::unique_ptr<base::DictionaryValue> font_name(
new base::DictionaryValue());
- font_name->Set(kFontIdKey, base::MakeUnique<base::Value>(name));
- font_name->Set(kDisplayNameKey,
- base::MakeUnique<base::Value>(localized_name));
+ font_name->Set(kFontIdKey, new base::Value(name));
+ font_name->Set(kDisplayNameKey, new base::Value(localized_name));
result->Append(std::move(font_name));
}
@@ -355,7 +353,7 @@
profile, extension_id(), GetPrefName(), kIncognito);
std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
- result->Set(GetKey(), pref->GetValue()->CreateDeepCopy());
+ result->Set(GetKey(), pref->GetValue()->DeepCopy());
result->SetString(kLevelOfControlKey, level_of_control);
return RespondNow(OneArgument(std::move(result)));
}

Powered by Google App Engine
This is Rietveld 408576698