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

Side by Side Diff: chrome/browser/ui/views/passwords/password_dialog_view_browsertest.cc

Issue 2847173004: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/ptr_util.h" 5 #include "base/memory/ptr_util.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 7 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" 10 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 TestManagePasswordsUIController::TestManagePasswordsUIController( 108 TestManagePasswordsUIController::TestManagePasswordsUIController(
109 content::WebContents* web_contents) 109 content::WebContents* web_contents)
110 : ManagePasswordsUIController(web_contents), 110 : ManagePasswordsUIController(web_contents),
111 current_account_chooser_(nullptr), 111 current_account_chooser_(nullptr),
112 current_autosignin_prompt_(nullptr) { 112 current_autosignin_prompt_(nullptr) {
113 // Attach TestManagePasswordsUIController to |web_contents| so the default 113 // Attach TestManagePasswordsUIController to |web_contents| so the default
114 // ManagePasswordsUIController isn't created. 114 // ManagePasswordsUIController isn't created.
115 // Do not silently replace an existing ManagePasswordsUIController because it 115 // Do not silently replace an existing ManagePasswordsUIController because it
116 // unregisters itself in WebContentsDestroyed(). 116 // unregisters itself in WebContentsDestroyed().
117 EXPECT_FALSE(web_contents->GetUserData(UserDataKey())); 117 EXPECT_FALSE(web_contents->GetUserData(UserDataKey()));
118 web_contents->SetUserData(UserDataKey(), this); 118 web_contents->SetUserData(UserDataKey(), base::WrapUnique(this));
119 } 119 }
120 120
121 void TestManagePasswordsUIController::OnDialogHidden() { 121 void TestManagePasswordsUIController::OnDialogHidden() {
122 ManagePasswordsUIController::OnDialogHidden(); 122 ManagePasswordsUIController::OnDialogHidden();
123 OnDialogClosed(); 123 OnDialogClosed();
124 } 124 }
125 125
126 AccountChooserPrompt* TestManagePasswordsUIController::CreateAccountChooser( 126 AccountChooserPrompt* TestManagePasswordsUIController::CreateAccountChooser(
127 PasswordDialogController* controller) { 127 PasswordDialogController* controller) {
128 current_account_chooser_ = 128 current_account_chooser_ =
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 RunDialog(); 498 RunDialog();
499 } 499 }
500 500
501 IN_PROC_BROWSER_TEST_F( 501 IN_PROC_BROWSER_TEST_F(
502 PasswordDialogViewTest, 502 PasswordDialogViewTest,
503 InvokeDialog_PopupAccountChooserWithSingleCredentialClickSignIn) { 503 InvokeDialog_PopupAccountChooserWithSingleCredentialClickSignIn) {
504 RunDialog(); 504 RunDialog();
505 } 505 }
506 506
507 } // namespace 507 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698