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_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_ 7 8 #include <string> 9 10 #include "components/autofill/core/common/save_password_progress_logger.h" 11 12 namespace password_manager { 13 14 class PasswordManagerClient; 15 16 // This is the SavePasswordProgressLogger specialization for the browser code, 17 // where the PasswordManagerClient can be directly called. 18 class BrowserSavePasswordProgressLogger 19 : public autofill::SavePasswordProgressLogger { 20 public: 21 explicit BrowserSavePasswordProgressLogger(PasswordManagerClient* client); 22 virtual ~BrowserSavePasswordProgressLogger(); 23 24 protected: 25 // autofill::SavePasswordProgressLogger: 26 virtual void SendLog(const std::string& log) OVERRIDE; 27 28 private: 29 // The PasswordManagerClient to which logs can be sent for display. The client 30 // must outlive this logger. 31 PasswordManagerClient* const client_; 32 33 DISALLOW_COPY_AND_ASSIGN(BrowserSavePasswordProgressLogger); 34 }; 35 36 } // namespace password_manager 37 38 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_ 39