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

Unified Diff: extensions/common/extension_l10n_util.cc

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? 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
« no previous file with comments | « extensions/common/extension_builder.cc ('k') | extensions/common/extension_l10n_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_l10n_util.cc
diff --git a/extensions/common/extension_l10n_util.cc b/extensions/common/extension_l10n_util.cc
index a423ba59563c40e40f67677119f9454b1776537c..492f283231cbf11646e6cff379ddaaca87058250 100644
--- a/extensions/common/extension_l10n_util.cc
+++ b/extensions/common/extension_l10n_util.cc
@@ -41,8 +41,9 @@ base::DictionaryValue* LoadMessageFile(const base::FilePath& locale_path,
base::FilePath file =
locale_path.AppendASCII(locale).Append(extensions::kMessagesFilename);
JSONFileValueDeserializer messages_deserializer(file);
- scoped_ptr<base::DictionaryValue> dictionary = base::DictionaryValue::From(
- messages_deserializer.Deserialize(NULL, error));
+ std::unique_ptr<base::DictionaryValue> dictionary =
+ base::DictionaryValue::From(
+ messages_deserializer.Deserialize(NULL, error));
if (!dictionary) {
if (error->empty()) {
// JSONFileValueSerializer just returns NULL if file cannot be found. It
@@ -265,9 +266,9 @@ bool LocalizeExtension(const base::FilePath& extension_path,
std::string default_locale = GetDefaultLocaleFromManifest(*manifest, error);
- scoped_ptr<extensions::MessageBundle> message_bundle(
- extensions::file_util::LoadMessageBundle(
- extension_path, default_locale, error));
+ std::unique_ptr<extensions::MessageBundle> message_bundle(
+ extensions::file_util::LoadMessageBundle(extension_path, default_locale,
+ error));
if (!message_bundle.get() && !error->empty())
return false;
@@ -415,7 +416,7 @@ bool ValidateExtensionLocales(const base::FilePath& extension_path,
locale != valid_locales.end();
++locale) {
std::string locale_error;
- scoped_ptr<base::DictionaryValue> catalog(
+ std::unique_ptr<base::DictionaryValue> catalog(
LoadMessageFile(locale_path, *locale, &locale_error));
if (!locale_error.empty()) {
« no previous file with comments | « extensions/common/extension_builder.cc ('k') | extensions/common/extension_l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698