1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_DRIVER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_DRIVER_H_ 7 8 #include "components/password_manager/core/browser/password_manager_driver.h" 9 10 namespace password_manager { 11 12 // Use this class as a base for mock or test drivers to avoid stubbing 13 // uninteresting pure virtual methods. All the implemented methods are just 14 // trivial stubs. Do NOT use in production, only use in tests. 15 class StubPasswordManagerDriver : public PasswordManagerDriver { 16 public: 17 StubPasswordManagerDriver(); 18 virtual ~StubPasswordManagerDriver(); 19 20 // PasswordManagerDriver: 21 virtual void FillPasswordForm( 22 const autofill::PasswordFormFillData& form_data) OVERRIDE; 23 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; 24 virtual bool IsOffTheRecord() OVERRIDE; 25 virtual void AllowPasswordGenerationForForm( 26 autofill::PasswordForm* form) OVERRIDE; 27 virtual void AccountCreationFormsFound( 28 const std::vector<autofill::FormData>& forms) OVERRIDE; 29 virtual void FillSuggestion(const base::string16& username, 30 const base::string16& password) OVERRIDE; 31 virtual void PreviewSuggestion(const base::string16& username, 32 const base::string16& password) OVERRIDE; 33 virtual void ClearPreviewedForm() OVERRIDE; 34 virtual PasswordGenerationManager* GetPasswordGenerationManager() OVERRIDE; 35 virtual PasswordManager* GetPasswordManager() OVERRIDE; 36 virtual PasswordAutofillManager* GetPasswordAutofillManager() OVERRIDE; 37 virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE; 38 39 private: 40 DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerDriver); 41 }; 42 43 } // namespace password_manager 44 45 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_DRIVER_H_ 46