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

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

Issue 1415533013: Fix password manager internals renderer reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: All comments addressed Created 5 years, 1 month 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_log_manager.h
diff --git a/components/password_manager/core/browser/stub_log_manager.h b/components/password_manager/core/browser/stub_log_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..9fc6fe1c89075b6117a80f392e9663d7d7dbe07c
--- /dev/null
+++ b/components/password_manager/core/browser/stub_log_manager.h
@@ -0,0 +1,33 @@
+// 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_STUB_LOG_MANAGER_H_
+#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_LOG_MANAGER_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "components/password_manager/core/browser/log_manager.h"
+
+namespace password_manager {
+
+// Use this in tests only, to provide a no-op implementation of LogManager.
+class StubLogManager : public LogManager {
+ public:
+ StubLogManager() = default;
+ ~StubLogManager() override = default;
+
+ private:
+ // LogManager
+ void OnLogRouterAvailabilityChanged(bool router_can_be_used) override;
+ void SetSuspended(bool suspended) override;
+ void LogSavePasswordProgress(const std::string& text) const override;
+ bool IsLoggingActive() const override;
+
+ DISALLOW_COPY_AND_ASSIGN(StubLogManager);
+};
+
+} // namespace password_manager
+
+#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_LOG_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698