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

Unified Diff: components/autofill/core/common/password_form_field_prediction_map.h

Issue 1153023004: Prepare the infrastructure for password overrides. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the test. Created 5 years, 7 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/common/password_form_field_prediction_map.h
diff --git a/components/autofill/core/common/password_form_field_prediction_map.h b/components/autofill/core/common/password_form_field_prediction_map.h
new file mode 100644
index 0000000000000000000000000000000000000000..9c22fbeb0bc18153b921c272b7595a49c4738e41
--- /dev/null
+++ b/components/autofill/core/common/password_form_field_prediction_map.h
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_FORM_FIELD_PREDICTION_MAP_H_
+#define COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_FORM_FIELD_PREDICTION_MAP_H_
+
+#include <map>
+
+#include "components/autofill/core/common/form_field_data.h"
+
+namespace autofill {
+
+// This enum lists form field types as understood by the password manager,
+// esentially a digest of |autofill::ServerFieldType|. Note that we cannot
+// simply reuse |autofill::ServerFieldType| as it is defined in the browser,
+// while this enum will be used by both the browser and renderer.
+enum PasswordFormFieldPredictionType {
+ PREDICTION_USERNAME,
+ PREDICTION_CURRENT_PASSWORD,
+ PREDICTION_NEW_PASSWORD,
+ PREDICTION_MAX = PREDICTION_NEW_PASSWORD
+};
+
+using PasswordFormFieldPredictionMap =
+ std::map<PasswordFormFieldPredictionType, FormFieldData>;
+
+} // namespace autofill
+
+#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_FORM_FIELD_PREDICTION_MAP_H_

Powered by Google App Engine
This is Rietveld 408576698