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

Unified Diff: components/password_manager/core/browser/password_generation_manager_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/password_generation_manager_unittest.cc
diff --git a/components/password_manager/core/browser/password_generation_manager_unittest.cc b/components/password_manager/core/browser/password_generation_manager_unittest.cc
index a3fb762408142a5c882784ec4f26bba8793eec58..6bcc8a6b345b40fb09987c3f7cb675706a2bf825 100644
--- a/components/password_manager/core/browser/password_generation_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_generation_manager_unittest.cc
@@ -77,7 +77,7 @@ class MockPasswordManagerClient : public StubPasswordManagerClient {
MOCK_CONST_METHOD0(IsSavingAndFillingEnabledForCurrentPage, bool());
MOCK_CONST_METHOD0(IsOffTheRecord, bool());
- explicit MockPasswordManagerClient(scoped_ptr<PrefService> prefs)
+ explicit MockPasswordManagerClient(std::unique_ptr<PrefService> prefs)
: prefs_(std::move(prefs)),
store_(new TestPasswordStore),
driver_(this) {}
@@ -90,7 +90,7 @@ class MockPasswordManagerClient : public StubPasswordManagerClient {
TestPasswordManagerDriver* test_driver() { return &driver_; }
private:
- scoped_ptr<PrefService> prefs_;
+ std::unique_ptr<PrefService> prefs_;
scoped_refptr<TestPasswordStore> store_;
TestPasswordManagerDriver driver_;
};
@@ -103,7 +103,8 @@ class PasswordGenerationManagerTest : public testing::Test {
// Construct a PrefService and register all necessary prefs before handing
// it off to |client_|, as the initialization flow of |client_| will
// indirectly cause those prefs to be immediately accessed.
- scoped_ptr<TestingPrefServiceSimple> prefs(new TestingPrefServiceSimple());
+ std::unique_ptr<TestingPrefServiceSimple> prefs(
+ new TestingPrefServiceSimple());
prefs->registry()->RegisterBooleanPref(prefs::kPasswordManagerSavingEnabled,
true);
client_.reset(new MockPasswordManagerClient(std::move(prefs)));
@@ -127,7 +128,7 @@ class PasswordGenerationManagerTest : public testing::Test {
}
base::MessageLoop message_loop_;
- scoped_ptr<MockPasswordManagerClient> client_;
+ std::unique_ptr<MockPasswordManagerClient> client_;
};
TEST_F(PasswordGenerationManagerTest, IsGenerationEnabled) {

Powered by Google App Engine
This is Rietveld 408576698