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

Unified Diff: device/nfc/nfc_ndef_record_unittest.cc

Issue 1874313002: Convert device to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 | « device/nfc/nfc_chromeos_unittest.cc ('k') | device/nfc/nfc_ndef_record_utils_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/nfc/nfc_ndef_record_unittest.cc
diff --git a/device/nfc/nfc_ndef_record_unittest.cc b/device/nfc/nfc_ndef_record_unittest.cc
index 38c19e587af58f795ce10be3573e72768db83693..2c105d98293f6ecaba0f074e67d51f110295a38d 100644
--- a/device/nfc/nfc_ndef_record_unittest.cc
+++ b/device/nfc/nfc_ndef_record_unittest.cc
@@ -2,12 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "device/nfc/nfc_ndef_record.h"
+
#include <stddef.h>
#include <stdint.h>
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
#include "base/values.h"
-#include "device/nfc/nfc_ndef_record.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::DictionaryValue;
@@ -30,7 +32,7 @@ const char kTestURI[] = "test://uri";
TEST(NfcNdefRecordTest, PopulateTextRecord) {
DictionaryValue data;
- scoped_ptr<NfcNdefRecord> record(new NfcNdefRecord());
+ std::unique_ptr<NfcNdefRecord> record(new NfcNdefRecord());
// Missing text field. Should fail.
EXPECT_FALSE(record->Populate(NfcNdefRecord::kTypeText, &data));
@@ -82,7 +84,7 @@ TEST(NfcNdefRecordTest, PopulateTextRecord) {
TEST(NfcNdefRecordTest, PopulateUriRecord) {
DictionaryValue data;
- scoped_ptr<NfcNdefRecord> record(new NfcNdefRecord());
+ std::unique_ptr<NfcNdefRecord> record(new NfcNdefRecord());
// Missing URI field. Should fail.
EXPECT_FALSE(record->Populate(NfcNdefRecord::kTypeURI, &data));
@@ -143,7 +145,7 @@ TEST(NfcNdefRecordTest, PopulateUriRecord) {
TEST(NfcNdefRecordTest, PopulateSmartPoster) {
DictionaryValue data;
- scoped_ptr<NfcNdefRecord> record(new NfcNdefRecord());
+ std::unique_ptr<NfcNdefRecord> record(new NfcNdefRecord());
// Missing URI field. Should fail.
EXPECT_FALSE(record->Populate(NfcNdefRecord::kTypeSmartPoster, &data));
« no previous file with comments | « device/nfc/nfc_chromeos_unittest.cc ('k') | device/nfc/nfc_ndef_record_utils_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698