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

Unified Diff: chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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: chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
diff --git a/chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc b/chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
index 0f38fbb7d9ae8ab381173c5c0a0e958f6a57bf67..6a52b289a2f39c5d481c634f2c1006db9acb7b5e 100644
--- a/chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
+++ b/chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
@@ -4,10 +4,11 @@
#include "chrome/browser/ui/passwords/password_dialog_controller_impl.h"
+#include <memory>
#include <utility>
#include <vector>
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/histogram_tester.h"
#include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
@@ -79,7 +80,7 @@ class PasswordDialogControllerTest : public testing::Test {
private:
content::TestBrowserThreadBundle thread_bundle_;
TestingProfile profile_;
- scoped_ptr<content::WebContents> test_web_contents_;
+ std::unique_ptr<content::WebContents> test_web_contents_;
// Owned by |test_web_contents_|.
ManagePasswordsUIControllerMock* ui_controller_mock_;
PasswordDialogControllerImpl controller_;
@@ -90,11 +91,11 @@ TEST_F(PasswordDialogControllerTest, ShowAccountChooser) {
StrictMock<MockPasswordPrompt> prompt;
autofill::PasswordForm local_form = GetLocalForm();
autofill::PasswordForm idp_form = GetFederationProviderForm();
- std::vector<scoped_ptr<autofill::PasswordForm>> locals;
- locals.push_back(make_scoped_ptr(new autofill::PasswordForm(local_form)));
+ std::vector<std::unique_ptr<autofill::PasswordForm>> locals;
+ locals.push_back(base::WrapUnique(new autofill::PasswordForm(local_form)));
autofill::PasswordForm* local_form_ptr = locals[0].get();
- std::vector<scoped_ptr<autofill::PasswordForm>> federations;
- federations.push_back(make_scoped_ptr(new autofill::PasswordForm(idp_form)));
+ std::vector<std::unique_ptr<autofill::PasswordForm>> federations;
+ federations.push_back(base::WrapUnique(new autofill::PasswordForm(idp_form)));
EXPECT_CALL(prompt, ShowAccountChooser());
controller().ShowAccountChooser(&prompt,

Powered by Google App Engine
This is Rietveld 408576698