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

Unified Diff: ui/base/l10n/l10n_util_collator.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/base/l10n/l10n_util.cc ('k') | ui/base/l10n/l10n_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util_collator.h
diff --git a/ui/base/l10n/l10n_util_collator.h b/ui/base/l10n/l10n_util_collator.h
index 423f17a50da9b2b89ec58a8240f9abfdc9951210..504bb9003fb2d4820e57ee6eaf3e5805d25c86dc 100644
--- a/ui/base/l10n/l10n_util_collator.h
+++ b/ui/base/l10n/l10n_util_collator.h
@@ -9,11 +9,11 @@
#include <algorithm>
#include <functional>
+#include <memory>
#include <string>
#include <vector>
#include "base/i18n/string_compare.h"
-#include "base/memory/scoped_ptr.h"
#include "third_party/icu/source/i18n/unicode/coll.h"
#include "ui/base/ui_base_export.h"
@@ -65,7 +65,8 @@ void SortStringsUsingMethod(const std::string& locale,
Method method) {
UErrorCode error = U_ZERO_ERROR;
icu::Locale loc(locale.c_str());
- scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(loc, error));
+ std::unique_ptr<icu::Collator> collator(
+ icu::Collator::createInstance(loc, error));
if (U_FAILURE(error)) {
sort(elements->begin(), elements->end(),
StringMethodComparator<T, Method>(method));
@@ -128,7 +129,8 @@ void SortVectorWithStringKey(const std::string& locale,
DCHECK_LE(end_index, elements->size());
UErrorCode error = U_ZERO_ERROR;
icu::Locale loc(locale.c_str());
- scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(loc, error));
+ std::unique_ptr<icu::Collator> collator(
+ icu::Collator::createInstance(loc, error));
if (U_FAILURE(error))
collator.reset();
StringComparator<Element> c(collator.get());
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | ui/base/l10n/l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698