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

Unified Diff: components/password_manager/core/browser/stub_form_saver.h

Issue 2077253002: Introduce password_manager::FormSaver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@621355_555132_PFM_blacklisted_matches
Patch Set: Debug tests fixed & patch rebased Created 4 years, 6 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
« no previous file with comments | « components/password_manager/core/browser/password_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/stub_form_saver.h
diff --git a/components/password_manager/core/browser/stub_form_saver.h b/components/password_manager/core/browser/stub_form_saver.h
new file mode 100644
index 0000000000000000000000000000000000000000..b389f2ce7705027316c0ae710814b505e9995c41
--- /dev/null
+++ b/components/password_manager/core/browser/stub_form_saver.h
@@ -0,0 +1,38 @@
+// Copyright 2016 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_PASSWORD_MANAGER_CORE_BROWSER_STUB_FORM_SAVER_H_
+#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_FORM_SAVER_H_
+
+#include "base/macros.h"
+#include "components/password_manager/core/browser/form_saver.h"
+
+namespace password_manager {
+
+// The no-op FormSaver stub to support tests.
+class StubFormSaver : public FormSaver {
+ public:
+ StubFormSaver() = default;
+
+ ~StubFormSaver() override = default;
+
+ // FormSaver:
+ void PermanentlyBlacklist(autofill::PasswordForm* observed) override {}
+ void Save(
+ const autofill::PasswordForm& pending,
+ bool is_new_login,
+ const autofill::PasswordFormMap& best_matches,
+ const std::vector<const autofill::PasswordForm*>* credentials_to_update,
+ const autofill::PasswordForm* old_primary_key) override {}
+ void PresaveGeneratedPassword(
+ const autofill::PasswordForm& generated) override {}
+ void RemovePresavedPassword() override {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(StubFormSaver);
+};
+
+} // namespace password_manager
+
+#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_FORM_SAVER_H_
« no previous file with comments | « components/password_manager/core/browser/password_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698