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

Unified Diff: components/sync_driver/glue/sync_backend_host_impl_unittest.cc

Issue 1907683003: Convert //components/sync_driver from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix, address feedback 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/sync_driver/glue/sync_backend_host_impl_unittest.cc
diff --git a/components/sync_driver/glue/sync_backend_host_impl_unittest.cc b/components/sync_driver/glue/sync_backend_host_impl_unittest.cc
index f01f74054a283ce1ea667d3f9da33c936575a174..6350df40e9c70be455e3b7e1938cb1818c1c4716 100644
--- a/components/sync_driver/glue/sync_backend_host_impl_unittest.cc
+++ b/components/sync_driver/glue/sync_backend_host_impl_unittest.cc
@@ -5,14 +5,15 @@
#include "components/sync_driver/glue/sync_backend_host_impl.h"
#include <stdint.h>
+
#include <cstddef>
#include <map>
+#include <memory>
#include <utility>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
@@ -126,12 +127,12 @@ class FakeSyncManagerFactory : public syncer::SyncManagerFactory {
~FakeSyncManagerFactory() override {}
// SyncManagerFactory implementation. Called on the sync thread.
- scoped_ptr<SyncManager> CreateSyncManager(
+ std::unique_ptr<SyncManager> CreateSyncManager(
const std::string& /* name */) override {
*fake_manager_ = new FakeSyncManager(initial_sync_ended_types_,
progress_marker_types_,
configure_fail_types_);
- return scoped_ptr<SyncManager>(*fake_manager_);
+ return std::unique_ptr<SyncManager>(*fake_manager_);
}
void set_initial_sync_ended_types(syncer::ModelTypeSet types) {
@@ -229,7 +230,7 @@ class SyncBackendHostTest : public testing::Test {
nullptr,
base::Bind(&EmptyNetworkTimeUpdate));
backend_->Initialize(
- &mock_frontend_, scoped_ptr<base::Thread>(),
+ &mock_frontend_, std::unique_ptr<base::Thread>(),
base::ThreadTaskRunnerHandle::Get(),
base::ThreadTaskRunnerHandle::Get(),
syncer::WeakHandle<syncer::JsEventHandler>(), GURL(std::string()),
@@ -297,13 +298,14 @@ class SyncBackendHostTest : public testing::Test {
syncer::SyncCredentials credentials_;
BackendSyncClient sync_client_;
syncer::TestUnrecoverableErrorHandler test_unrecoverable_error_handler_;
- scoped_ptr<sync_driver::SyncPrefs> sync_prefs_;
- scoped_ptr<SyncBackendHostImpl> backend_;
- scoped_ptr<FakeSyncManagerFactory> fake_manager_factory_;
+ std::unique_ptr<sync_driver::SyncPrefs> sync_prefs_;
+ std::unique_ptr<SyncBackendHostImpl> backend_;
+ std::unique_ptr<FakeSyncManagerFactory> fake_manager_factory_;
FakeSyncManager* fake_manager_;
syncer::ModelTypeSet enabled_types_;
- scoped_ptr<syncer::NetworkResources> network_resources_;
- scoped_ptr<syncer::SyncEncryptionHandler::NigoriState> saved_nigori_state_;
+ std::unique_ptr<syncer::NetworkResources> network_resources_;
+ std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>
+ saved_nigori_state_;
};
// Test basic initialization with no initial types (first time initialization).
« no previous file with comments | « components/sync_driver/glue/sync_backend_host_impl.cc ('k') | components/sync_driver/glue/sync_backend_host_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698