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

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

Issue 765073004: Adding skeleton code for showing Bubble, asking user to submit URL when Password Manager fails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
index b0f2016be1ada815a13120d6e886559d22f2f29c..f48926cb76a9d70bea28ceb56833431796b742c2 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
@@ -92,6 +92,12 @@ void ManagePasswordsUIController::UpdateBubbleAndIconVisibility() {
#endif
}
+void ManagePasswordsUIController::OnAskToReportURL(const std::string& host) {
+ origin_ = GURL("http://" + host);
vabr (Chromium) 2014/12/03 14:08:06 Why do you assume that the scheme is HTTP? It coul
melandory 2014/12/04 10:33:47 I've added "http" in order to form proper GURL and
+ state_ = password_manager::ui::ASK_SUBMIT_URL_AND_BUBBLE_STATE;
+ UpdateBubbleAndIconVisibility();
+}
+
void ManagePasswordsUIController::OnPasswordSubmitted(
scoped_ptr<PasswordFormManager> form_manager) {
form_manager_ = form_manager.Pass();
@@ -251,6 +257,14 @@ void ManagePasswordsUIController::DidNavigateMainFrame(
if (timer_ && timer_->Elapsed() < base::TimeDelta::FromSeconds(1))
return;
+ // This allows "Allow to collect URL?" bubble to leave 1 page longer.
vabr (Chromium) 2014/12/03 14:08:06 typo: leave -> live (?) Also, "1 page longer" soun
melandory 2014/12/04 10:33:46 Done.
+ if (state_ == password_manager::ui::ASK_SUBMIT_URL_STATE) {
+ // TODO(melandory): Substitude this with proper solution using
vabr (Chromium) 2014/12/03 14:08:06 typo: Substitude -> Substitute Also: proper soluti
melandory 2014/12/04 10:33:46 Done. Also "setlocal spell spelllang=en_us" IS now
+ // provisional_save_manager.
+ state_ = password_manager::ui::ASK_SUBMIT_URL_AND_BUBBLE_STATE;
+ return;
+ }
+
// Otherwise, reset the password manager and the timer.
state_ = password_manager::ui::INACTIVE_STATE;
UpdateBubbleAndIconVisibility();

Powered by Google App Engine
This is Rietveld 408576698