| Index: chrome/browser/autofill/autofill_manager.h
|
| diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
|
| index 791d171f8ff799672349dc59381ae7978b2a03bb..5f06d5eadef5467f96745c39211511e6f4835bfc 100644
|
| --- a/chrome/browser/autofill/autofill_manager.h
|
| +++ b/chrome/browser/autofill/autofill_manager.h
|
| @@ -15,6 +15,7 @@
|
| #include "base/scoped_vector.h"
|
| #include "chrome/browser/autofill/autofill_dialog.h"
|
| #include "chrome/browser/autofill/autofill_download.h"
|
| +#include "chrome/browser/autofill/autofill_metrics.h"
|
| #include "chrome/browser/autofill/personal_data_manager.h"
|
| #include "chrome/browser/renderer_host/render_view_host_delegate.h"
|
|
|
| @@ -76,10 +77,6 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
|
| // Returns the value of the AutoFillEnabled pref.
|
| virtual bool IsAutoFillEnabled() const;
|
|
|
| - // Uses heuristics and existing personal data to determine the possible field
|
| - // types.
|
| - void DeterminePossibleFieldTypes(FormStructure* form_structure);
|
| -
|
| // Handles the form data submitted by the user.
|
| void HandleSubmit();
|
|
|
| @@ -96,6 +93,15 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
|
| personal_data_ = personal_data;
|
| }
|
|
|
| + void set_log_server_query_metric_fn(
|
| + autofill_metrics::LogServerQueryMetricFn log_server_query_metric) {
|
| + log_server_query_metric_ = log_server_query_metric;
|
| + }
|
| + void set_log_quality_metric_fn(
|
| + autofill_metrics::LogQualityMetricFn log_quality_metric) {
|
| + log_quality_metric_ = log_quality_metric;
|
| + }
|
| +
|
| // Maps GUIDs to and from IDs that are used to identify profiles and credit
|
| // cards sent to and from the renderer process.
|
| virtual int GUIDToID(const std::string& guid);
|
| @@ -162,10 +168,9 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
|
| // Parses the forms using heuristic matching and querying the AutoFill server.
|
| void ParseForms(const std::vector<webkit_glue::FormData>& forms);
|
|
|
| - // The following function is meant to be called from unit-test only.
|
| - void set_disable_download_manager_requests(bool value) {
|
| - disable_download_manager_requests_ = value;
|
| - }
|
| + // Uses existing personal data to determine possible field types for the
|
| + // |upload_form_structure_|.
|
| + void DeterminePossibleFieldTypesForUpload();
|
|
|
| // The TabContents hosting this AutoFillManager.
|
| // Weak reference.
|
| @@ -184,9 +189,14 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
|
|
|
| // Should be set to true in AutoFillManagerTest and other tests, false in
|
| // AutoFillDownloadManagerTest and in non-test environment. Is false by
|
| - // default.
|
| + // default for the public constructor, and true by default for the test-only
|
| + // constructors.
|
| bool disable_download_manager_requests_;
|
|
|
| + // Function pointers for logging UMA metrics. Overridden by metrics tests.
|
| + autofill_metrics::LogServerQueryMetricFn log_server_query_metric_;
|
| + autofill_metrics::LogQualityMetricFn log_quality_metric_;
|
| +
|
| // Our copy of the form data.
|
| ScopedVector<FormStructure> form_structures_;
|
|
|
|
|