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

Unified Diff: base/i18n/file_util_icu.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 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 | « base/files/scoped_file.h ('k') | base/i18n/icu_string_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/file_util_icu.cc
diff --git a/base/i18n/file_util_icu.cc b/base/i18n/file_util_icu.cc
index 4f4e69a389c0193f4a03cafed8490a81297645d7..7b3375e9c0850d7816892059604ac3e879b311cb 100644
--- a/base/i18n/file_util_icu.cc
+++ b/base/i18n/file_util_icu.cc
@@ -8,12 +8,13 @@
#include <stdint.h>
+#include <memory>
+
#include "base/files/file_path.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/i18n/string_compare.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
@@ -56,10 +57,10 @@ class IllegalCharacters {
~IllegalCharacters() { }
// set of characters considered invalid anywhere inside a filename.
- scoped_ptr<icu::UnicodeSet> illegal_anywhere_;
+ std::unique_ptr<icu::UnicodeSet> illegal_anywhere_;
// set of characters considered invalid at either end of a filename.
- scoped_ptr<icu::UnicodeSet> illegal_at_ends_;
+ std::unique_ptr<icu::UnicodeSet> illegal_at_ends_;
DISALLOW_COPY_AND_ASSIGN(IllegalCharacters);
};
@@ -149,7 +150,8 @@ bool LocaleAwareCompareFilenames(const FilePath& a, const FilePath& b) {
UErrorCode error_code = U_ZERO_ERROR;
// Use the default collator. The default locale should have been properly
// set by the time this constructor is called.
- scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(error_code));
+ std::unique_ptr<icu::Collator> collator(
+ icu::Collator::createInstance(error_code));
DCHECK(U_SUCCESS(error_code));
// Make it case-sensitive.
collator->setStrength(icu::Collator::TERTIARY);
« no previous file with comments | « base/files/scoped_file.h ('k') | base/i18n/icu_string_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698