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

Unified Diff: components/wifi_sync/wifi_credential_syncable_service_unittest.cc

Issue 1917673002: Convert //components/[u-z]* from scoped_ptr 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
Index: components/wifi_sync/wifi_credential_syncable_service_unittest.cc
diff --git a/components/wifi_sync/wifi_credential_syncable_service_unittest.cc b/components/wifi_sync/wifi_credential_syncable_service_unittest.cc
index 3b15dc772511e86f9610b33360ce27584a425a10..bbcfa79a0fc81859cf9d29f282d812524a55a555 100644
--- a/components/wifi_sync/wifi_credential_syncable_service_unittest.cc
+++ b/components/wifi_sync/wifi_credential_syncable_service_unittest.cc
@@ -5,12 +5,14 @@
#include "components/wifi_sync/wifi_credential_syncable_service.h"
#include <stdint.h>
+
+#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/time/time.h"
#include "base/tracked_objects.h"
#include "components/wifi_sync/wifi_config_delegate.h"
@@ -67,7 +69,7 @@ class WifiCredentialSyncableServiceTest : public testing::Test {
: config_delegate_(new FakeWifiConfigDelegate()),
change_processor_(nullptr) {
syncable_service_.reset(
- new WifiCredentialSyncableService(make_scoped_ptr(config_delegate_)));
+ new WifiCredentialSyncableService(base::WrapUnique(config_delegate_)));
}
// Wrappers for methods in WifiCredentialSyncableService.
@@ -97,7 +99,7 @@ class WifiCredentialSyncableServiceTest : public testing::Test {
WifiCredential MakeCredential(const std::string& ssid,
WifiSecurityClass security_class,
const std::string& passphrase) {
- scoped_ptr<WifiCredential> credential = WifiCredential::Create(
+ std::unique_ptr<WifiCredential> credential = WifiCredential::Create(
WifiCredential::MakeSsidBytesForTest(ssid), security_class, passphrase);
CHECK(credential);
return *credential;
@@ -139,17 +141,17 @@ class WifiCredentialSyncableServiceTest : public testing::Test {
}
void StartSyncing() {
- scoped_ptr<FakeSyncChangeProcessor> change_processor(
+ std::unique_ptr<FakeSyncChangeProcessor> change_processor(
new FakeSyncChangeProcessor());
change_processor_ = change_processor.get();
syncable_service_->MergeDataAndStartSyncing(
syncer::WIFI_CREDENTIALS, syncer::SyncDataList(),
std::move(change_processor),
- make_scoped_ptr(new SyncErrorFactoryMock()));
+ base::WrapUnique(new SyncErrorFactoryMock()));
}
private:
- scoped_ptr<WifiCredentialSyncableService> syncable_service_;
+ std::unique_ptr<WifiCredentialSyncableService> syncable_service_;
FakeWifiConfigDelegate* config_delegate_; // Owned by |syncable_service_|
FakeSyncChangeProcessor* change_processor_; // Owned by |syncable_service_|
« no previous file with comments | « components/wifi_sync/wifi_credential_syncable_service_factory.cc ('k') | components/wifi_sync/wifi_credential_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698