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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc

Issue 1776673003: Fix the password bubble titles for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 Profile::FromBrowserContext(web_contents()->GetBrowserContext()), 112 Profile::FromBrowserContext(web_contents()->GetBrowserContext()),
113 this)); 113 this));
114 dialog_controller_->ShowAccountChooser( 114 dialog_controller_->ShowAccountChooser(
115 CreateAccountChooser(dialog_controller_.get()), 115 CreateAccountChooser(dialog_controller_.get()),
116 std::move(locals), std::move(federations)); 116 std::move(locals), std::move(federations));
117 UpdateBubbleAndIconVisibility(); 117 UpdateBubbleAndIconVisibility();
118 return true; 118 return true;
119 } 119 }
120 120
121 void ManagePasswordsUIController::OnAutoSignin( 121 void ManagePasswordsUIController::OnAutoSignin(
122 ScopedVector<autofill::PasswordForm> local_forms) { 122 ScopedVector<autofill::PasswordForm> local_forms,
123 const GURL& origin) {
123 DCHECK(!local_forms.empty()); 124 DCHECK(!local_forms.empty());
124 DestroyAccountChooser(); 125 DestroyAccountChooser();
125 passwords_data_.OnAutoSignin(std::move(local_forms)); 126 passwords_data_.OnAutoSignin(std::move(local_forms), origin);
126 bubble_status_ = SHOULD_POP_UP; 127 bubble_status_ = SHOULD_POP_UP;
127 UpdateBubbleAndIconVisibility(); 128 UpdateBubbleAndIconVisibility();
128 } 129 }
129 130
130 void ManagePasswordsUIController::OnPromptEnableAutoSignin() { 131 void ManagePasswordsUIController::OnPromptEnableAutoSignin() {
131 // Both the account chooser and the previous prompt shouldn't be closed. 132 // Both the account chooser and the previous prompt shouldn't be closed.
132 if (dialog_controller_) 133 if (dialog_controller_)
133 return; 134 return;
134 dialog_controller_.reset(new PasswordDialogControllerImpl( 135 dialog_controller_.reset(new PasswordDialogControllerImpl(
135 Profile::FromBrowserContext(web_contents()->GetBrowserContext()), 136 Profile::FromBrowserContext(web_contents()->GetBrowserContext()),
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); 427 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE);
427 } 428 }
428 } 429 }
429 430
430 void ManagePasswordsUIController::WebContentsDestroyed() { 431 void ManagePasswordsUIController::WebContentsDestroyed() {
431 password_manager::PasswordStore* password_store = 432 password_manager::PasswordStore* password_store =
432 GetPasswordStore(web_contents()); 433 GetPasswordStore(web_contents());
433 if (password_store) 434 if (password_store)
434 password_store->RemoveObserver(this); 435 password_store->RemoveObserver(this);
435 } 436 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698