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

Unified Diff: components/autofill/core/browser/autofill_manager.h

Issue 23857010: Revert "Revert 223907 "[password generation] Upload possible account cre..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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
Index: components/autofill/core/browser/autofill_manager.h
diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h
index ec55abd3581684a89bea3b1405edf0e357bbcf99..a149e2856b9317ff7f4bf81a99c58b8ac748e5cf 100644
--- a/components/autofill/core/browser/autofill_manager.h
+++ b/components/autofill/core/browser/autofill_manager.h
@@ -157,6 +157,16 @@ class AutofillManager : public AutofillDownloadManager::Observer {
void OnRequestAutocomplete(const FormData& form,
const GURL& frame_url);
+ // Try and upload |form|. This differs from OnFormSubmitted() in a few ways.
+ // - This function will only label the first <input type="password"> field
+ // as ACCOUNT_CREATION_PASSWORD. Other fields will stay unlabeled, as they
+ // should have been labeled during the upload for OnFormSubmitted().
+ // - This function does not assume that |form| is being uploaded during
+ // the same browsing session as it was originally submitted (as we may
+ // not have the necessary information to classify the form at that time)
+ // so it bypasses the cache and doesn't log the same quality UMA metrics.
+ bool UploadPasswordGenerationForm(const FormData& form);
+
// Resets cache.
virtual void Reset();
@@ -287,6 +297,9 @@ class AutofillManager : public AutofillDownloadManager::Observer {
void UpdateInitialInteractionTimestamp(
const base::TimeTicks& interaction_timestamp);
+ // Shared code to determine if |form| should be uploaded.
+ bool ShouldUploadForm(const FormStructure& form);
+
// Provides driver-level context to the shared code of the component. Must
// outlive this object.
AutofillDriver* driver_;

Powered by Google App Engine
This is Rietveld 408576698