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

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

Issue 1066453002: Refactor CryptAuth component to be more testable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cryptauth_securemessage
Patch Set: rename tests Created 5 years, 8 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/proximity_auth/cryptauth/cryptauth_client_factory.cc
diff --git a/components/proximity_auth/cryptauth/cryptauth_client_factory.cc b/components/proximity_auth/cryptauth/cryptauth_client_factory.cc
deleted file mode 100644
index e7d79774ebe3ec97fdb41ed1ae6be6bf632b57aa..0000000000000000000000000000000000000000
--- a/components/proximity_auth/cryptauth/cryptauth_client_factory.cc
+++ /dev/null
@@ -1,32 +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/cryptauth_client_factory.h"
-
-#include "components/proximity_auth/cryptauth/cryptauth_account_token_fetcher.h"
-
-namespace proximity_auth {
-
-CryptAuthClientFactory::CryptAuthClientFactory(
- OAuth2TokenService* token_service,
- const std::string& account_id,
- scoped_refptr<net::URLRequestContextGetter> url_request_context,
- const cryptauth::DeviceClassifier& device_classifier)
- : token_service_(token_service),
- account_id_(account_id),
- url_request_context_(url_request_context),
- device_classifier_(device_classifier) {
-}
-
-CryptAuthClientFactory::~CryptAuthClientFactory() {
-}
-
-scoped_ptr<CryptAuthClient> CryptAuthClientFactory::CreateInstance() {
- scoped_ptr<CryptAuthAccessTokenFetcher> access_token_fetcher(
- new CryptAuthAccountTokenFetcher(token_service_, account_id_));
- return make_scoped_ptr(new CryptAuthClient(
- access_token_fetcher.Pass(), url_request_context_, device_classifier_));
-}
-
-} // namespace proximity_auth

Powered by Google App Engine
This is Rietveld 408576698