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

Unified Diff: chromeos/components/tether/tether_host_fetcher.cc

Issue 2803913002: [CrOS Tether] Update TetherHostFetcher to use CryptAuthService instead of a Delegate. (Closed)
Patch Set: Rebased. Created 3 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: chromeos/components/tether/tether_host_fetcher.cc
diff --git a/chromeos/components/tether/tether_host_fetcher.cc b/chromeos/components/tether/tether_host_fetcher.cc
index f033cf92c55fb1ed17c4b54fdfc77fbcdc62129f..4f13a3c80e7ca842459f2a379204cb815d2a555b 100644
--- a/chromeos/components/tether/tether_host_fetcher.cc
+++ b/chromeos/components/tether/tether_host_fetcher.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "components/cryptauth/cryptauth_device_manager.h"
+#include "components/cryptauth/cryptauth_service.h"
#include "components/cryptauth/remote_device_loader.h"
#include "components/cryptauth/secure_message_delegate.h"
@@ -34,11 +35,11 @@ TetherHostFetcher::TetherHostFetchRequest::~TetherHostFetchRequest() {}
TetherHostFetcher::TetherHostFetcher(
const std::string& user_id,
const std::string& user_private_key,
- std::unique_ptr<Delegate> delegate,
+ cryptauth::CryptAuthService* cryptauth_service,
cryptauth::CryptAuthDeviceManager* device_manager)
: user_id_(user_id),
user_private_key_(user_private_key),
- delegate_(std::move(delegate)),
+ cryptauth_service_(cryptauth_service),
device_manager_(device_manager),
weak_ptr_factory_(this) {}
@@ -64,7 +65,7 @@ void TetherHostFetcher::StartLoadingDevicesIfNeeded() {
remote_device_loader_ = cryptauth::RemoteDeviceLoader::Factory::NewInstance(
device_manager_->GetTetherHosts(), user_id_, user_private_key_,
- delegate_->CreateSecureMessageDelegate());
+ cryptauth_service_->CreateSecureMessageDelegate());
remote_device_loader_->Load(
base::Bind(&TetherHostFetcher::OnRemoteDevicesLoaded,
weak_ptr_factory_.GetWeakPtr()));
« no previous file with comments | « chromeos/components/tether/tether_host_fetcher.h ('k') | chromeos/components/tether/tether_host_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698