OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_state.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_state.h" |
6 | 6 |
7 #include "components/password_manager/core/browser/browser_save_password_progres
s_logger.h" | 7 #include "components/password_manager/core/browser/browser_save_password_progres
s_logger.h" |
8 #include "components/password_manager/core/browser/password_form_manager.h" | 8 #include "components/password_manager/core/browser/password_form_manager.h" |
9 #include "components/password_manager/core/browser/password_manager_client.h" | 9 #include "components/password_manager/core/browser/password_manager_client.h" |
10 #include "components/password_manager/core/common/credential_manager_types.h" | 10 #include "components/password_manager/core/common/credential_manager_types.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 SetState(state); | 181 SetState(state); |
182 } | 182 } |
183 | 183 |
184 void ManagePasswordsState::ProcessLoginsChanged( | 184 void ManagePasswordsState::ProcessLoginsChanged( |
185 const password_manager::PasswordStoreChangeList& changes) { | 185 const password_manager::PasswordStoreChangeList& changes) { |
186 if (state() == password_manager::ui::INACTIVE_STATE) | 186 if (state() == password_manager::ui::INACTIVE_STATE) |
187 return; | 187 return; |
188 | 188 |
189 for (const password_manager::PasswordStoreChange& change : changes) { | 189 for (const password_manager::PasswordStoreChange& change : changes) { |
190 const autofill::PasswordForm& changed_form = change.form(); | 190 const autofill::PasswordForm& changed_form = change.form(); |
| 191 if (changed_form.blacklisted_by_user) |
| 192 continue; |
191 if (change.type() == password_manager::PasswordStoreChange::REMOVE) { | 193 if (change.type() == password_manager::PasswordStoreChange::REMOVE) { |
192 DeleteForm(changed_form); | 194 DeleteForm(changed_form); |
193 } else { | 195 } else { |
194 if (change.type() == password_manager::PasswordStoreChange::UPDATE) | 196 if (change.type() == password_manager::PasswordStoreChange::UPDATE) |
195 UpdateForm(changed_form); | 197 UpdateForm(changed_form); |
196 else | 198 else |
197 AddForm(changed_form); | 199 AddForm(changed_form); |
198 } | 200 } |
199 } | 201 } |
200 } | 202 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 void ManagePasswordsState::SetState(password_manager::ui::State state) { | 254 void ManagePasswordsState::SetState(password_manager::ui::State state) { |
253 DCHECK(client_); | 255 DCHECK(client_); |
254 if (client_->IsLoggingActive()) { | 256 if (client_->IsLoggingActive()) { |
255 password_manager::BrowserSavePasswordProgressLogger logger(client_); | 257 password_manager::BrowserSavePasswordProgressLogger logger(client_); |
256 logger.LogNumber( | 258 logger.LogNumber( |
257 autofill::SavePasswordProgressLogger::STRING_NEW_UI_STATE, | 259 autofill::SavePasswordProgressLogger::STRING_NEW_UI_STATE, |
258 state); | 260 state); |
259 } | 261 } |
260 state_ = state; | 262 state_ = state; |
261 } | 263 } |
OLD | NEW |