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

Unified Diff: chrome/browser/password_manager/credential_manager_browsertest.cc

Issue 2605483002: Remove usages of raw new (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/credential_manager_browsertest.cc
diff --git a/chrome/browser/password_manager/credential_manager_browsertest.cc b/chrome/browser/password_manager/credential_manager_browsertest.cc
index f7d3a22e73b1cc3765c23f17fb02f652fa8db616..252f1f718ed2d55a0f0e1a3718544c3c61589e18 100644
--- a/chrome/browser/password_manager/credential_manager_browsertest.cc
+++ b/chrome/browser/password_manager/credential_manager_browsertest.cc
@@ -214,8 +214,7 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
// Wait for the password store before checking the prompt because it pops up
// after the store replies.
WaitForPasswordStore();
- std::unique_ptr<BubbleObserver> prompt_observer(
- new BubbleObserver(WebContents()));
+ auto prompt_observer(base::MakeUnique<BubbleObserver>(WebContents()));
jdoerrie 2016/12/23 10:01:11 Thinking of it, all of these usages could be repla
vabr (Chromium) 2016/12/23 10:03:46 That would be great! I think these are smart point
jdoerrie 2016/12/23 10:22:51 Done. Thanks for the explanation :)
EXPECT_FALSE(prompt_observer->IsShowingSavePrompt());
EXPECT_FALSE(prompt_observer->IsShowingUpdatePrompt());
@@ -263,8 +262,7 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
observer.SetPathToWaitFor("/password/done.html");
observer.Wait();
- std::unique_ptr<BubbleObserver> prompt_observer(
- new BubbleObserver(WebContents()));
+ auto prompt_observer(base::MakeUnique<BubbleObserver>(WebContents()));
// The autofill password manager shouldn't react to the successful login
// because it was suppressed when the site got the credential back.
EXPECT_FALSE(prompt_observer->IsShowingSavePrompt());
@@ -291,8 +289,7 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, SaveViaAPIAndAutofill) {
form_submit_observer.Wait();
WaitForPasswordStore();
- std::unique_ptr<BubbleObserver> prompt_observer(
- new BubbleObserver(WebContents()));
+ auto prompt_observer(base::MakeUnique<BubbleObserver>(WebContents()));
ASSERT_TRUE(prompt_observer->IsShowingSavePrompt());
prompt_observer->AcceptSavePrompt();
@@ -350,8 +347,7 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, UpdateViaAPIAndAutofill) {
// Wait for the password store before checking the prompt because it pops up
// after the store replies.
WaitForPasswordStore();
- std::unique_ptr<BubbleObserver> prompt_observer(
- new BubbleObserver(WebContents()));
+ auto prompt_observer(base::MakeUnique<BubbleObserver>(WebContents()));
EXPECT_FALSE(prompt_observer->IsShowingSavePrompt());
EXPECT_FALSE(prompt_observer->IsShowingUpdatePrompt());
signin_form.skip_zero_click = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698