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

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

Issue 1488093002: autofill: save pasted passwords on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't always quit the runloop on text changes 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 ParseForms(forms); 341 ParseForms(forms);
342 } 342 }
343 343
344 void AutofillManager::OnTextFieldDidChange(const FormData& form, 344 void AutofillManager::OnTextFieldDidChange(const FormData& form,
345 const FormFieldData& field, 345 const FormFieldData& field,
346 const TimeTicks& timestamp) { 346 const TimeTicks& timestamp) {
347 if (!IsValidFormData(form) || !IsValidFormFieldData(field)) 347 if (!IsValidFormData(form) || !IsValidFormFieldData(field))
348 return; 348 return;
349 349
350 if (test_delegate_)
351 test_delegate_->OnTextFieldChanged();
352
350 FormStructure* form_structure = NULL; 353 FormStructure* form_structure = NULL;
351 AutofillField* autofill_field = NULL; 354 AutofillField* autofill_field = NULL;
352 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) 355 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field))
353 return; 356 return;
354 357
355 if (!user_did_type_) { 358 if (!user_did_type_) {
356 user_did_type_ = true; 359 user_did_type_ = true;
357 AutofillMetrics::LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE); 360 AutofillMetrics::LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE);
358 } 361 }
359 362
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 if (i > 0) 1634 if (i > 0)
1632 fputs("Next oldest form:\n", file); 1635 fputs("Next oldest form:\n", file);
1633 } 1636 }
1634 fputs("\n", file); 1637 fputs("\n", file);
1635 1638
1636 fclose(file); 1639 fclose(file);
1637 } 1640 }
1638 #endif // ENABLE_FORM_DEBUG_DUMP 1641 #endif // ENABLE_FORM_DEBUG_DUMP
1639 1642
1640 } // namespace autofill 1643 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698