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

Unified Diff: components/password_manager/core/browser/affiliation_backend_unittest.cc

Issue 1852093002: components/password_manager: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and revert an accidental .proto change Created 4 years, 9 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/password_manager/core/browser/affiliation_backend_unittest.cc
diff --git a/components/password_manager/core/browser/affiliation_backend_unittest.cc b/components/password_manager/core/browser/affiliation_backend_unittest.cc
index d19e53dcb3ad0dfba01d5f80807fe3987f2b7bbd..9c10c76274ccd90d85ef9ed9fd3ecb001e2253e4 100644
--- a/components/password_manager/core/browser/affiliation_backend_unittest.cc
+++ b/components/password_manager/core/browser/affiliation_backend_unittest.cc
@@ -6,11 +6,13 @@
#include <stddef.h>
+#include <memory>
+
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/test/test_simple_task_runner.h"
#include "base/time/clock.h"
@@ -283,12 +285,12 @@ class AffiliationBackendTest : public testing::Test {
}
bool IsCachedDataFreshForFacet(const FacetURI& facet_uri) {
- scoped_ptr<base::Clock> clock(backend_task_runner_->GetMockClock());
+ std::unique_ptr<base::Clock> clock(backend_task_runner_->GetMockClock());
return FacetManager(facet_uri, backend(), clock.get()).IsCachedDataFresh();
}
bool IsCachedDataNearStaleForFacet(const FacetURI& facet_uri) {
- scoped_ptr<base::Clock> clock(backend_task_runner_->GetMockClock());
+ std::unique_ptr<base::Clock> clock(backend_task_runner_->GetMockClock());
return FacetManager(facet_uri, backend(), clock.get())
.IsCachedDataNearStale();
}
@@ -325,7 +327,7 @@ class AffiliationBackendTest : public testing::Test {
backend_->Initialize(db_path());
mock_fetch_throttler_ = new MockAffiliationFetchThrottler(backend_.get());
backend_->SetThrottlerForTesting(
- make_scoped_ptr<AffiliationFetchThrottler>(mock_fetch_throttler_));
+ base::WrapUnique<AffiliationFetchThrottler>(mock_fetch_throttler_));
fake_affiliation_api_.AddTestEquivalenceClass(
GetTestEquivalenceClassAlpha());
@@ -341,7 +343,7 @@ class AffiliationBackendTest : public testing::Test {
base::FilePath db_path_;
ScopedFakeAffiliationAPI fake_affiliation_api_;
MockAffiliationConsumer mock_consumer_;
- scoped_ptr<AffiliationBackend> backend_;
+ std::unique_ptr<AffiliationBackend> backend_;
MockAffiliationFetchThrottler* mock_fetch_throttler_; // Owned by |backend_|.
DISALLOW_COPY_AND_ASSIGN(AffiliationBackendTest);

Powered by Google App Engine
This is Rietveld 408576698