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

Unified Diff: components/autofill/core/browser/phone_field_unittest.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/browser/phone_field_unittest.cc
diff --git a/components/autofill/core/browser/phone_field_unittest.cc b/components/autofill/core/browser/phone_field_unittest.cc
index 2649cb0af884cb57b1777e60b00208930b2e1ef0..b32bbdc996d8d8a680b00e1bc056c89cdefaa2de 100644
--- a/components/autofill/core/browser/phone_field_unittest.cc
+++ b/components/autofill/core/browser/phone_field_unittest.cc
@@ -2,15 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/autofill/core/browser/phone_field.h"
+
#include <stddef.h>
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/autofill_scanner.h"
-#include "components/autofill/core/browser/phone_field.h"
#include "components/autofill/core/common/form_field_data.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -34,9 +37,9 @@ class PhoneFieldTest : public testing::Test {
protected:
// Downcast for tests.
- static scoped_ptr<PhoneField> Parse(AutofillScanner* scanner) {
- scoped_ptr<FormField> field = PhoneField::Parse(scanner);
- return make_scoped_ptr(static_cast<PhoneField*>(field.release()));
+ static std::unique_ptr<PhoneField> Parse(AutofillScanner* scanner) {
+ std::unique_ptr<FormField> field = PhoneField::Parse(scanner);
+ return base::WrapUnique(static_cast<PhoneField*>(field.release()));
}
void Clear() {
@@ -53,7 +56,7 @@ class PhoneFieldTest : public testing::Test {
}
ScopedVector<AutofillField> list_;
- scoped_ptr<PhoneField> field_;
+ std::unique_ptr<PhoneField> field_;
FieldCandidatesMap field_candidates_map_;
private:
« no previous file with comments | « components/autofill/core/browser/phone_field.cc ('k') | components/autofill/core/browser/phone_number_i18n.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698