OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 void RemoveAutofillProfileOrCreditCard(int unique_id); | 110 void RemoveAutofillProfileOrCreditCard(int unique_id); |
111 | 111 |
112 // Remove the specified Autocomplete entry. | 112 // Remove the specified Autocomplete entry. |
113 void RemoveAutocompleteEntry(const string16& name, const string16& value); | 113 void RemoveAutocompleteEntry(const string16& name, const string16& value); |
114 | 114 |
115 // Causes the dialog for request autocomplete feature to be shown. | 115 // Causes the dialog for request autocomplete feature to be shown. |
116 void ShowRequestAutocompleteDialog( | 116 void ShowRequestAutocompleteDialog( |
117 const FormData& form, | 117 const FormData& form, |
118 const GURL& source_url, | 118 const GURL& source_url, |
119 const content::SSLStatus& ssl_status, | 119 const content::SSLStatus& ssl_status, |
| 120 autofill::DialogRequester requester, |
120 const base::Callback<void(const FormStructure*)>& callback); | 121 const base::Callback<void(const FormStructure*)>& callback); |
121 | 122 |
122 // Happens when the autocomplete dialog runs its callback when being closed. | 123 // Happens when the autocomplete dialog runs its callback when being closed. |
123 void RequestAutocompleteDialogClosed(); | 124 void RequestAutocompleteDialogClosed(); |
124 | 125 |
125 protected: | 126 protected: |
126 // Only test code should subclass AutofillManager. | 127 // Only test code should subclass AutofillManager. |
127 friend class base::RefCounted<AutofillManager>; | 128 friend class base::RefCounted<AutofillManager>; |
128 | 129 |
129 AutofillManager(content::WebContents* web_contents, | 130 AutofillManager(content::WebContents* web_contents, |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // Should be set to true in AutofillManagerTest and other tests, false in | 346 // Should be set to true in AutofillManagerTest and other tests, false in |
346 // AutofillDownloadManagerTest and in non-test environment. Is false by | 347 // AutofillDownloadManagerTest and in non-test environment. Is false by |
347 // default for the public constructor, and true by default for the test-only | 348 // default for the public constructor, and true by default for the test-only |
348 // constructors. | 349 // constructors. |
349 bool disable_download_manager_requests_; | 350 bool disable_download_manager_requests_; |
350 | 351 |
351 // Handles single-field autocomplete form data. | 352 // Handles single-field autocomplete form data. |
352 AutocompleteHistoryManager autocomplete_history_manager_; | 353 AutocompleteHistoryManager autocomplete_history_manager_; |
353 | 354 |
354 // Handles autocheckout flows. | 355 // Handles autocheckout flows. |
355 AutocheckoutManager autocheckout_manager_; | 356 autofill::AutocheckoutManager autocheckout_manager_; |
356 | 357 |
357 // For logging UMA metrics. Overridden by metrics tests. | 358 // For logging UMA metrics. Overridden by metrics tests. |
358 scoped_ptr<const AutofillMetrics> metric_logger_; | 359 scoped_ptr<const AutofillMetrics> metric_logger_; |
359 // Have we logged whether Autofill is enabled for this page load? | 360 // Have we logged whether Autofill is enabled for this page load? |
360 bool has_logged_autofill_enabled_; | 361 bool has_logged_autofill_enabled_; |
361 // Have we logged an address suggestions count metric for this page? | 362 // Have we logged an address suggestions count metric for this page? |
362 bool has_logged_address_suggestions_count_; | 363 bool has_logged_address_suggestions_count_; |
363 // Have we shown Autofill suggestions at least once? | 364 // Have we shown Autofill suggestions at least once? |
364 bool did_show_suggestions_; | 365 bool did_show_suggestions_; |
365 // Has the user manually edited at least one form field among the autofillable | 366 // Has the user manually edited at least one form field among the autofillable |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 422 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
422 TestTabContentsWithExternalDelegate); | 423 TestTabContentsWithExternalDelegate); |
423 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 424 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
424 UserHappinessFormLoadAndSubmission); | 425 UserHappinessFormLoadAndSubmission); |
425 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 426 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
426 | 427 |
427 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 428 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
428 }; | 429 }; |
429 | 430 |
430 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 431 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
OLD | NEW |