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

Unified Diff: chrome/browser/signin/easy_unlock_service_regular.cc

Issue 1066453002: Refactor CryptAuth component to be more testable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cryptauth_securemessage
Patch Set: rebase 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: chrome/browser/signin/easy_unlock_service_regular.cc
diff --git a/chrome/browser/signin/easy_unlock_service_regular.cc b/chrome/browser/signin/easy_unlock_service_regular.cc
index 80fe3c2cdd4abe88bb8657216b411c5e73befc45..a578a6a593b09dd745d2e76c04670c890406f277 100644
--- a/chrome/browser/signin/easy_unlock_service_regular.cc
+++ b/chrome/browser/signin/easy_unlock_service_regular.cc
@@ -22,7 +22,7 @@
#include "chrome/common/pref_names.h"
#include "chromeos/login/user_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
-#include "components/proximity_auth/cryptauth/cryptauth_account_token_fetcher.h"
+#include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h"
#include "components/proximity_auth/cryptauth/cryptauth_client.h"
#include "components/proximity_auth/cryptauth/cryptauth_client_factory.h"
#include "components/proximity_auth/switches.h"
@@ -223,12 +223,12 @@ void EasyUnlockServiceRegular::RunTurnOffFlow() {
SetTurnOffFlowStatus(PENDING);
- proximity_auth::CryptAuthClientFactory factory(
+ auto factory = proximity_auth::CryptAuthClientFactory::CreateDefault(
ProfileOAuth2TokenServiceFactory::GetForProfile(profile()),
SigninManagerFactory::GetForProfile(profile())
->GetAuthenticatedAccountId(),
profile()->GetRequestContext(), GetDeviceClassifier());
- cryptauth_client_ = factory.CreateInstance();
+ cryptauth_client_ = factory->CreateInstance();
cryptauth::ToggleEasyUnlockRequest request;
request.set_enable(false);
« no previous file with comments | « no previous file | components/components_tests.gyp » ('j') | components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698