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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 425 |
426 // Imports the form data, submitted by the user, into |personal_data_|. | 426 // Imports the form data, submitted by the user, into |personal_data_|. |
427 void ImportFormData(const FormStructure& submitted_form); | 427 void ImportFormData(const FormStructure& submitted_form); |
428 | 428 |
429 // Logs |metric_name| with RAPPOR, for the specific form |source_url|. | 429 // Logs |metric_name| with RAPPOR, for the specific form |source_url|. |
430 void CollectRapporSample(const GURL& source_url, | 430 void CollectRapporSample(const GURL& source_url, |
431 const std::string& metric_name) const; | 431 const std::string& metric_name) const; |
432 | 432 |
433 // Examines |card| and the stored profiles and if a candidate set of profiles | 433 // Examines |card| and the stored profiles and if a candidate set of profiles |
434 // is found that matches the client-side validation rules, assigns the values | 434 // is found that matches the client-side validation rules, assigns the values |
435 // to |profiles| and returns 0. If no valid set can be found, returns the | 435 // to |upload_request.profiles| and returns 0. If no valid set can be found, |
436 // failure reasons and, if applicable, the RAPPOR metric to log to | 436 // returns the failure reasons and, if applicable, the RAPPOR metric to log to |
437 // |rappor_metric_name|. The return value is a bitmask of | 437 // |rappor_metric_name|. Appends any experiments that were triggered to |
| 438 // |upload_request.active_experiments|. The return value is a bitmask of |
438 // |AutofillMetrics::CardUploadDecisionMetric|. | 439 // |AutofillMetrics::CardUploadDecisionMetric|. |
439 int GetProfilesForCreditCardUpload(const CreditCard& card, | 440 int SetProfilesForCreditCardUpload( |
440 std::vector<AutofillProfile>* profiles, | 441 const CreditCard& card, |
441 std::string* rappor_metric_name) const; | 442 payments::PaymentsClient::UploadRequestDetails* upload_request, |
| 443 std::string* rappor_metric_name) const; |
442 | 444 |
443 // Returns metric relevant to the CVC field based on values in | 445 // Returns metric relevant to the CVC field based on values in |
444 // |found_cvc_field_|, |found_value_in_cvc_field_| and | 446 // |found_cvc_field_|, |found_value_in_cvc_field_| and |
445 // |found_cvc_value_in_non_cvc_field_|. | 447 // |found_cvc_value_in_non_cvc_field_|. |
446 AutofillMetrics::CardUploadDecisionMetric GetCVCCardUploadDecisionMetric() | 448 AutofillMetrics::CardUploadDecisionMetric GetCVCCardUploadDecisionMetric() |
447 const; | 449 const; |
448 | 450 |
449 // If |initial_interaction_timestamp_| is unset or is set to a later time than | 451 // If |initial_interaction_timestamp_| is unset or is set to a later time than |
450 // |interaction_timestamp|, updates the cached timestamp. The latter check is | 452 // |interaction_timestamp|, updates the cached timestamp. The latter check is |
451 // needed because IPC messages can arrive out of order. | 453 // needed because IPC messages can arrive out of order. |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 656 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
655 OnLoadedServerPredictions_ResetManager); | 657 OnLoadedServerPredictions_ResetManager); |
656 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); | 658 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); |
657 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); | 659 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); |
658 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 660 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
659 }; | 661 }; |
660 | 662 |
661 } // namespace autofill | 663 } // namespace autofill |
662 | 664 |
663 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 665 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |