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

Unified Diff: components/autofill/core/common/autofill_regexes.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_regexes.cc
diff --git a/components/autofill/core/common/autofill_regexes.cc b/components/autofill/core/common/autofill_regexes.cc
index 91db50e0798dfe608ceb3aeb73ddbfa0582ba818..dc3dd58e04b26c5645cb91cf6f810c74e1687123 100644
--- a/components/autofill/core/common/autofill_regexes.cc
+++ b/components/autofill/core/common/autofill_regexes.cc
@@ -4,12 +4,12 @@
#include "components/autofill/core/common/autofill_regexes.h"
+#include <memory>
#include <utility>
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/strings/string16.h"
#include "third_party/icu/source/i18n/unicode/regex.h"
@@ -30,7 +30,7 @@ class AutofillRegexes {
friend struct base::DefaultSingletonTraits<AutofillRegexes>;
// Maps patterns to their corresponding regex matchers.
- base::ScopedPtrHashMap<base::string16, scoped_ptr<icu::RegexMatcher>>
+ base::ScopedPtrHashMap<base::string16, std::unique_ptr<icu::RegexMatcher>>
matchers_;
DISALLOW_COPY_AND_ASSIGN(AutofillRegexes);
@@ -53,7 +53,7 @@ icu::RegexMatcher* AutofillRegexes::GetMatcher(const base::string16& pattern) {
const icu::UnicodeString icu_pattern(pattern.data(), pattern.length());
UErrorCode status = U_ZERO_ERROR;
- scoped_ptr<icu::RegexMatcher> matcher(
+ std::unique_ptr<icu::RegexMatcher> matcher(
new icu::RegexMatcher(icu_pattern, UREGEX_CASE_INSENSITIVE, status));
DCHECK(U_SUCCESS(status));
« no previous file with comments | « components/autofill/core/common/autofill_l10n_util.cc ('k') | components/autofill/core/common/password_form.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698