Chromium Code Reviews| Index: components/password_manager/core/browser/log_manager.h |
| diff --git a/components/password_manager/core/browser/log_manager.h b/components/password_manager/core/browser/log_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..730d364c3d8b58ebcd9ad7d600b02edf0a3950b7 |
| --- /dev/null |
| +++ b/components/password_manager/core/browser/log_manager.h |
| @@ -0,0 +1,36 @@ |
| +// 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_PASSWORD_MANAGER_CORE_BROWSER_LOG_MANAGER_H_ |
| +#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_MANAGER_H_ |
| + |
| +#include <string> |
| +#include "base/macros.h" |
| + |
| +namespace password_manager { |
| + |
| +// This interface is used by the password management code to receive and display |
| +// logs about progress of actions like saving a password. |
| +class LogManager { |
| + public: |
| + LogManager() {} |
|
vasilii
2015/11/12 16:27:34
Inspired by the C++11 class, I recommend to get ri
vabr (Chromium)
2015/11/12 21:55:43
Done.
|
| + virtual ~LogManager() {} |
| + |
| + // This method is called by a LogRouter, after the LogManager registers with |
| + // one. If |router_can_be_used| is true, logs can be sent to LogRouter after |
| + // the return from OnLogRouterAvailabilityChanged and will reach at least one |
| + // LogReceiver instance. If |router_can_be_used| is false, no logs should be |
| + // sent to the LogRouter. |
| + virtual void OnLogRouterAvailabilityChanged(bool router_can_be_used) = 0; |
| + |
| + // Forward |text| for display to the LogRouter (if registered with one). |
| + virtual void LogSavePasswordProgress(const std::string& text) const = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(LogManager); |
|
vasilii
2015/11/12 16:27:34
I'm not sure that it's the interface's business to
vabr (Chromium)
2015/11/12 21:55:43
Yeah, I don't see a strong reason why it should be
|
| +}; |
| + |
| +} // namespace password_manager |
| + |
| +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_MANAGER_H_ |