OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/shell/test_runner/mock_credential_manager_client.h" | 5 #include "content/shell/test_runner/mock_credential_manager_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "third_party/WebKit/public/platform/WebCredential.h" | 10 #include "third_party/WebKit/public/platform/WebCredential.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 delete callbacks; | 39 delete callbacks; |
40 } | 40 } |
41 | 41 |
42 void MockCredentialManagerClient::DispatchRequireUserMediation( | 42 void MockCredentialManagerClient::DispatchRequireUserMediation( |
43 NotificationCallbacks* callbacks) { | 43 NotificationCallbacks* callbacks) { |
44 callbacks->OnSuccess(); | 44 callbacks->OnSuccess(); |
45 delete callbacks; | 45 delete callbacks; |
46 } | 46 } |
47 | 47 |
48 void MockCredentialManagerClient::DispatchGet( | 48 void MockCredentialManagerClient::DispatchGet( |
49 bool zero_click_only, | 49 blink::WebCredentialMediationRequirement mediation, |
50 bool include_passwords, | 50 bool include_passwords, |
51 const blink::WebVector<blink::WebURL>& federations, | 51 const blink::WebVector<blink::WebURL>& federations, |
52 RequestCallbacks* callbacks) { | 52 RequestCallbacks* callbacks) { |
53 if (error_ != blink::kWebCredentialManagerNoError) | 53 if (error_ != blink::kWebCredentialManagerNoError) |
54 callbacks->OnError(error_); | 54 callbacks->OnError(error_); |
55 else | 55 else |
56 callbacks->OnSuccess(std::move(credential_)); | 56 callbacks->OnSuccess(std::move(credential_)); |
57 delete callbacks; | 57 delete callbacks; |
58 } | 58 } |
59 | 59 |
60 } // namespace test_runner | 60 } // namespace test_runner |
OLD | NEW |