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

Unified Diff: remoting/host/setup/host_starter.cc

Issue 12316083: Move HostKeyPair into protocol::KeyPair. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename key_pair_ to local_key_pair_ Created 7 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: remoting/host/setup/host_starter.cc
diff --git a/remoting/host/setup/host_starter.cc b/remoting/host/setup/host_starter.cc
index 13cb685a4961876903687b407d471915f3f0bbbc..0a0a879145b9a3acecdfb2686f7b99b6d9c12548 100644
--- a/remoting/host/setup/host_starter.cc
+++ b/remoting/host/setup/host_starter.cc
@@ -106,9 +106,10 @@ void HostStarter::OnGetUserInfoResponse(const std::string& user_email) {
user_email_ = user_email;
// Register the host.
host_id_ = base::GenerateGUID();
- key_pair_.Generate();
+ key_pair_ = new RsaKeyPair();
+ key_pair_->Generate();
service_client_->RegisterHost(
- host_id_, host_name_, key_pair_.GetPublicKey(), access_token_, this);
+ host_id_, host_name_, key_pair_->GetPublicKey(), access_token_, this);
}
void HostStarter::OnHostRegistered() {
@@ -124,7 +125,7 @@ void HostStarter::OnHostRegistered() {
config->SetString("oauth_refresh_token", refresh_token_);
config->SetString("host_id", host_id_);
config->SetString("host_name", host_name_);
- config->SetString("private_key", key_pair_.GetAsString());
+ config->SetString("private_key", key_pair_->GetAsString());
config->SetString("host_secret_hash", host_secret_hash);
daemon_controller_->SetConfigAndStart(
config.Pass(), consent_to_data_collection_,

Powered by Google App Engine
This is Rietveld 408576698