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

Side by Side Diff: chrome/browser/password_manager/save_password_infobar_delegate.cc

Issue 1045173003: Fix blacklisting for desktop infobars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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/password_manager/save_password_infobar_delegate.h" 5 #include "chrome/browser/password_manager/save_password_infobar_delegate.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "chrome/grit/chromium_strings.h" 9 #include "chrome/grit/chromium_strings.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 DCHECK(form_to_save_.get()); 143 DCHECK(form_to_save_.get());
144 form_to_save_->Save(); 144 form_to_save_->Save();
145 infobar_response_ = password_manager::metrics_util::REMEMBER_PASSWORD; 145 infobar_response_ = password_manager::metrics_util::REMEMBER_PASSWORD;
146 return true; 146 return true;
147 } 147 }
148 148
149 bool SavePasswordInfoBarDelegate::Cancel() { 149 bool SavePasswordInfoBarDelegate::Cancel() {
150 DCHECK(form_to_save_.get()); 150 DCHECK(form_to_save_.get());
151 if (source_type_ == 151 if (source_type_ ==
152 password_manager::CredentialSourceType::CREDENTIAL_SOURCE_API) { 152 password_manager::CredentialSourceType::CREDENTIAL_SOURCE_API) {
153 InfoBarDismissed();
154 } else {
153 form_to_save_->PermanentlyBlacklist(); 155 form_to_save_->PermanentlyBlacklist();
154 infobar_response_ = password_manager::metrics_util::NEVER_REMEMBER_PASSWORD; 156 infobar_response_ = password_manager::metrics_util::NEVER_REMEMBER_PASSWORD;
155 } else {
156 InfoBarDismissed();
157 } 157 }
158 return true; 158 return true;
159 } 159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698