| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 // Try to label password fields and upload |form|. This differs from | 165 // Try to label password fields and upload |form|. This differs from |
| 166 // OnFormSubmitted() in a few ways. | 166 // OnFormSubmitted() in a few ways. |
| 167 // - This function will only label the first <input type="password"> field | 167 // - This function will only label the first <input type="password"> field |
| 168 // as |password_type|. Other fields will stay unlabeled, as they | 168 // as |password_type|. Other fields will stay unlabeled, as they |
| 169 // should have been labeled during the upload for OnFormSubmitted(). | 169 // should have been labeled during the upload for OnFormSubmitted(). |
| 170 // - This function does not assume that |form| is being uploaded during | 170 // - This function does not assume that |form| is being uploaded during |
| 171 // the same browsing session as it was originally submitted (as we may | 171 // the same browsing session as it was originally submitted (as we may |
| 172 // not have the necessary information to classify the form at that time) | 172 // not have the necessary information to classify the form at that time) |
| 173 // so it bypasses the cache and doesn't log the same quality UMA metrics. | 173 // so it bypasses the cache and doesn't log the same quality UMA metrics. |
| 174 bool UploadPasswordForm(const FormData& form, | 174 virtual bool UploadPasswordForm(const FormData& form, |
| 175 const ServerFieldType& pasword_type); | 175 const ServerFieldType& pasword_type); |
| 176 | 176 |
| 177 // Resets cache. | 177 // Resets cache. |
| 178 virtual void Reset(); | 178 virtual void Reset(); |
| 179 | 179 |
| 180 // Returns the value of the AutofillEnabled pref. | 180 // Returns the value of the AutofillEnabled pref. |
| 181 virtual bool IsAutofillEnabled() const; | 181 virtual bool IsAutofillEnabled() const; |
| 182 | 182 |
| 183 protected: | 183 protected: |
| 184 // Test code should prefer to use this constructor. | 184 // Test code should prefer to use this constructor. |
| 185 AutofillManager(AutofillDriver* driver, | 185 AutofillManager(AutofillDriver* driver, |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 UserHappinessFormLoadAndSubmission); | 380 UserHappinessFormLoadAndSubmission); |
| 381 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 381 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 382 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 382 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 383 FormSubmittedAutocompleteEnabled); | 383 FormSubmittedAutocompleteEnabled); |
| 384 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 384 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 385 }; | 385 }; |
| 386 | 386 |
| 387 } // namespace autofill | 387 } // namespace autofill |
| 388 | 388 |
| 389 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 389 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |