| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 const std::string& app_locale() const { return app_locale_; } | 132 const std::string& app_locale() const { return app_locale_; } |
| 133 | 133 |
| 134 // Only for testing. | 134 // Only for testing. |
| 135 void SetTestDelegate(autofill::AutofillManagerTestDelegate* delegate); | 135 void SetTestDelegate(autofill::AutofillManagerTestDelegate* delegate); |
| 136 | 136 |
| 137 void OnFormsSeen(const std::vector<FormData>& forms, | 137 void OnFormsSeen(const std::vector<FormData>& forms, |
| 138 const base::TimeTicks& timestamp, | 138 const base::TimeTicks& timestamp, |
| 139 autofill::FormsSeenState state); | 139 autofill::FormsSeenState state); |
| 140 | 140 |
| 141 // Processes the submitted |form|, saving any new Autofill data and uploading | 141 // Processes the submitted |form|, saving any new Autofill data and uploading |
| 142 // the possible field types for the submitted fields to the crowdsouring | 142 // the possible field types for the submitted fields to the crowdsourcing |
| 143 // server. Returns false if this form is not relevant for Autofill. | 143 // server. Returns false if this form is not relevant for Autofill. |
| 144 bool OnFormSubmitted(const FormData& form, | 144 bool OnFormSubmitted(const FormData& form, |
| 145 const base::TimeTicks& timestamp); | 145 const base::TimeTicks& timestamp); |
| 146 | 146 |
| 147 void OnTextFieldDidChange(const FormData& form, | 147 void OnTextFieldDidChange(const FormData& form, |
| 148 const FormFieldData& field, | 148 const FormFieldData& field, |
| 149 const base::TimeTicks& timestamp); | 149 const base::TimeTicks& timestamp); |
| 150 | 150 |
| 151 // The |bounding_box| is a window relative value. | 151 // The |bounding_box| is a window relative value. |
| 152 void OnQueryFormFieldAutofill(int query_id, | 152 void OnQueryFormFieldAutofill(int query_id, |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // May be NULL. NULL indicates OTR. | 336 // May be NULL. NULL indicates OTR. |
| 337 PersonalDataManager* personal_data_; | 337 PersonalDataManager* personal_data_; |
| 338 | 338 |
| 339 std::list<std::string> autofilled_form_signatures_; | 339 std::list<std::string> autofilled_form_signatures_; |
| 340 | 340 |
| 341 // Handles queries and uploads to Autofill servers. Will be NULL if | 341 // Handles queries and uploads to Autofill servers. Will be NULL if |
| 342 // the download manager functionality is disabled. | 342 // the download manager functionality is disabled. |
| 343 scoped_ptr<AutofillDownloadManager> download_manager_; | 343 scoped_ptr<AutofillDownloadManager> download_manager_; |
| 344 | 344 |
| 345 // Handles single-field autocomplete form data. | 345 // Handles single-field autocomplete form data. |
| 346 AutocompleteHistoryManager autocomplete_history_manager_; | 346 scoped_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; |
| 347 | 347 |
| 348 // Handles autocheckout flows. | 348 // Handles autocheckout flows. |
| 349 autofill::AutocheckoutManager autocheckout_manager_; | 349 autofill::AutocheckoutManager autocheckout_manager_; |
| 350 | 350 |
| 351 // For logging UMA metrics. Overridden by metrics tests. | 351 // For logging UMA metrics. Overridden by metrics tests. |
| 352 scoped_ptr<const AutofillMetrics> metric_logger_; | 352 scoped_ptr<const AutofillMetrics> metric_logger_; |
| 353 // Have we logged whether Autofill is enabled for this page load? | 353 // Have we logged whether Autofill is enabled for this page load? |
| 354 bool has_logged_autofill_enabled_; | 354 bool has_logged_autofill_enabled_; |
| 355 // Have we logged an address suggestions count metric for this page? | 355 // Have we logged an address suggestions count metric for this page? |
| 356 bool has_logged_address_suggestions_count_; | 356 bool has_logged_address_suggestions_count_; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetrics); | 402 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetrics); |
| 403 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsForFailure); | 403 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsForFailure); |
| 404 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsWithExperimentId); | 404 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsWithExperimentId); |
| 405 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch); | 405 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch); |
| 406 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, TestExternalDelegate); | 406 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, TestExternalDelegate); |
| 407 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 407 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 408 TestTabContentsWithExternalDelegate); | 408 TestTabContentsWithExternalDelegate); |
| 409 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 409 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
| 410 UserHappinessFormLoadAndSubmission); | 410 UserHappinessFormLoadAndSubmission); |
| 411 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 411 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 412 | 412 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 413 FormSubmittedAutocompleteEnabled); |
| 413 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 414 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 414 }; | 415 }; |
| 415 | 416 |
| 416 } // namespace autofill | 417 } // namespace autofill |
| 417 | 418 |
| 418 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 419 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |