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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 std::vector<Suggestion> GetCreditCardSuggestions( | 380 std::vector<Suggestion> GetCreditCardSuggestions( |
381 const FormFieldData& field, | 381 const FormFieldData& field, |
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 // Logs |metric_name| with RAPPOR, for the specific form |source_url|. |
| 391 void CollectRapportSample(const GURL& source_url, |
| 392 const char* metric_name) const; |
| 393 |
390 // Examines |card| and the stored profiles and if a candidate set of profiles | 394 // 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 | 395 // is found that matches the client-side validation rules, assigns the values |
392 // to |profiles|. If no valid set can be found, returns false. | 396 // to |profiles|. |source_url| is the source URL for the form. If no valid set |
393 bool GetProfilesForCreditCardUpload( | 397 // can be found, returns false. |
394 const CreditCard& card, | 398 bool GetProfilesForCreditCardUpload(const CreditCard& card, |
395 std::vector<AutofillProfile>* profiles) const; | 399 std::vector<AutofillProfile>* profiles, |
| 400 const GURL& source_url) const; |
396 | 401 |
397 // If |initial_interaction_timestamp_| is unset or is set to a later time than | 402 // 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 | 403 // |interaction_timestamp|, updates the cached timestamp. The latter check is |
399 // needed because IPC messages can arrive out of order. | 404 // needed because IPC messages can arrive out of order. |
400 void UpdateInitialInteractionTimestamp( | 405 void UpdateInitialInteractionTimestamp( |
401 const base::TimeTicks& interaction_timestamp); | 406 const base::TimeTicks& interaction_timestamp); |
402 | 407 |
403 // Uses the existing personal data in |profiles| and |credit_cards| to | 408 // Uses the existing personal data in |profiles| and |credit_cards| to |
404 // determine possible field types for the |submitted_form|. This is | 409 // determine possible field types for the |submitted_form|. This is |
405 // potentially expensive -- on the order of 50ms even for a small set of | 410 // 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, | 597 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
593 DontSaveCvcInAutocompleteHistory); | 598 DontSaveCvcInAutocompleteHistory); |
594 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); | 599 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); |
595 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); | 600 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); |
596 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 601 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
597 }; | 602 }; |
598 | 603 |
599 } // namespace autofill | 604 } // namespace autofill |
600 | 605 |
601 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 606 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |