| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 AutofillClient::PaymentsRpcResult result, | 279 AutofillClient::PaymentsRpcResult result, |
| 280 const base::string16& context_token, | 280 const base::string16& context_token, |
| 281 std::unique_ptr<base::DictionaryValue> legal_message) override; | 281 std::unique_ptr<base::DictionaryValue> legal_message) override; |
| 282 void OnDidUploadCard(AutofillClient::PaymentsRpcResult result) override; | 282 void OnDidUploadCard(AutofillClient::PaymentsRpcResult result) override; |
| 283 | 283 |
| 284 // FullCardRequest::Delegate: | 284 // FullCardRequest::Delegate: |
| 285 void OnFullCardDetails(const CreditCard& card, | 285 void OnFullCardDetails(const CreditCard& card, |
| 286 const base::string16& cvc) override; | 286 const base::string16& cvc) override; |
| 287 void OnFullCardError() override; | 287 void OnFullCardError() override; |
| 288 | 288 |
| 289 // Saves risk data in |unmasking_risk_data_| and calls UnmaskCard if the user | |
| 290 // has accepted the prompt. | |
| 291 void OnDidGetUnmaskRiskData(const std::string& risk_data); | |
| 292 | |
| 293 // Sets |user_did_accept_upload_prompt_| and calls UploadCard if the risk data | 289 // Sets |user_did_accept_upload_prompt_| and calls UploadCard if the risk data |
| 294 // is available. | 290 // is available. |
| 295 void OnUserDidAcceptUpload(); | 291 void OnUserDidAcceptUpload(); |
| 296 | 292 |
| 297 // Saves risk data in |uploading_risk_data_| and calls UploadCard if the user | 293 // Saves risk data in |uploading_risk_data_| and calls UploadCard if the user |
| 298 // has accepted the prompt. | 294 // has accepted the prompt. |
| 299 void OnDidGetUploadRiskData(const std::string& risk_data); | 295 void OnDidGetUploadRiskData(const std::string& risk_data); |
| 300 | 296 |
| 301 // Returns false if Autofill is disabled or if no Autofill data is available. | 297 // Returns false if Autofill is disabled or if no Autofill data is available. |
| 302 bool RefreshDataModels(); | 298 bool RefreshDataModels(); |
| 303 | 299 |
| 304 // Returns true if the unique_id refers to a credit card and false if | |
| 305 // it refers to a profile. | |
| 306 bool IsCreditCard(int unique_id); | |
| 307 | |
| 308 // Gets the profile referred by |unique_id|. Returns true if the profile | 300 // Gets the profile referred by |unique_id|. Returns true if the profile |
| 309 // exists. | 301 // exists. |
| 310 bool GetProfile(int unique_id, const AutofillProfile** profile); | 302 bool GetProfile(int unique_id, const AutofillProfile** profile); |
| 311 | 303 |
| 312 // Gets the credit card referred by |unique_id|. Returns true if the credit | 304 // Gets the credit card referred by |unique_id|. Returns true if the credit |
| 313 // card exists. | 305 // card exists. |
| 314 bool GetCreditCard(int unique_id, const CreditCard** credit_card); | 306 bool GetCreditCard(int unique_id, const CreditCard** credit_card); |
| 315 | 307 |
| 316 // Determines whether a fill on |form| initiated from |field| will wind up | 308 // Determines whether a fill on |form| initiated from |field| will wind up |
| 317 // filling a credit card number. This is useful to determine if we will need | 309 // filling a credit card number. This is useful to determine if we will need |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 593 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 602 DontSaveCvcInAutocompleteHistory); | 594 DontSaveCvcInAutocompleteHistory); |
| 603 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); | 595 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); |
| 604 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); | 596 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); |
| 605 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 597 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 606 }; | 598 }; |
| 607 | 599 |
| 608 } // namespace autofill | 600 } // namespace autofill |
| 609 | 601 |
| 610 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 602 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |