| OLD | NEW |
| 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 const AutofillType& type) const; | 382 const AutofillType& type) const; |
| 383 | 383 |
| 384 // Parses the forms using heuristic matching and querying the Autofill server. | 384 // Parses the forms using heuristic matching and querying the Autofill server. |
| 385 void ParseForms(const std::vector<FormData>& forms); | 385 void ParseForms(const std::vector<FormData>& forms); |
| 386 | 386 |
| 387 // Imports the form data, submitted by the user, into |personal_data_|. | 387 // Imports the form data, submitted by the user, into |personal_data_|. |
| 388 void ImportFormData(const FormStructure& submitted_form); | 388 void ImportFormData(const FormStructure& submitted_form); |
| 389 | 389 |
| 390 // Examines |card| and the stored profiles and if a candidate set of profiles | 390 // Examines |card| and the stored profiles and if a candidate set of profiles |
| 391 // is found that matches the client-side validation rules, assigns the values | 391 // is found that matches the client-side validation rules, assigns the values |
| 392 // to |profiles|. If no valid set can be found, returns false. | 392 // to |profiles|. |source_url| is the source URL for the form. If no valid set |
| 393 bool GetProfilesForCreditCardUpload( | 393 // can be found, returns false. |
| 394 const CreditCard& card, | 394 bool GetProfilesForCreditCardUpload(const CreditCard& card, |
| 395 std::vector<AutofillProfile>* profiles) const; | 395 std::vector<AutofillProfile>* profiles, |
| 396 const GURL& source_url) const; |
| 396 | 397 |
| 397 // If |initial_interaction_timestamp_| is unset or is set to a later time than | 398 // If |initial_interaction_timestamp_| is unset or is set to a later time than |
| 398 // |interaction_timestamp|, updates the cached timestamp. The latter check is | 399 // |interaction_timestamp|, updates the cached timestamp. The latter check is |
| 399 // needed because IPC messages can arrive out of order. | 400 // needed because IPC messages can arrive out of order. |
| 400 void UpdateInitialInteractionTimestamp( | 401 void UpdateInitialInteractionTimestamp( |
| 401 const base::TimeTicks& interaction_timestamp); | 402 const base::TimeTicks& interaction_timestamp); |
| 402 | 403 |
| 403 // Uses the existing personal data in |profiles| and |credit_cards| to | 404 // Uses the existing personal data in |profiles| and |credit_cards| to |
| 404 // determine possible field types for the |submitted_form|. This is | 405 // determine possible field types for the |submitted_form|. This is |
| 405 // potentially expensive -- on the order of 50ms even for a small set of | 406 // potentially expensive -- on the order of 50ms even for a small set of |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 593 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 593 DontSaveCvcInAutocompleteHistory); | 594 DontSaveCvcInAutocompleteHistory); |
| 594 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); | 595 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); |
| 595 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); | 596 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); |
| 596 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 597 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 597 }; | 598 }; |
| 598 | 599 |
| 599 } // namespace autofill | 600 } // namespace autofill |
| 600 | 601 |
| 601 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 602 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |