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

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 1537003002: autofill: save pasted passwords on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/autofill/core/browser/autofill_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 ParseForms(forms); 340 ParseForms(forms);
341 } 341 }
342 342
343 void AutofillManager::OnTextFieldDidChange(const FormData& form, 343 void AutofillManager::OnTextFieldDidChange(const FormData& form,
344 const FormFieldData& field, 344 const FormFieldData& field,
345 const TimeTicks& timestamp) { 345 const TimeTicks& timestamp) {
346 if (!IsValidFormData(form) || !IsValidFormFieldData(field)) 346 if (!IsValidFormData(form) || !IsValidFormFieldData(field))
347 return; 347 return;
348 348
349 if (test_delegate_)
350 test_delegate_->OnTextFieldChanged();
351
349 FormStructure* form_structure = NULL; 352 FormStructure* form_structure = NULL;
350 AutofillField* autofill_field = NULL; 353 AutofillField* autofill_field = NULL;
351 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) 354 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field))
352 return; 355 return;
353 356
354 if (!user_did_type_) { 357 if (!user_did_type_) {
355 user_did_type_ = true; 358 user_did_type_ = true;
356 AutofillMetrics::LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE); 359 AutofillMetrics::LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE);
357 } 360 }
358 361
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 if (i > 0) 1640 if (i > 0)
1638 fputs("Next oldest form:\n", file); 1641 fputs("Next oldest form:\n", file);
1639 } 1642 }
1640 fputs("\n", file); 1643 fputs("\n", file);
1641 1644
1642 fclose(file); 1645 fclose(file);
1643 } 1646 }
1644 #endif // ENABLE_FORM_DEBUG_DUMP 1647 #endif // ENABLE_FORM_DEBUG_DUMP
1645 1648
1646 } // namespace autofill 1649 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698