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

Unified Diff: components/test_runner/mock_credential_manager_client.cc

Issue 2707183003: Move //components/test_runner back into //content/shell (Closed)
Patch Set: Trim DEPS Created 3 years, 10 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
Index: components/test_runner/mock_credential_manager_client.cc
diff --git a/components/test_runner/mock_credential_manager_client.cc b/components/test_runner/mock_credential_manager_client.cc
deleted file mode 100644
index a2d2a3c122d332c2d5bda22d6277da9345f99bf4..0000000000000000000000000000000000000000
--- a/components/test_runner/mock_credential_manager_client.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 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.
-
-#include "components/test_runner/mock_credential_manager_client.h"
-
-#include <memory>
-#include <utility>
-
-#include "third_party/WebKit/public/platform/WebCredential.h"
-
-namespace test_runner {
-
-MockCredentialManagerClient::MockCredentialManagerClient()
- : error_(blink::WebCredentialManagerNoError) {}
-
-MockCredentialManagerClient::~MockCredentialManagerClient() {
-}
-
-void MockCredentialManagerClient::SetResponse(
- blink::WebCredential* credential) {
- credential_.reset(credential);
-}
-
-void MockCredentialManagerClient::SetError(const std::string& error) {
- if (error == "pending")
- error_ = blink::WebCredentialManagerPendingRequestError;
- if (error == "disabled")
- error_ = blink::WebCredentialManagerDisabledError;
- if (error == "unknown")
- error_ = blink::WebCredentialManagerUnknownError;
- if (error.empty())
- error_ = blink::WebCredentialManagerNoError;
-}
-
-void MockCredentialManagerClient::dispatchStore(
- const blink::WebCredential&,
- blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) {
- callbacks->onSuccess();
- delete callbacks;
-}
-
-void MockCredentialManagerClient::dispatchRequireUserMediation(
- NotificationCallbacks* callbacks) {
- callbacks->onSuccess();
- delete callbacks;
-}
-
-void MockCredentialManagerClient::dispatchGet(
- bool zero_click_only,
- bool include_passwords,
- const blink::WebVector<blink::WebURL>& federations,
- RequestCallbacks* callbacks) {
- if (error_ != blink::WebCredentialManagerNoError)
- callbacks->onError(error_);
- else
- callbacks->onSuccess(std::move(credential_));
- delete callbacks;
-}
-
-} // namespace test_runner

Powered by Google App Engine
This is Rietveld 408576698