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 COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
199 AutofillExternalDelegate* external_delegate() { | 199 AutofillExternalDelegate* external_delegate() { |
200 return external_delegate_; | 200 return external_delegate_; |
201 } | 201 } |
202 | 202 |
203 // Exposed for testing. | 203 // Exposed for testing. |
204 autofill::AutocheckoutManager* autocheckout_manager() { | 204 autofill::AutocheckoutManager* autocheckout_manager() { |
205 return &autocheckout_manager_; | 205 return &autocheckout_manager_; |
206 } | 206 } |
207 | 207 |
208 // Processes the submitted |form|, saving any new Autofill data and uploading | 208 // Processes the submitted |form|, saving any new Autofill data and uploading |
209 // the possible field types for the submitted fields to the crowdsouring | 209 // the possible field types for the submitted fields to the crowdsourcing |
210 // server. Returns false if this form is not relevant for Autofill. | 210 // server. Returns false if this form is not relevant for Autofill. |
211 bool OnFormSubmitted(const FormData& form, | 211 bool OnFormSubmitted(const FormData& form, |
212 const base::TimeTicks& timestamp); | 212 const base::TimeTicks& timestamp); |
213 | 213 |
214 // Tell the renderer the current interactive autocomplete finished. | 214 // Tell the renderer the current interactive autocomplete finished. |
215 virtual void ReturnAutocompleteResult( | 215 virtual void ReturnAutocompleteResult( |
216 WebKit::WebFormElement::AutocompleteResult result, | 216 WebKit::WebFormElement::AutocompleteResult result, |
217 const FormData& form_data); | 217 const FormData& form_data); |
218 | 218 |
219 private: | 219 private: |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
338 // outlive this object. | 338 // outlive this object. |
339 AutofillDriver* driver_; | 339 AutofillDriver* driver_; |
340 | 340 |
341 autofill::AutofillManagerDelegate* const manager_delegate_; | 341 autofill::AutofillManagerDelegate* const manager_delegate_; |
342 | 342 |
343 std::string app_locale_; | 343 std::string app_locale_; |
344 | 344 |
345 // The personal data manager, used to save and load personal data to/from the | 345 // The personal data manager, used to save and load personal data to/from the |
346 // web database. This is overridden by the AutofillManagerTest. | 346 // web database. This is overridden by the AutofillManagerTest. |
347 // Weak reference. | 347 // Weak reference. |
348 // May be NULL. NULL indicates OTR. | 348 // May be NULL. NULL indicates OTR. |
Ilya Sherman
2013/06/19 00:38:27
nit: Please revert the diff to this line.
sgurun-gerrit only
2013/06/19 17:56:23
Done.
| |
349 PersonalDataManager* personal_data_; | 349 PersonalDataManager* personal_data_; |
350 | 350 |
351 std::list<std::string> autofilled_form_signatures_; | 351 std::list<std::string> autofilled_form_signatures_; |
352 | 352 |
353 // Handles queries and uploads to Autofill servers. Will be NULL if | 353 // Handles queries and uploads to Autofill servers. Will be NULL if |
354 // the download manager functionality is disabled. | 354 // the download manager functionality is disabled. |
355 scoped_ptr<AutofillDownloadManager> download_manager_; | 355 scoped_ptr<AutofillDownloadManager> download_manager_; |
356 | 356 |
357 // Handles single-field autocomplete form data. | 357 // Handles single-field autocomplete form data. |
358 AutocompleteHistoryManager autocomplete_history_manager_; | 358 scoped_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; |
359 | 359 |
360 // Handles autocheckout flows. | 360 // Handles autocheckout flows. |
361 autofill::AutocheckoutManager autocheckout_manager_; | 361 autofill::AutocheckoutManager autocheckout_manager_; |
362 | 362 |
363 // For logging UMA metrics. Overridden by metrics tests. | 363 // For logging UMA metrics. Overridden by metrics tests. |
364 scoped_ptr<const AutofillMetrics> metric_logger_; | 364 scoped_ptr<const AutofillMetrics> metric_logger_; |
365 // Have we logged whether Autofill is enabled for this page load? | 365 // Have we logged whether Autofill is enabled for this page load? |
366 bool has_logged_autofill_enabled_; | 366 bool has_logged_autofill_enabled_; |
367 // Have we logged an address suggestions count metric for this page? | 367 // Have we logged an address suggestions count metric for this page? |
368 bool has_logged_address_suggestions_count_; | 368 bool has_logged_address_suggestions_count_; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetrics); | 414 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetrics); |
415 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsForFailure); | 415 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsForFailure); |
416 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsWithExperimentId); | 416 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsWithExperimentId); |
417 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch); | 417 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch); |
418 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, TestExternalDelegate); | 418 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, TestExternalDelegate); |
419 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 419 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
420 TestTabContentsWithExternalDelegate); | 420 TestTabContentsWithExternalDelegate); |
421 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 421 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
422 UserHappinessFormLoadAndSubmission); | 422 UserHappinessFormLoadAndSubmission); |
423 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 423 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
424 | 424 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
425 FormSubmittedAutocompleteEnabled); | |
425 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 426 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
426 }; | 427 }; |
427 | 428 |
428 } // namespace autofill | 429 } // namespace autofill |
429 | 430 |
430 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 431 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |