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

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

Issue 216183008: Password manager internals page: Introduce logger in browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final comments addressed Created 6 years, 8 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/password_manager/core/browser/stub_password_manager_client.h
diff --git a/components/password_manager/core/browser/stub_password_manager_client.h b/components/password_manager/core/browser/stub_password_manager_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..bf00387313fa2a64a96212627a541293a4ef6000
--- /dev/null
+++ b/components/password_manager/core/browser/stub_password_manager_client.h
@@ -0,0 +1,35 @@
+// Copyright 2014 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_PASSWORD_MANAGER_CLIENT_H_
+#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_
+
+#include "components/password_manager/core/browser/password_manager_client.h"
+
+namespace password_manager {
+
+// Use this class as a base for mock or test clients to avoid stubbing
+// uninteresting pure virtual methods. All the implemented methods are just
+// trivial stubs. Do NOT use in production, only use in tests.
+class StubPasswordManagerClient : public PasswordManagerClient {
+ public:
+ StubPasswordManagerClient();
+ virtual ~StubPasswordManagerClient();
+
+ // PasswordManagerClient:
+ virtual void PromptUserToSavePassword(PasswordFormManager* form_to_save)
+ OVERRIDE;
+ virtual void AuthenticateAutofillAndFillForm(
+ scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE;
+ virtual PrefService* GetPrefs() OVERRIDE;
+ virtual PasswordStore* GetPasswordStore() OVERRIDE;
+ virtual PasswordManagerDriver* GetDriver() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient);
+};
+
+} // namespace password_manager
+
+#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698