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

Unified Diff: components/password_manager/content/renderer/credential_manager_client_browsertest.cc

Issue 2867743002: Use OnceCallback on Mojo interfaces in //components/password_manager (Closed)
Patch Set: . Created 3 years, 7 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
« no previous file with comments | « components/password_manager/content/common/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/content/renderer/credential_manager_client_browsertest.cc
diff --git a/components/password_manager/content/renderer/credential_manager_client_browsertest.cc b/components/password_manager/content/renderer/credential_manager_client_browsertest.cc
index 8b25db6779c9c8b2b0fe371f20bb34b691cb4812..63ebc533ffeee80bf4c1b73b39c2fb2346bc9e93 100644
--- a/components/password_manager/content/renderer/credential_manager_client_browsertest.cc
+++ b/components/password_manager/content/renderer/credential_manager_client_browsertest.cc
@@ -8,6 +8,7 @@
#include <memory>
#include <tuple>
+#include <utility>
#include "base/location.h"
#include "base/run_loop.h"
@@ -44,30 +45,31 @@ class FakeCredentialManager : public mojom::CredentialManager {
private:
// mojom::CredentialManager methods:
void Store(const CredentialInfo& credential,
- const StoreCallback& callback) override {
- callback.Run();
+ StoreCallback callback) override {
+ std::move(callback).Run();
}
- void RequireUserMediation(
- const RequireUserMediationCallback& callback) override {
- callback.Run();
+ void RequireUserMediation(RequireUserMediationCallback callback) override {
+ std::move(callback).Run();
}
void Get(bool zero_click_only,
bool include_passwords,
const std::vector<GURL>& federations,
- const GetCallback& callback) override {
+ GetCallback callback) override {
const std::string& url = federations[0].spec();
if (url == kTestCredentialPassword) {
CredentialInfo info;
info.type = CredentialType::CREDENTIAL_TYPE_PASSWORD;
- callback.Run(mojom::CredentialManagerError::SUCCESS, info);
+ std::move(callback).Run(mojom::CredentialManagerError::SUCCESS, info);
} else if (url == kTestCredentialEmpty) {
- callback.Run(mojom::CredentialManagerError::SUCCESS, CredentialInfo());
+ std::move(callback).Run(mojom::CredentialManagerError::SUCCESS,
+ CredentialInfo());
} else if (url == kTestCredentialReject) {
- callback.Run(mojom::CredentialManagerError::PASSWORDSTOREUNAVAILABLE,
- base::nullopt);
+ std::move(callback).Run(
+ mojom::CredentialManagerError::PASSWORDSTOREUNAVAILABLE,
+ base::nullopt);
}
}
« no previous file with comments | « components/password_manager/content/common/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698