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

Unified Diff: components/autofill/core/common/autofill_l10n_util.cc

Issue 1859453002: components/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed 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: components/autofill/core/common/autofill_l10n_util.cc
diff --git a/components/autofill/core/common/autofill_l10n_util.cc b/components/autofill/core/common/autofill_l10n_util.cc
index dda5a328019bf2a88644f708d56869851ba556dd..9ab031f12fbfe8b74a1cfc16a1c1ae99fffa72d6 100644
--- a/components/autofill/core/common/autofill_l10n_util.cc
+++ b/components/autofill/core/common/autofill_l10n_util.cc
@@ -9,14 +9,15 @@
#include "base/i18n/string_compare.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
namespace autofill {
namespace l10n {
-scoped_ptr<icu::Collator> GetCollatorForLocale(const icu::Locale& locale) {
+std::unique_ptr<icu::Collator> GetCollatorForLocale(const icu::Locale& locale) {
UErrorCode ignored = U_ZERO_ERROR;
- scoped_ptr<icu::Collator> collator(
+ std::unique_ptr<icu::Collator> collator(
icu::Collator::createInstance(locale, ignored));
if (!collator) {
// On some systems, the default locale is invalid to the eyes of the ICU
@@ -30,7 +31,7 @@ scoped_ptr<icu::Collator> GetCollatorForLocale(const icu::Locale& locale) {
<< locale_name;
// Attempt to load the English locale.
- collator = make_scoped_ptr(
+ collator = base::WrapUnique(
icu::Collator::createInstance(icu::Locale::getEnglish(), ignored));
if (!collator) {
LOG(ERROR) << "Failed to initialize the ICU Collator with the English "
« no previous file with comments | « components/autofill/core/common/autofill_l10n_util.h ('k') | components/autofill/core/common/autofill_regexes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698