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

Unified Diff: components/proximity_auth/cryptauth/mock_cryptauth_client.cc

Issue 2502343003: Moved //components/proximity_auth/cryptauth to //components/cryptauth. (Closed)
Patch Set: Prefixed two test names with "CryptAuth" so that they do not collide with other test names. Created 4 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/proximity_auth/cryptauth/mock_cryptauth_client.cc
diff --git a/components/proximity_auth/cryptauth/mock_cryptauth_client.cc b/components/proximity_auth/cryptauth/mock_cryptauth_client.cc
deleted file mode 100644
index 4480623e7d01dfed541eae82ff662c705edb76d0..0000000000000000000000000000000000000000
--- a/components/proximity_auth/cryptauth/mock_cryptauth_client.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// 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.
-
-#include "components/proximity_auth/cryptauth/mock_cryptauth_client.h"
-
-#include <utility>
-
-#include "base/callback.h"
-
-namespace proximity_auth {
-
-MockCryptAuthClient::MockCryptAuthClient() {
-}
-
-MockCryptAuthClient::~MockCryptAuthClient() {
-}
-
-MockCryptAuthClientFactory::MockCryptAuthClientFactory(MockType mock_type)
- : mock_type_(mock_type) {
-}
-
-MockCryptAuthClientFactory::~MockCryptAuthClientFactory() {
-}
-
-std::unique_ptr<CryptAuthClient> MockCryptAuthClientFactory::CreateInstance() {
- std::unique_ptr<MockCryptAuthClient> client;
- if (mock_type_ == MockType::MAKE_STRICT_MOCKS)
- client.reset(new testing::StrictMock<MockCryptAuthClient>());
- else
- client.reset(new testing::NiceMock<MockCryptAuthClient>());
-
- for (auto& observer : observer_list_)
- observer.OnCryptAuthClientCreated(client.get());
- return std::move(client);
-}
-
-void MockCryptAuthClientFactory::AddObserver(Observer* observer) {
- observer_list_.AddObserver(observer);
-}
-
-void MockCryptAuthClientFactory::RemoveObserver(Observer* observer) {
- observer_list_.RemoveObserver(observer);
-}
-
-} // namespace proximity_auth

Powered by Google App Engine
This is Rietveld 408576698