Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3304)

Unified Diff: chrome/browser/autofill/autofill_manager.h

Issue 5703002: Add some basic success/failure UMA logging for autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forbid copying, assignments (just like in, school) Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/autofill_download_unittest.cc ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6880ddb7135bf57b508ec869ae075c2bcddeeb43 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -20,6 +20,7 @@
class AutoFillCCInfoBarDelegate;
class AutoFillProfile;
+class AutoFillMetrics;
class CreditCard;
class FormStructure;
class PrefService;
@@ -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,11 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
personal_data_ = personal_data;
}
+ const AutoFillMetrics* metric_logger() const {
+ return metric_logger_.get();
+ }
+ void set_metric_logger(const AutoFillMetrics* metric_logger);
+
// 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 +164,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 +185,13 @@ 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_;
+ // For logging UMA metrics. Overridden by metrics tests.
+ scoped_ptr<const AutoFillMetrics> metric_logger_;
+
// Our copy of the form data.
ScopedVector<FormStructure> form_structures_;
@@ -202,7 +207,6 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
std::map<int, std::string> id_guid_map_;
friend class FormStructureBrowserTest;
- friend class TestAutoFillManager;
FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm);
FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressForm);
FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressAndCreditCardForm);
« no previous file with comments | « chrome/browser/autofill/autofill_download_unittest.cc ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698