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

Side by Side Diff: components/password_manager/core/browser/password_manager.cc

Issue 1286593003: [Password Manager] Store forms with field name and id attributes missing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed mac bot failure. Created 5 years, 3 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
« no previous file with comments | « components/password_manager/core/browser/password_form_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/password_manager/core/browser/password_manager.h" 5 #include "components/password_manager/core/browser/password_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 if (matched_manager_it != pending_login_managers_.end()) { 298 if (matched_manager_it != pending_login_managers_.end()) {
299 // Transfer ownership of the manager from |pending_login_managers_| to 299 // Transfer ownership of the manager from |pending_login_managers_| to
300 // |manager|. 300 // |manager|.
301 manager.reset(*matched_manager_it); 301 manager.reset(*matched_manager_it);
302 pending_login_managers_.weak_erase(matched_manager_it); 302 pending_login_managers_.weak_erase(matched_manager_it);
303 } else { 303 } else {
304 RecordFailure(NO_MATCHING_FORM, form.origin, logger.get()); 304 RecordFailure(NO_MATCHING_FORM, form.origin, logger.get());
305 return; 305 return;
306 } 306 }
307 307
308 // Bail if we're missing any of the necessary form components.
309 if (!manager->HasValidPasswordForm()) {
310 RecordFailure(INVALID_FORM, form.origin, logger.get());
311 return;
312 }
313
314 PasswordForm provisionally_saved_form(form); 308 PasswordForm provisionally_saved_form(form);
315 provisionally_saved_form.ssl_valid = 309 provisionally_saved_form.ssl_valid =
316 form.origin.SchemeIsCryptographic() && 310 form.origin.SchemeIsCryptographic() &&
317 !client_->DidLastPageLoadEncounterSSLErrors(); 311 !client_->DidLastPageLoadEncounterSSLErrors();
318 provisionally_saved_form.preferred = true; 312 provisionally_saved_form.preferred = true;
319 if (logger) { 313 if (logger) {
320 logger->LogPasswordForm(Logger::STRING_PROVISIONALLY_SAVED_FORM, 314 logger->LogPasswordForm(Logger::STRING_PROVISIONALLY_SAVED_FORM,
321 provisionally_saved_form); 315 provisionally_saved_form);
322 } 316 }
323 PasswordFormManager::OtherPossibleUsernamesAction action = 317 PasswordFormManager::OtherPossibleUsernamesAction action =
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 matched_manager_it = iter; 796 matched_manager_it = iter;
803 current_match_result = result; 797 current_match_result = result;
804 } 798 }
805 } 799 }
806 if (matched_manager_it != pending_login_managers_.end()) 800 if (matched_manager_it != pending_login_managers_.end())
807 return *matched_manager_it; 801 return *matched_manager_it;
808 return nullptr; 802 return nullptr;
809 } 803 }
810 804
811 } // namespace password_manager 805 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/password_form_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698