OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 virtual void OnUploadedAutoFillHeuristics(const std::string& form_signature); | 61 virtual void OnUploadedAutoFillHeuristics(const std::string& form_signature); |
62 virtual void OnHeuristicsRequestError( | 62 virtual void OnHeuristicsRequestError( |
63 const std::string& form_signature, | 63 const std::string& form_signature, |
64 AutoFillDownloadManager::AutoFillRequestType request_type, | 64 AutoFillDownloadManager::AutoFillRequestType request_type, |
65 int http_error); | 65 int http_error); |
66 | 66 |
67 // Returns the value of the AutoFillEnabled pref. | 67 // Returns the value of the AutoFillEnabled pref. |
68 virtual bool IsAutoFillEnabled() const; | 68 virtual bool IsAutoFillEnabled() const; |
69 | 69 |
70 // Handles the form data submitted by the user. | 70 // Handles the form data submitted by the user. |
71 void HandleSubmit(); | 71 void SaveFormData(); |
72 | 72 |
73 // Uploads the form data to the AutoFill server. | 73 // Uploads the form data to the AutoFill server. |
74 void UploadFormData(); | 74 void UploadFormData(); |
75 | 75 |
76 // Reset cache. | 76 // Reset cache. |
77 void Reset(); | 77 void Reset(); |
78 | 78 |
79 protected: | 79 protected: |
80 // For tests. | 80 // For tests. |
81 AutoFillManager(); | 81 AutoFillManager(); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 // Our copy of the form data. | 204 // Our copy of the form data. |
205 ScopedVector<FormStructure> form_structures_; | 205 ScopedVector<FormStructure> form_structures_; |
206 | 206 |
207 // The form data the user has submitted. | 207 // The form data the user has submitted. |
208 scoped_ptr<FormStructure> upload_form_structure_; | 208 scoped_ptr<FormStructure> upload_form_structure_; |
209 | 209 |
210 // The InfoBar that asks for permission to store credit card information. | 210 // The InfoBar that asks for permission to store credit card information. |
211 // Deletes itself when closed. | 211 // Deletes itself when closed. |
212 AutoFillCCInfoBarDelegate* cc_infobar_; | 212 AutoFillCCInfoBarDelegate* cc_infobar_; |
213 | 213 |
214 // Bitfield that indicates which fields were autofilled for last Credit Card. | |
215 std::string data_autofilled_; | |
dhollowa
2011/01/18 22:31:26
This is unused.
GeorgeY
2011/01/20 19:12:29
removed
| |
216 | |
214 // GUID to ID mapping. We keep two maps to convert back and forth. | 217 // GUID to ID mapping. We keep two maps to convert back and forth. |
215 std::map<std::string, int> guid_id_map_; | 218 std::map<std::string, int> guid_id_map_; |
216 std::map<int, std::string> id_guid_map_; | 219 std::map<int, std::string> id_guid_map_; |
217 | 220 |
218 friend class AutoFillManagerTest; | 221 friend class AutoFillManagerTest; |
219 friend class FormStructureBrowserTest; | 222 friend class FormStructureBrowserTest; |
220 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm); | 223 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm); |
221 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressForm); | 224 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressForm); |
222 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressAndCreditCardForm); | 225 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressAndCreditCardForm); |
223 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAutoFilledForm); | 226 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAutoFilledForm); |
224 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillPhoneNumber); | 227 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillPhoneNumber); |
225 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesRemoveField); | 228 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesRemoveField); |
226 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesAddField); | 229 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesAddField); |
227 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, QualityMetrics); | 230 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, QualityMetrics); |
228 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, | 231 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, |
229 NoQualityMetricsForNonAutoFillableForms); | 232 NoQualityMetricsForNonAutoFillableForms); |
230 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, QualityMetricsForFailure); | 233 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, QualityMetricsForFailure); |
231 | 234 |
232 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); | 235 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); |
233 }; | 236 }; |
234 | 237 |
235 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 238 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
OLD | NEW |